public class MetadataFile extends Object
DocumentModel.
 
 Only support the types that MetadataCollector knows.
| Modifier and Type | Field and Description | 
|---|---|
protected DocumentModel | 
doc  | 
protected Properties | 
metadataProperties  | 
| Modifier | Constructor and Description | 
|---|---|
protected  | 
MetadataFile(DocumentModel doc)  | 
| Modifier and Type | Method and Description | 
|---|---|
protected void | 
addAllProperties(String schema)  | 
void | 
addProperty(String propertyKey,
           Object value)  | 
protected String | 
computePropertyKey(String propertyKey,
                  String schema)  | 
static MetadataFile | 
createFromDocument(DocumentModel doc)
Create a  
MetadataFile from a DocumentModel's schemas. | 
static MetadataFile | 
createFromProperties(DocumentModel doc,
                    List<String> properties)
Create a  
MetadataFile from the listed properties of a DocumentModel | 
static MetadataFile | 
createFromSchemas(DocumentModel doc,
                 List<String> allPropertiesSchemas)
Create a  
MetadataFile from the listed schemas (with all properties) of a DocumentModel | 
static MetadataFile | 
createFromSchemasAndProperties(DocumentModel doc,
                              List<String> allPropertiesSchemas,
                              List<String> properties)
Create a  
MetadataFile from the listed schemas (with all properties) and the listed properties of a
 DocumentModel | 
protected void | 
load()  | 
protected void | 
load(List<String> allPropertiesSchemas,
    List<String> properties)  | 
void | 
writeTo(File file)
Write the properties file to the given  
file | 
protected DocumentModel doc
protected Properties metadataProperties
protected MetadataFile(DocumentModel doc)
public static MetadataFile createFromDocument(DocumentModel doc)
MetadataFile from a DocumentModel's schemas.public static MetadataFile createFromSchemasAndProperties(DocumentModel doc, List<String> allPropertiesSchemas, List<String> properties)
MetadataFile from the listed schemas (with all properties) and the listed properties of a
 DocumentModelpublic static MetadataFile createFromSchemas(DocumentModel doc, List<String> allPropertiesSchemas)
MetadataFile from the listed schemas (with all properties) of a DocumentModelpublic static MetadataFile createFromProperties(DocumentModel doc, List<String> properties)
MetadataFile from the listed properties of a DocumentModelprotected void addAllProperties(String schema)
public void addProperty(String propertyKey, Object value)
protected String computePropertyKey(String propertyKey, String schema)
protected void load()
Copyright © 2019 Nuxeo. All rights reserved.