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 inherited from class org.apache.fop.area.AbstractOffDocumentItem

`AFTER_PAGE, END_OF_DOC, IMMEDIATELY, START_OF_DOC, whenToProcess`

### Constructor Summary

Constructors
Constructor and Description
`DestinationData(Destination destination)` Create a new pdf destination data object.
`DestinationData(String idRef)` Create a new named destination.

### Method Summary

All Methods Instance Methods Concrete Methods
`String` `getIDRef()` Get the idref for this destination
`String[]` `getIDRefs()` Get the array of idrefs of this resolvable object.
`String` `getName()` Return a human-readable name for this ODI (for error messages, etc.)
`PageViewport` `getPageViewport()` Get the PageViewport object that this destination refers to
`boolean` `isResolved()` Check if this resolvable object has been resolved.
`void` `resolveIDRef(String id, 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. TODO check to make sure it works if multiple bookmark-items have the same idref

### Methods inherited from class org.apache.fop.area.AbstractOffDocumentItem

`getWhenToProcess`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### 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(String idRef)

Create a new named destination.

Parameters:
  `idRef` - the id reference of the destination

### Method Detail

#### getIDRef

    public String getIDRef()

Get the idref for this destination

Returns:
  the idref for the destination

#### getIDRefs

    public 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 interface `Resolvable`
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 interface `Resolvable`
Returns:
  true if this object has been resolved

#### resolveIDRef

    public void resolveIDRef(String id,
                             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 interface `Resolvable`
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 String getName()

Return a human-readable name for this ODI (for error messages, etc.)

Specified by:
  `getName` in interface `OffDocumentItem`
Specified by:
  `getName` in class `AbstractOffDocumentItem`
Returns:
  String name of ODI