org.apache.fop.area
Class Trait.InternalLink
java.lang.Object
org.apache.fop.area.Trait.InternalLink
- Trait
- Serializable
public static class Trait.InternalLink
extends java.lang.Object
implements Serializable
Class for internal link traits.
Stores PageViewport key and producer ID
InternalLink(String attrValue) - Create an InternalLink based on the given XML attribute value.
|
InternalLink(String pvKey, String idRef) - Create an InternalLink to the given PageViewport and target ID
|
String | getIDRef() - Returns the target ID.
|
String | getPVKey() - Returns the key of the targeted PageViewport.
|
static String | makeXMLAttribute(String pvKey, String idRef) - Returns the XML attribute value for the given PV key and ID ref.
|
static String[] | parseXMLAttribute(String attrValue) - Parses XML attribute value from the area tree into
PageViewport key + IDRef strings.
|
void | setIDRef(String idRef) - Sets the target ID.
|
void | setPVKey(String pvKey) - Sets the key of the targeted PageViewport.
|
String | toString() - Return the human-friendly string for debugging.
|
String | xmlAttribute() - Returns the attribute value for this object as
used in the area tree XML.
|
InternalLink
public InternalLink(String attrValue)
Create an InternalLink based on the given XML attribute value.
This is typically called when data are read from an XML area tree.
attrValue
- attribute value to be parsed by InternalLink.parseXMLAttribute
InternalLink
public InternalLink(String pvKey,
String idRef)
Create an InternalLink to the given PageViewport and target ID
pvKey
- the PageViewport keyidRef
- the target ID
getIDRef
public String getIDRef()
Returns the target ID.
getPVKey
public String getPVKey()
Returns the key of the targeted PageViewport.
makeXMLAttribute
public static String makeXMLAttribute(String pvKey,
String idRef)
Returns the XML attribute value for the given PV key and ID ref.
This value is used in the area tree XML.
pvKey
- the PageViewport key of the link targetidRef
- the ID of the link target
- a string of the type "(thisPVKey,thisIDRef)"
parseXMLAttribute
public static String[] parseXMLAttribute(String attrValue)
Parses XML attribute value from the area tree into
PageViewport key + IDRef strings. If the attribute value is
formatted like "(s1,s2)", then s1 and s2 are considered to be
the PV key and the IDRef, respectively.
Otherwise, the entire string is the PV key and the IDRef is null.
attrValue
- the atribute value (PV key and possibly IDRef)
- a 2-String array containing the PV key and the IDRef.
Both may be null.
setIDRef
public void setIDRef(String idRef)
Sets the target ID.
setPVKey
public void setPVKey(String pvKey)
Sets the key of the targeted PageViewport.
pvKey
- the PageViewport key
toString
public String toString()
Return the human-friendly string for debugging.
java.lang.Object.toString()
xmlAttribute
public String xmlAttribute()
Returns the attribute value for this object as
used in the area tree XML.
- a string of the type "(thisPVKey,thisIDRef)"
Copyright 1999-2007 The Apache Software Foundation. All Rights Reserved.