Search in sources :

Example 1 with MutableRelationshipTypeDefinition

use of org.apache.chemistry.opencmis.commons.definitions.MutableRelationshipTypeDefinition in project structr by structr.

the class CMISRepositoryService method getRelationshipTypeDefinition.

private MutableRelationshipTypeDefinition getRelationshipTypeDefinition(final String typeId, final boolean includePropertyDefinitions, final boolean baseType) {
    final TypeDefinitionFactory factory = TypeDefinitionFactory.newInstance();
    final MutableRelationshipTypeDefinition def = factory.createRelationshipTypeDefinition(CmisVersion.CMIS_1_1, baseType ? null : BaseTypeId.CMIS_RELATIONSHIP.value());
    def.setIsCreatable(false);
    initializeExtendedType(def, typeId);
    if (!includePropertyDefinitions) {
        def.removeAllPropertyDefinitions();
    }
    return def;
}
Also used : MutableRelationshipTypeDefinition(org.apache.chemistry.opencmis.commons.definitions.MutableRelationshipTypeDefinition) TypeDefinitionFactory(org.apache.chemistry.opencmis.server.support.TypeDefinitionFactory)

Aggregations

MutableRelationshipTypeDefinition (org.apache.chemistry.opencmis.commons.definitions.MutableRelationshipTypeDefinition)1 TypeDefinitionFactory (org.apache.chemistry.opencmis.server.support.TypeDefinitionFactory)1