Class TypeManagement
java.lang.Object
org.gcube.informationsystem.resourceregistry.types.TypeManagement
- Author:
- Luca Frosini (ISTI - CNR)
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreate()protected booleandelete(org.gcube.informationsystem.base.reference.AccessType accessType) protected com.orientechnologies.orient.core.metadata.schema.OClassprotected 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) org.gcube.informationsystem.types.reference.TypegetType()static ElementManagement<?,?> getTypeManagement(com.orientechnologies.orient.core.metadata.schema.OClass oClass) booleanbooleanList<org.gcube.informationsystem.types.reference.Type>read(boolean includeSubtypes) protected voidvoidvoidsetSkipTypeDefinitionCreation(boolean skipTypeDefinitionCreation) voidsetSkipVersionCheckOnUpdate(boolean skipVersionCheckOnUpdate) voidsetTypeAndTypeName(Class<? extends org.gcube.informationsystem.base.reference.Element> clz) voidsetTypeName(String typeName) update()protected voidupdateTypeSchema(org.gcube.informationsystem.types.reference.Type actualTypeDefinition, org.gcube.informationsystem.types.reference.Type newTypeDefinition, org.gcube.informationsystem.base.reference.AccessType baseElementAccessType)
-
Field Details
-
typeName
-
json
-
type
protected org.gcube.informationsystem.types.reference.Type type -
skipVersionCheckOnUpdate
protected boolean skipVersionCheckOnUpdate -
skipTypeDefinitionCreation
protected boolean skipTypeDefinitionCreation -
typeList
-
-
Constructor Details
-
TypeManagement
public TypeManagement()
-
-
Method Details
-
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
-
getTypeName
-
setTypeName
-
setTypeAndTypeName
public void setTypeAndTypeName(Class<? extends org.gcube.informationsystem.base.reference.Element> clz) throws Exception - Throws:
Exception
-
getType
public org.gcube.informationsystem.types.reference.Type getType() -
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
-