org.apache.fop.datatypes
Class IDReferences


public class IDReferences


Field Summary
 (package private) final static intID_PADDING
           

Constructor Summary
IDReferences()
          Constructor for IDReferences

Method Summary
 voidaddToIdValidationList(String id)
          Adds id to validation list to be validated .
 voidconfigureID(String id, Area area)
          Configures this id
 voidcreateID(String id)
          Creates id entry
 StringcreateInternalLinkGoTo(String id, int objectNumber)
          creates an Internal Link GoTo object for this id
 voidcreateNewId(String id)
          Adds an id to IDReferences
 booleandoesGoToReferenceExist(String id)
          Determines whether the GoTo reference for the specified id is defined
 booleandoesIDExist(String id)
          Determines whether specified id already exists in IDReferences
 StringgetInternalLinkGotToReference(String id)
          Returns the reference to the GoTo object used for the internal link
 StringgetInvalidIds()
          Returns all invalid id's still remaining in the validation list
 StringgetPageNumber(String id)
          Returns the page number where the specified id is found
 PDFGoTogetPDFGoTo(String id)
          Returns the PDFGoTo object for the specified id
 voidinitializeID(String id, Area area)
          Creates and configures the specified id.
 booleanisEveryIdValid()
          Determines whether all id's are valid
 voidremoveFromIdValidationList(String id)
          Removes id from validation list.
 voidremoveID(String id)
          Removes id from IDReferences
 voidsetInternalGoToPageReference(String id, String pageReference)
          sets the page reference for the internal link's GoTo.
 voidsetPageNumber(String id, int pageNumber)
          Sets the page number for the specified id
 voidsetPosition(String id, int x, int y)
          Sets the x and y position of specified id

Field Detail

ID_PADDING

final static int ID_PADDING
Constructor Detail

IDReferences

public IDReferences()
Constructor for IDReferences
Method Detail

addToIdValidationList

public void addToIdValidationList(String id)
Adds id to validation list to be validated . This should be used if it is unsure whether the id is valid
Parameters:
id - id to be added

configureID

public void configureID(String id, Area area)
Configures this id
Parameters:
id - The id to configure
area - The area where the id was encountered

createID

public void createID(String id)
throws org.apache.fop.apps.FOPException
Creates id entry
Parameters:
id - The id to create
area - The area where this id was encountered
Throws:
FOPException

createInternalLinkGoTo

public String createInternalLinkGoTo(String id, int objectNumber)
creates an Internal Link GoTo object for this id
Parameters:
id - The id for which to set the Internal Link Go To
objectNumber The - object number to use for the GoTo object
Returns: the object reference of the new GoTo object

createNewId

public void createNewId(String id)
Adds an id to IDReferences
Parameters:
id - the id to add

doesGoToReferenceExist

public boolean doesGoToReferenceExist(String id)
Determines whether the GoTo reference for the specified id is defined
Parameters:
id - the id to search for
Returns: true if GoTo reference is defined, false otherwise

doesIDExist

public boolean doesIDExist(String id)
Determines whether specified id already exists in IDReferences
Parameters:
id - the id to search for
Returns: true if ID was found, false otherwise

getInternalLinkGotToReference

public String getInternalLinkGotToReference(String id)
Returns the reference to the GoTo object used for the internal link
Parameters:
id - the id whose reference to use
Returns: reference to GoTo object

getInvalidIds

public String getInvalidIds()
Returns all invalid id's still remaining in the validation list
Returns: invalid ids from validation list

getPageNumber

public String getPageNumber(String id)
Returns the page number where the specified id is found
Parameters:
id - The id whose page number to return
Returns: the page number of the id, or null if the id does not exist

getPDFGoTo

public PDFGoTo getPDFGoTo(String id)
Returns the PDFGoTo object for the specified id
Parameters:
id - the id for which the PDFGoTo to be retrieved is associated
Returns: the PDFGoTo object associated with the specified id

initializeID

public void initializeID(String id, Area area)
throws org.apache.fop.apps.FOPException
Creates and configures the specified id.
Parameters:
id - The id to initialize
area - The area where this id was encountered
Throws:
FOPException

isEveryIdValid

public boolean isEveryIdValid()
Determines whether all id's are valid
Returns: true if all id's are valid, false otherwise

removeFromIdValidationList

public void removeFromIdValidationList(String id)
Removes id from validation list. This should be used if the id has been determined to be valid
Parameters:
id - the id to remove

removeID

public void removeID(String id)
Removes id from IDReferences
Parameters:
id - The id to remove
Throws:
FOPException

setInternalGoToPageReference

public void setInternalGoToPageReference(String id, String pageReference)
sets the page reference for the internal link's GoTo. The GoTo will jump to this page reference.
Parameters:
pageReference the - page reference to which the internal link GoTo should jump ex. 23 0 R

setPageNumber

public void setPageNumber(String id, int pageNumber)
Sets the page number for the specified id
Parameters:
id - The id whose page number is being set
pageNumber - The page number of the specified id

setPosition

public void setPosition(String id, int x, int y)
Sets the x and y position of specified id
Parameters:
id - the id whose position is to be set
x - x position of id
y - y position of id

Association Links

to Class java.util.Hashtable