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 String
dstField
protected String
dstSchemaName
protected String
srcField
protected String
srcSchemaName
-
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 String
getPrefix(String name)
protected String
getUnprefixedName(String name)
boolean
transform(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:DocumentTransformer
Transforms the given document and returns true to pass to the next transformer or false to exit from the transformation chain.- Specified by:
transform
in interfaceDocumentTransformer
- Parameters:
xdoc
- the document to transform- Returns:
- true to continue with the next transformer or false to exit transformation chain
- Throws:
IOException
-
-