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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
addAllProperties
(String schema) void
addProperty
(String propertyKey, Object value) protected String
computePropertyKey
(String propertyKey, String schema) static MetadataFile
Create aMetadataFile
from aDocumentModel
's schemas.static MetadataFile
createFromProperties
(DocumentModel doc, List<String> properties) Create aMetadataFile
from the listed properties of aDocumentModel
static MetadataFile
createFromSchemas
(DocumentModel doc, List<String> allPropertiesSchemas) Create aMetadataFile
from the listed schemas (with all properties) of aDocumentModel
static MetadataFile
createFromSchemasAndProperties
(DocumentModel doc, List<String> allPropertiesSchemas, List<String> properties) Create aMetadataFile
from the listed schemas (with all properties) and the listed properties of aDocumentModel
protected void
load()
protected void
void
Write the properties file to the givenfile
-
Field Details
-
doc
-
metadataProperties
-
-
Constructor Details
-
MetadataFile
-
-
Method Details
-
createFromDocument
Create aMetadataFile
from aDocumentModel
's schemas.- Returns:
- a new MetadataFile object
-
createFromSchemasAndProperties
public static MetadataFile createFromSchemasAndProperties(DocumentModel doc, List<String> allPropertiesSchemas, List<String> properties) Create aMetadataFile
from the listed schemas (with all properties) and the listed properties of aDocumentModel
- Returns:
- a new MetadataFile object
-
createFromSchemas
Create aMetadataFile
from the listed schemas (with all properties) of aDocumentModel
- Returns:
- a new MetadataFile object
-
createFromProperties
Create aMetadataFile
from 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
-