From f14061774d508128e4d15071edee34d0e7d6872a Mon Sep 17 00:00:00 2001 From: Luca Frosini Date: Tue, 5 Nov 2019 09:28:55 +0100 Subject: [PATCH] Refactoring servcie --- .../resourceregistry/instances/base/ERManagement.java | 2 +- .../instances/base/entities/BaseEntityManagement.java | 2 +- .../instances/base/relations/BaseRelationManagement.java | 2 +- .../instances/type/SchemaManagementImpl.java | 3 --- .../type/properties/PropertyTypeDefinitionManagement.java | 5 +++++ 5 files changed, 8 insertions(+), 6 deletions(-) create mode 100644 src/main/java/org/gcube/informationsystem/resourceregistry/instances/type/properties/PropertyTypeDefinitionManagement.java diff --git a/src/main/java/org/gcube/informationsystem/resourceregistry/instances/base/ERManagement.java b/src/main/java/org/gcube/informationsystem/resourceregistry/instances/base/ERManagement.java index 26eea33..decec1e 100644 --- a/src/main/java/org/gcube/informationsystem/resourceregistry/instances/base/ERManagement.java +++ b/src/main/java/org/gcube/informationsystem/resourceregistry/instances/base/ERManagement.java @@ -63,7 +63,7 @@ import com.tinkerpop.blueprints.util.StringFactory; /** * @author Luca Frosini (ISTI - CNR) */ -public abstract class ERManagement { +public abstract class ERManagement { protected Logger logger = LoggerFactory.getLogger(this.getClass()); diff --git a/src/main/java/org/gcube/informationsystem/resourceregistry/instances/base/entities/BaseEntityManagement.java b/src/main/java/org/gcube/informationsystem/resourceregistry/instances/base/entities/BaseEntityManagement.java index bb72fc9..7ed4d6b 100644 --- a/src/main/java/org/gcube/informationsystem/resourceregistry/instances/base/entities/BaseEntityManagement.java +++ b/src/main/java/org/gcube/informationsystem/resourceregistry/instances/base/entities/BaseEntityManagement.java @@ -28,7 +28,7 @@ import com.tinkerpop.blueprints.impls.orient.OrientVertex; /** * @author Luca Frosini (ISTI - CNR) */ -public abstract class BaseEntityManagement extends ERManagement { +public abstract class BaseEntityManagement extends ERManagement { /** * Provide a cache edge-internal-id -> RelationManagement diff --git a/src/main/java/org/gcube/informationsystem/resourceregistry/instances/base/relations/BaseRelationManagement.java b/src/main/java/org/gcube/informationsystem/resourceregistry/instances/base/relations/BaseRelationManagement.java index b144c09..f97b360 100644 --- a/src/main/java/org/gcube/informationsystem/resourceregistry/instances/base/relations/BaseRelationManagement.java +++ b/src/main/java/org/gcube/informationsystem/resourceregistry/instances/base/relations/BaseRelationManagement.java @@ -27,7 +27,7 @@ import com.tinkerpop.blueprints.impls.orient.OrientGraph; * @author Luca Frosini (ISTI - CNR) */ public abstract class BaseRelationManagement, SEM extends BaseEntityManagement, TEM extends BaseEntityManagement, S extends BaseEntity, T extends BaseEntity> - extends ERManagement { + extends ERManagement { protected final Class sourceEntityClass; protected final Class targetEntityClass; diff --git a/src/main/java/org/gcube/informationsystem/resourceregistry/instances/type/SchemaManagementImpl.java b/src/main/java/org/gcube/informationsystem/resourceregistry/instances/type/SchemaManagementImpl.java index 0db41ad..5c5d744 100644 --- a/src/main/java/org/gcube/informationsystem/resourceregistry/instances/type/SchemaManagementImpl.java +++ b/src/main/java/org/gcube/informationsystem/resourceregistry/instances/type/SchemaManagementImpl.java @@ -140,8 +140,6 @@ public class SchemaManagementImpl implements SchemaManagement { } protected static TypeDefinition getTypeDefinition(OClass oClass) throws SchemaException { - // TODO OrientSerilizatoin is not acceptable anymore since TypeDefiniton introduction - ODocument oDocument = ((OClassImpl) oClass).toStream(); String json = oDocument.toJSON(); try { @@ -156,7 +154,6 @@ public class SchemaManagementImpl implements SchemaManagement { node.put(ISManageable.CLASS_PROPERTY, RelationTypeDefinition.NAME); } - ArrayNode arrayNode = (ArrayNode) node.get(TypeDefinition.PROPERTIES_PROPERTY); Iterator iterator = arrayNode.iterator(); while(iterator.hasNext()) { diff --git a/src/main/java/org/gcube/informationsystem/resourceregistry/instances/type/properties/PropertyTypeDefinitionManagement.java b/src/main/java/org/gcube/informationsystem/resourceregistry/instances/type/properties/PropertyTypeDefinitionManagement.java new file mode 100644 index 0000000..7d3fb07 --- /dev/null +++ b/src/main/java/org/gcube/informationsystem/resourceregistry/instances/type/properties/PropertyTypeDefinitionManagement.java @@ -0,0 +1,5 @@ +package org.gcube.informationsystem.resourceregistry.instances.type.properties; + +public class PropertyTypeDefinitionManagement { + +}