org.sejda.model.parameter
Class SetPagesLabelParameters

java.lang.Object
  extended by org.sejda.model.parameter.base.AbstractParameters
      extended by org.sejda.model.parameter.base.AbstractPdfOutputParameters
          extended by org.sejda.model.parameter.base.SinglePdfSourceSingleOutputParameters
              extended by org.sejda.model.parameter.SetPagesLabelParameters
All Implemented Interfaces:
SingleOutputTaskParameters, SinglePdfSourceTaskParameters, TaskParameters

@SingleOutputAllowedExtensions
public class SetPagesLabelParameters
extends SinglePdfSourceSingleOutputParameters

Parameter class for the set pages label manipulation. The manipulation will apply a label to physical pages until a new label for a physical page number is found.

Ex. if the parameters contain two labels, "label1" for physical page 1 and "label2" for physical page 5, the resulting document will have pages 1 to 4 where "label1" is applied and pages 5 till the end of the document where "label2" is applied.

Author:
Andrea Vacondio

Constructor Summary
SetPagesLabelParameters()
           
 
Method Summary
 boolean equals(Object other)
           
 Map<Integer,PdfPageLabel> getLabels()
           
 PdfSource<?> getSource()
           
 int hashCode()
           
 PdfPageLabel putLabel(Integer page, PdfPageLabel label)
          Associates the given label to the given page number.
 void setSource(PdfSource<?> source)
          Set the source for this parameter.
 
Methods inherited from class org.sejda.model.parameter.base.SinglePdfSourceSingleOutputParameters
getOutput, getOutputName, setOutput, setOutputName
 
Methods inherited from class org.sejda.model.parameter.base.AbstractPdfOutputParameters
getMinRequiredPdfVersion, getVersion, isCompressXref, setCompress, setVersion
 
Methods inherited from class org.sejda.model.parameter.base.AbstractParameters
isOverwrite, setOverwrite
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.sejda.model.parameter.base.TaskParameters
isOverwrite
 

Constructor Detail

SetPagesLabelParameters

public SetPagesLabelParameters()
Method Detail

putLabel

public PdfPageLabel putLabel(Integer page,
                             PdfPageLabel label)
Associates the given label to the given page number. If a label was already associated to the given page, it is replaced with the new one.

Parameters:
page -
label -
Returns:
the previously associated label or null.

getLabels

public Map<Integer,PdfPageLabel> getLabels()
Returns:
an unmodifiable view of the labels in this parameter.

hashCode

public int hashCode()
Overrides:
hashCode in class SinglePdfSourceSingleOutputParameters

equals

public boolean equals(Object other)
Overrides:
equals in class SinglePdfSourceSingleOutputParameters

getSource

public PdfSource<?> getSource()
Specified by:
getSource in interface SinglePdfSourceTaskParameters
Returns:
the source for this parameter.

setSource

public void setSource(PdfSource<?> source)
Description copied from interface: SinglePdfSourceTaskParameters
Set the source for this parameter.

Specified by:
setSource in interface SinglePdfSourceTaskParameters


Copyright © 2013 sejda. All Rights Reserved.