Package net.sf.okapi.filters.rainbowkit
Class MergingInfo
- java.lang.Object
-
- net.sf.okapi.filters.rainbowkit.MergingInfo
-
- All Implemented Interfaces:
Cloneable,IAnnotation
public class MergingInfo extends Object implements IAnnotation
-
-
Constructor Summary
Constructors Constructor Description MergingInfo()Creates a new merging information file object with no settings.MergingInfo(int docId, String extractionType, String relativeInputPath, String filterId, String filterParameters, String inputEncoding, String relativeTargetPath, String targetEncoding)Creates a new merging information file object.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetDocId()StringgetExtractionType()StringgetFilterId()StringgetFilterParameters()StringgetInputEncoding()StringgetRelativeInputPath()StringgetRelativeTargetPath()StringgetResourceId()booleangetSelected()StringgetTargetEncoding()booleangetUseSkeleton()static MergingInforeadFromXML(Element element)Reads the merging information from an XML element created withwriteToXML(String, boolean).voidsetResourceId(String resourceId)voidsetSelected(boolean selected)voidsetUseSkeleton(boolean useSkeleton)StringtoString()Gets a human readable representation of this annotation.StringwriteToXML(String elementQName, boolean base64)Creates a string output of the XML representation of the information.
-
-
-
Constructor Detail
-
MergingInfo
public MergingInfo()
Creates a new merging information file object with no settings.
-
MergingInfo
public MergingInfo(int docId, String extractionType, String relativeInputPath, String filterId, String filterParameters, String inputEncoding, String relativeTargetPath, String targetEncoding)Creates a new merging information file object.- Parameters:
docId- the document id in the manifest/batch.relativeInputPath- the relative input path of the extracted documentfilterId- the id of the filter used to extract.filterParameters- the parameters used to extract (can be null).inputEncoding- the encoding used to extract.relativeTargetPath- the relative output path for the merged file relative to the root.targetEncoding- the default encoding for the merged file.
-
-
Method Detail
-
getDocId
public int getDocId()
-
getExtractionType
public String getExtractionType()
-
getUseSkeleton
public boolean getUseSkeleton()
-
setUseSkeleton
public void setUseSkeleton(boolean useSkeleton)
-
getRelativeInputPath
public String getRelativeInputPath()
-
getFilterId
public String getFilterId()
-
getFilterParameters
public String getFilterParameters()
-
getInputEncoding
public String getInputEncoding()
-
getRelativeTargetPath
public String getRelativeTargetPath()
-
getTargetEncoding
public String getTargetEncoding()
-
getResourceId
public String getResourceId()
-
setResourceId
public void setResourceId(String resourceId)
-
getSelected
public boolean getSelected()
-
setSelected
public void setSelected(boolean selected)
-
writeToXML
public String writeToXML(String elementQName, boolean base64)
Creates a string output of the XML representation of the information. The output file must be UTF-8.- Parameters:
elementQName- the name of the element that encloses the data.base64- true if the content needs to be encoded in Base64.- Returns:
- the XML representation of the information.
-
readFromXML
public static MergingInfo readFromXML(Element element)
Reads the merging information from an XML element created withwriteToXML(String, boolean).- Parameters:
element- the element containing the information.- Returns:
- a new MergingInfo object with its values set to values stored in the element.
-
toString
public String toString()
Description copied from interface:IAnnotationGets a human readable representation of this annotation.- Specified by:
toStringin interfaceIAnnotation- Overrides:
toStringin classObject- Returns:
- a human readable representation of this annotation.
-
-