Package org.apache.fop.area
Class DestinationData
- java.lang.Object
-
- org.apache.fop.area.AbstractOffDocumentItem
-
- org.apache.fop.area.DestinationData
-
- All Implemented Interfaces:
OffDocumentItem
,Resolvable
public class DestinationData extends AbstractOffDocumentItem implements Resolvable
An instance of this class is named destination from fox:destination
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
idRef
private java.lang.String[]
idRefs
private PageViewport
pageRef
-
Fields inherited from class org.apache.fop.area.AbstractOffDocumentItem
AFTER_PAGE, END_OF_DOC, IMMEDIATELY, START_OF_DOC, whenToProcess
-
-
Constructor Summary
Constructors Constructor Description DestinationData(java.lang.String idRef)
Create a new named destination.DestinationData(Destination destination)
Create a new pdf destination data object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getIDRef()
Get the idref for this destinationjava.lang.String[]
getIDRefs()
Get the array of idrefs of this resolvable object.java.lang.String
getName()
Return a human-readable name for this ODI (for error messages, etc.)PageViewport
getPageViewport()
Get the PageViewport object that this destination refers toboolean
isResolved()
Check if this resolvable object has been resolved.void
resolveIDRef(java.lang.String id, java.util.List<PageViewport> pages)
Resolves the idref of this object by getting the PageViewport object that corresponds to the IDRef This method allows the Resolvable object to resolve one of its unresolved idrefs with the actual set of PageViewports containing the target ID.-
Methods inherited from class org.apache.fop.area.AbstractOffDocumentItem
getWhenToProcess
-
-
-
-
Field Detail
-
idRef
private java.lang.String idRef
-
idRefs
private java.lang.String[] idRefs
-
pageRef
private PageViewport pageRef
-
-
Constructor Detail
-
DestinationData
public DestinationData(Destination destination)
Create a new pdf destination data object. This is used by the destination to create a data object with a idref. During processing, this idref will be subsequently resolved to a particular PageViewport.- Parameters:
destination
- the fo:bookmark object
-
DestinationData
public DestinationData(java.lang.String idRef)
Create a new named destination.- Parameters:
idRef
- the id reference of the destination
-
-
Method Detail
-
getIDRef
public java.lang.String getIDRef()
Get the idref for this destination- Returns:
- the idref for the destination
-
getIDRefs
public java.lang.String[] getIDRefs()
Get the array of idrefs of this resolvable object. If this object contains child resolvables that are resolved through this then it should return the idref's of the child also.- Specified by:
getIDRefs
in interfaceResolvable
- Returns:
- the id references for resolving this object
-
getPageViewport
public PageViewport getPageViewport()
Get the PageViewport object that this destination refers to- Returns:
- the PageViewport that this destination points to
-
isResolved
public boolean isResolved()
Check if this resolvable object has been resolved. For now, just return true. To do: Find a way to determine whether the destination has been resolved.- Specified by:
isResolved
in interfaceResolvable
- Returns:
- true if this object has been resolved
-
resolveIDRef
public void resolveIDRef(java.lang.String id, java.util.List<PageViewport> pages)
Resolves the idref of this object by getting the PageViewport object that corresponds to the IDRef 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. TODO check to make sure it works if multiple bookmark-items have the same idref- 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
-
getName
public java.lang.String getName()
Return a human-readable name for this ODI (for error messages, etc.)- Specified by:
getName
in interfaceOffDocumentItem
- Specified by:
getName
in classAbstractOffDocumentItem
- Returns:
- String name of ODI
-
-