Class TypeManagement
- java.lang.Object
-
- org.gcube.informationsystem.resourceregistry.types.TypeManagement
-
public class TypeManagement extends Object
- Author:
- Luca Frosini (ISTI - CNR)
-
-
Field Summary
Fields Modifier and Type Field Description protected Stringjsonprotected booleanskipTypeDefinitionCreationprotected booleanskipVersionCheckOnUpdateprotected org.gcube.informationsystem.types.reference.Typetypestatic Set<String>typeListprotected StringtypeName
-
Constructor Summary
Constructors Constructor Description TypeManagement()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringcreate()protected booleandelete(org.gcube.informationsystem.base.reference.AccessType accessType)protected com.orientechnologies.orient.core.metadata.schema.OClassgetOClass(com.orientechnologies.orient.core.metadata.schema.OSchema oSchema, String typeName)protected List<org.gcube.informationsystem.types.reference.Type>getSchema(boolean includeSubtypes)protected List<com.orientechnologies.orient.core.metadata.schema.OClass>getSuperclassesAndCheckCompliancy(com.orientechnologies.orient.core.db.document.ODatabaseDocument oDatabaseDocument, org.gcube.informationsystem.types.reference.Type type, String baseType)static ElementManagement<?,?>getTypeManagement(com.orientechnologies.orient.core.metadata.schema.OClass oClass)booleanisSkipTypeDefinitionCreation()booleanisSkipVersionCheckOnUpdate()List<org.gcube.informationsystem.types.reference.Type>read(boolean includeSubtypes)protected voidregisterTypeSchema()voidsetJson(String json)voidsetSkipTypeDefinitionCreation(boolean skipTypeDefinitionCreation)voidsetSkipVersionCheckOnUpdate(boolean skipVersionCheckOnUpdate)voidsetTypeAndTypeName(Class<? extends org.gcube.informationsystem.base.reference.Element> clz)voidsetTypeName(String typeName)Stringupdate()protected voidupdateTypeSchema(org.gcube.informationsystem.types.reference.Type actualTypeDefinition, org.gcube.informationsystem.types.reference.Type newTypeDefinition, org.gcube.informationsystem.base.reference.AccessType baseElementAccessType)
-
-
-
Method Detail
-
isSkipVersionCheckOnUpdate
public boolean isSkipVersionCheckOnUpdate()
-
setSkipVersionCheckOnUpdate
public void setSkipVersionCheckOnUpdate(boolean skipVersionCheckOnUpdate)
-
isSkipTypeDefinitionCreation
public boolean isSkipTypeDefinitionCreation()
-
setSkipTypeDefinitionCreation
public void setSkipTypeDefinitionCreation(boolean skipTypeDefinitionCreation)
-
setJson
public void setJson(String json) throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
-
getOClass
protected com.orientechnologies.orient.core.metadata.schema.OClass getOClass(com.orientechnologies.orient.core.metadata.schema.OSchema oSchema, String typeName) throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaException- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaException
-
setTypeName
public void setTypeName(String typeName)
-
setTypeAndTypeName
public void setTypeAndTypeName(Class<? extends org.gcube.informationsystem.base.reference.Element> clz) throws Exception
- Throws:
Exception
-
getTypeManagement
public static ElementManagement<?,?> getTypeManagement(com.orientechnologies.orient.core.metadata.schema.OClass oClass)
-
getSuperclassesAndCheckCompliancy
protected List<com.orientechnologies.orient.core.metadata.schema.OClass> getSuperclassesAndCheckCompliancy(com.orientechnologies.orient.core.db.document.ODatabaseDocument oDatabaseDocument, org.gcube.informationsystem.types.reference.Type type, String baseType) throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaException, org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaNotFoundException
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaExceptionorg.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaNotFoundException
-
registerTypeSchema
protected void registerTypeSchema() throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaAlreadyPresentException, org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaException- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaAlreadyPresentExceptionorg.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaException
-
updateTypeSchema
protected void updateTypeSchema(org.gcube.informationsystem.types.reference.Type actualTypeDefinition, org.gcube.informationsystem.types.reference.Type newTypeDefinition, org.gcube.informationsystem.base.reference.AccessType baseElementAccessType) throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaException- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaNotFoundExceptionorg.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaException
-
getSchema
protected List<org.gcube.informationsystem.types.reference.Type> getSchema(boolean includeSubtypes) throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaException
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaNotFoundExceptionorg.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaException
-
create
public String create() throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaAlreadyPresentException, org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaException
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaAlreadyPresentExceptionorg.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaException
-
read
public List<org.gcube.informationsystem.types.reference.Type> read(boolean includeSubtypes) throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaException
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaNotFoundExceptionorg.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaException
-
update
public String update() throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaException
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaNotFoundExceptionorg.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaException
-
delete
protected boolean delete(org.gcube.informationsystem.base.reference.AccessType accessType) throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaException, org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaNotFoundException- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaExceptionorg.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaNotFoundException
-
-