public class NuxeoTypeHelper extends Object
Maps Nuxeo types to CMIS types using the following rules:
Modifier and Type | Field and Description |
---|---|
static String |
ENABLE_COMPLEX_PROPERTIES |
static String |
NUXEO_DOCUMENT |
static String |
NUXEO_FILE |
static String |
NUXEO_FOLDER |
static String |
NUXEO_ORDERED_FOLDER |
static String |
NUXEO_RELATION |
static String |
NUXEO_RELATION_DEFAULT |
static String |
NX_DC_CREATED |
static String |
NX_DC_CREATOR |
static String |
NX_DC_DESCRIPTION |
static String |
NX_DC_LAST_CONTRIBUTOR |
static String |
NX_DC_MODIFIED |
static String |
NX_DC_TITLE |
static String |
NX_DIGEST |
static String |
NX_DUBLINCORE |
static String |
NX_FACETS |
static String |
NX_ICON |
static String |
NX_ISCHECKEDIN |
static String |
NX_ISVERSION |
static String |
NX_LIFECYCLE_STATE |
static String |
NX_PARENT_ID |
static String |
NX_PATH_SEGMENT |
static String |
NX_POS |
static String |
NX_REL_SOURCE |
static String |
NX_REL_TARGET |
protected Map<String,String> |
propertyToSchema |
protected org.apache.chemistry.opencmis.commons.impl.dataobjects.AbstractTypeDefinition |
t |
Modifier | Constructor and Description |
---|---|
protected |
NuxeoTypeHelper(String id,
String nuxeoTypeId)
Helper to construct one CMIS type from a secondary type.
|
protected |
NuxeoTypeHelper(String id,
String parentId,
org.apache.chemistry.opencmis.commons.enums.BaseTypeId baseTypeId,
DocumentType documentType,
String nuxeoTypeId,
boolean creatable)
Helper to construct one CMIS type from a
DocumentType . |
Modifier and Type | Method and Description |
---|---|
protected void |
addBasePropertyDefinitions() |
protected static void |
addDocumentPropertyDefinitions(org.apache.chemistry.opencmis.commons.impl.dataobjects.DocumentTypeDefinitionImpl t) |
protected static void |
addFolderPropertyDefinitions(org.apache.chemistry.opencmis.commons.impl.dataobjects.FolderTypeDefinitionImpl t) |
protected static void |
addRelationshipPropertyDefinitions(org.apache.chemistry.opencmis.commons.impl.dataobjects.RelationshipTypeDefinitionImpl t) |
protected void |
addSchemaPropertyDefinitions(Schema schema) |
protected void |
constructBaseDocumentType(String id,
String parentId,
org.apache.chemistry.opencmis.commons.enums.BaseTypeId baseTypeId,
DocumentType documentType,
String nuxeoTypeId,
boolean creatable)
Constructs the base for a
DocumentType . |
protected void |
constructBaseSecondaryType(String id,
String nuxeoTypeId)
Constructs the base for a secondary type.
|
static org.apache.chemistry.opencmis.commons.definitions.TypeDefinition |
constructCmisBase(org.apache.chemistry.opencmis.commons.enums.BaseTypeId baseTypeId,
SchemaManager schemaManager)
Constructs a base type, not mapped to a Nuxeo type.
|
static org.apache.chemistry.opencmis.commons.definitions.TypeDefinition |
constructDocumentType(DocumentType documentType,
String parentId) |
static org.apache.chemistry.opencmis.commons.definitions.TypeDefinition |
constructSecondaryType(CompositeType type) |
static org.apache.chemistry.opencmis.commons.enums.BaseTypeId |
getBaseTypeId(DocumentModel doc) |
static org.apache.chemistry.opencmis.commons.enums.BaseTypeId |
getBaseTypeId(DocumentType type) |
static String |
getParentTypeId(DocumentType documentType)
Gets the remapped parent type id, or
null if the type is to be ignored. |
protected static org.apache.chemistry.opencmis.commons.enums.PropertyType |
getPropertType(SimpleType type) |
protected static boolean |
isComplexPropertiesEnabled() |
protected static String |
mappedId(String id)
Turns a Nuxeo type into a CMIS type.
|
protected static org.apache.chemistry.opencmis.commons.definitions.PropertyDefinition<?> |
newPropertyDefinition(String id,
String displayName,
org.apache.chemistry.opencmis.commons.enums.PropertyType propertyType,
org.apache.chemistry.opencmis.commons.enums.Cardinality cardinality,
org.apache.chemistry.opencmis.commons.enums.Updatability updatability,
boolean inherited,
boolean required,
boolean queryable,
boolean orderable) |
protected static boolean |
supportsBlobHolder(DocumentType documentType) |
public static final String NUXEO_DOCUMENT
public static final String NUXEO_FOLDER
public static final String NUXEO_RELATION
public static final String NUXEO_RELATION_DEFAULT
public static final String NUXEO_FILE
public static final String NUXEO_ORDERED_FOLDER
public static final String NX_DUBLINCORE
public static final String NX_DC_TITLE
public static final String NX_DC_DESCRIPTION
public static final String NX_DC_CREATED
public static final String NX_DC_CREATOR
public static final String NX_DC_MODIFIED
public static final String NX_DC_LAST_CONTRIBUTOR
public static final String NX_ICON
public static final String NX_REL_SOURCE
public static final String NX_REL_TARGET
public static final String NX_DIGEST
public static final String NX_ISVERSION
public static final String NX_ISCHECKEDIN
public static final String NX_FACETS
public static final String NX_LIFECYCLE_STATE
public static final String NX_PARENT_ID
public static final String NX_PATH_SEGMENT
public static final String ENABLE_COMPLEX_PROPERTIES
public static final String NX_POS
protected org.apache.chemistry.opencmis.commons.impl.dataobjects.AbstractTypeDefinition t
protected Map<String,String> propertyToSchema
protected NuxeoTypeHelper(String id, String parentId, org.apache.chemistry.opencmis.commons.enums.BaseTypeId baseTypeId, DocumentType documentType, String nuxeoTypeId, boolean creatable)
DocumentType
.protected NuxeoTypeHelper(String id, String nuxeoTypeId)
protected static boolean isComplexPropertiesEnabled()
public static String getParentTypeId(DocumentType documentType)
null
if the type is to be ignored.public static org.apache.chemistry.opencmis.commons.definitions.TypeDefinition constructDocumentType(DocumentType documentType, String parentId)
public static org.apache.chemistry.opencmis.commons.definitions.TypeDefinition constructSecondaryType(CompositeType type)
public static org.apache.chemistry.opencmis.commons.definitions.TypeDefinition constructCmisBase(org.apache.chemistry.opencmis.commons.enums.BaseTypeId baseTypeId, SchemaManager schemaManager)
protected void addSchemaPropertyDefinitions(Schema schema)
protected void constructBaseDocumentType(String id, String parentId, org.apache.chemistry.opencmis.commons.enums.BaseTypeId baseTypeId, DocumentType documentType, String nuxeoTypeId, boolean creatable)
DocumentType
.protected void constructBaseSecondaryType(String id, String nuxeoTypeId)
protected void addBasePropertyDefinitions()
protected static void addFolderPropertyDefinitions(org.apache.chemistry.opencmis.commons.impl.dataobjects.FolderTypeDefinitionImpl t)
protected static void addRelationshipPropertyDefinitions(org.apache.chemistry.opencmis.commons.impl.dataobjects.RelationshipTypeDefinitionImpl t)
protected static void addDocumentPropertyDefinitions(org.apache.chemistry.opencmis.commons.impl.dataobjects.DocumentTypeDefinitionImpl t)
protected static org.apache.chemistry.opencmis.commons.definitions.PropertyDefinition<?> newPropertyDefinition(String id, String displayName, org.apache.chemistry.opencmis.commons.enums.PropertyType propertyType, org.apache.chemistry.opencmis.commons.enums.Cardinality cardinality, org.apache.chemistry.opencmis.commons.enums.Updatability updatability, boolean inherited, boolean required, boolean queryable, boolean orderable)
protected static boolean supportsBlobHolder(DocumentType documentType)
protected static org.apache.chemistry.opencmis.commons.enums.PropertyType getPropertType(SimpleType type)
public static org.apache.chemistry.opencmis.commons.enums.BaseTypeId getBaseTypeId(DocumentType type)
public static org.apache.chemistry.opencmis.commons.enums.BaseTypeId getBaseTypeId(DocumentModel doc)
Copyright © 2015 Nuxeo SA. All rights reserved.