Package org.apache.fop.area
Class LinkResolver
java.lang.Object
org.apache.fop.area.LinkResolver
- All Implemented Interfaces:
Serializable
,Resolvable
Link resolving for resolving internal links.
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addDependent
(Resolvable dependent) Add dependent resolvable.String[]
Get the references for this link.boolean
Check if this area has been resolved.void
resolveIDRef
(String id, List<PageViewport> pages) Resolve by adding an internal link to the first PageViewport in the list.void
resolveIDRef
(String id, PageViewport pv) Resolve by adding an InternalLink trait to the area
-
Constructor Details
-
LinkResolver
public LinkResolver() -
LinkResolver
Create a new link resolver.- Parameters:
id
- the id to resolvea
- the area that will have the link attribute
-
-
Method Details
-
isResolved
public boolean isResolved()Description copied from interface:Resolvable
Check if this area has been resolved.- Specified by:
isResolved
in interfaceResolvable
- Returns:
- true if this link is resolved
-
getIDRefs
Get the references for this link.- Specified by:
getIDRefs
in interfaceResolvable
- Returns:
- the String array of references.
-
resolveIDRef
Resolve by adding an internal link to the first PageViewport in the list. This method allows the Resolvable object to resolve one of its unresolved idrefs with the actual set of PageViewports containing the target ID. The Resolvable object initially identifies to the AreaTreeHandler which idrefs it needs resolved. After the idrefs are resolved, the ATH calls this method to allow the Resolvable object to update itself with the PageViewport information.- Specified by:
resolveIDRef
in interfaceResolvable
- Parameters:
id
- an ID matching one of the Resolvable object's unresolved idref's.pages
- the list of PageViewports with the given ID
-
resolveIDRef
Resolve by adding an InternalLink trait to the area- Parameters:
id
- the target id (should be equal to the object's idRef)pv
- the PageViewport containing the first area with the given id
-
addDependent
Add dependent resolvable. Used to resolve second-order resolvables that depend on resolution of this resolver.- Parameters:
dependent
- resolvable
-