Class FieldMapper
- java.lang.Object
-
- org.nuxeo.ecm.core.io.impl.transformers.FieldMapper
-
- All Implemented Interfaces:
DocumentTransformer
public class FieldMapper extends Object implements DocumentTransformer
Rename / translate a field- Since:
- 7.4
-
-
Field Summary
Fields Modifier and Type Field Description protected StringdstFieldprotected StringdstSchemaNameprotected StringsrcFieldprotected StringsrcSchemaName
-
Constructor Summary
Constructors Constructor Description FieldMapper(String srcSchemaName, String srcField, String dstSchemaName, String dstField)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected StringgetPrefix(String name)protected StringgetUnprefixedName(String name)booleantransform(ExportedDocument xdoc)Transforms the given document and returns true to pass to the next transformer or false to exit from the transformation chain.
-
-
-
Field Detail
-
srcSchemaName
protected final String srcSchemaName
-
dstSchemaName
protected final String dstSchemaName
-
-
Constructor Detail
-
FieldMapper
public FieldMapper(String srcSchemaName, String srcField, String dstSchemaName, String dstField)
-
-
Method Detail
-
getUnprefixedName
protected String getUnprefixedName(String name)
-
transform
public boolean transform(ExportedDocument xdoc) throws IOException
Description copied from interface:DocumentTransformerTransforms the given document and returns true to pass to the next transformer or false to exit from the transformation chain.- Specified by:
transformin interfaceDocumentTransformer- Parameters:
xdoc- the document to transform- Returns:
- true to continue with the next transformer or false to exit transformation chain
- Throws:
IOException
-
-