Class MetadataFile
java.lang.Object
org.nuxeo.ecm.platform.importer.properties.MetadataFile
Handle properties file creation from a
DocumentModel.
Only support the types that MetadataCollector knows.
- Author:
- Thomas Roger
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddAllProperties(String schema) voidaddProperty(String propertyKey, Object value) protected StringcomputePropertyKey(String propertyKey, String schema) static MetadataFileCreate aMetadataFilefrom aDocumentModel's schemas.static MetadataFilecreateFromProperties(DocumentModel doc, List<String> properties) Create aMetadataFilefrom the listed properties of aDocumentModelstatic MetadataFilecreateFromSchemas(DocumentModel doc, List<String> allPropertiesSchemas) Create aMetadataFilefrom the listed schemas (with all properties) of aDocumentModelstatic MetadataFilecreateFromSchemasAndProperties(DocumentModel doc, List<String> allPropertiesSchemas, List<String> properties) Create aMetadataFilefrom the listed schemas (with all properties) and the listed properties of aDocumentModelprotected voidload()protected voidvoidWrite the properties file to the givenfile
-
Field Details
-
doc
-
metadataProperties
-
-
Constructor Details
-
MetadataFile
-
-
Method Details
-
createFromDocument
Create aMetadataFilefrom aDocumentModel's schemas.- Returns:
- a new MetadataFile object
-
createFromSchemasAndProperties
public static MetadataFile createFromSchemasAndProperties(DocumentModel doc, List<String> allPropertiesSchemas, List<String> properties) Create aMetadataFilefrom the listed schemas (with all properties) and the listed properties of aDocumentModel- Returns:
- a new MetadataFile object
-
createFromSchemas
Create aMetadataFilefrom the listed schemas (with all properties) of aDocumentModel- Returns:
- a new MetadataFile object
-
createFromProperties
Create aMetadataFilefrom the listed properties of aDocumentModel- Returns:
- a new MetadataFile object
-
load
-
addAllProperties
-
addProperty
-
computePropertyKey
-
load
protected void load() -
writeTo
Write the properties file to the givenfile
-