Renaming classes to align the name with the IS model reorganization
This commit is contained in:
parent
241b6269bc
commit
aaaa3915fe
|
@ -21,7 +21,7 @@ import org.gcube.informationsystem.resourceregistry.contexts.relations.IsParentO
|
|||
import org.gcube.informationsystem.resourceregistry.contexts.security.SecurityContext;
|
||||
import org.gcube.informationsystem.resourceregistry.dbinitialization.DatabaseEnvironment;
|
||||
import org.gcube.informationsystem.resourceregistry.instances.base.ElementManagement;
|
||||
import org.gcube.informationsystem.resourceregistry.instances.base.entities.BaseEntityManagement;
|
||||
import org.gcube.informationsystem.resourceregistry.instances.base.entities.EntityElementManagement;
|
||||
import org.gcube.informationsystem.resourceregistry.utils.Utility;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
@ -42,7 +42,7 @@ import com.orientechnologies.orient.core.sql.executor.OResultSet;
|
|||
/**
|
||||
* @author Luca Frosini (ISTI - CNR)
|
||||
*/
|
||||
public class ContextManagement extends BaseEntityManagement<Context> {
|
||||
public class ContextManagement extends EntityElementManagement<Context> {
|
||||
|
||||
private static Logger logger = LoggerFactory.getLogger(ContextManagement.class);
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ import org.gcube.informationsystem.resourceregistry.contexts.ContextUtility;
|
|||
import org.gcube.informationsystem.resourceregistry.contexts.entities.ContextManagement;
|
||||
import org.gcube.informationsystem.resourceregistry.contexts.security.SecurityContext;
|
||||
import org.gcube.informationsystem.resourceregistry.dbinitialization.DatabaseEnvironment;
|
||||
import org.gcube.informationsystem.resourceregistry.instances.base.relations.BaseRelationManagement;
|
||||
import org.gcube.informationsystem.resourceregistry.instances.base.relations.RelationElementManagement;
|
||||
import org.gcube.informationsystem.resourceregistry.utils.Utility;
|
||||
|
||||
import com.fasterxml.jackson.databind.JsonNode;
|
||||
|
@ -25,7 +25,7 @@ import com.orientechnologies.orient.core.record.OVertex;
|
|||
/**
|
||||
* @author Luca Frosini (ISTI - CNR)
|
||||
*/
|
||||
public class IsParentOfManagement extends BaseRelationManagement<ContextManagement,ContextManagement> {
|
||||
public class IsParentOfManagement extends RelationElementManagement<ContextManagement,ContextManagement> {
|
||||
|
||||
public IsParentOfManagement() {
|
||||
super(AccessType.IS_PARENT_OF, Context.class, Context.class);
|
||||
|
|
|
@ -32,7 +32,7 @@ import org.gcube.informationsystem.resourceregistry.contexts.ContextUtility;
|
|||
import org.gcube.informationsystem.resourceregistry.contexts.security.SecurityContext;
|
||||
import org.gcube.informationsystem.resourceregistry.contexts.security.SecurityContext.PermissionMode;
|
||||
import org.gcube.informationsystem.resourceregistry.dbinitialization.DatabaseEnvironment;
|
||||
import org.gcube.informationsystem.resourceregistry.instances.base.properties.BasePropertyManagement;
|
||||
import org.gcube.informationsystem.resourceregistry.instances.base.properties.PropertyElementManagement;
|
||||
import org.gcube.informationsystem.resourceregistry.utils.HeaderOrient;
|
||||
import org.gcube.informationsystem.resourceregistry.utils.HeaderUtility;
|
||||
import org.gcube.informationsystem.resourceregistry.utils.Utility;
|
||||
|
@ -769,7 +769,7 @@ public abstract class ElementManagement<El extends OElement> {
|
|||
|
||||
switch(jsonNodeType) {
|
||||
case OBJECT:
|
||||
return BasePropertyManagement.getPropertyDocument(value);
|
||||
return PropertyElementManagement.getPropertyDocument(value);
|
||||
|
||||
case ARRAY:
|
||||
List<Object> list = new ArrayList<Object>();
|
||||
|
@ -969,7 +969,7 @@ public abstract class ElementManagement<El extends OElement> {
|
|||
|
||||
if(object instanceof ODocument) {
|
||||
ODocument oDocument = (ODocument) object;
|
||||
return BasePropertyManagement.getJsonNode(oDocument);
|
||||
return PropertyElementManagement.getJsonNode(oDocument);
|
||||
}
|
||||
|
||||
if(object instanceof Date) {
|
||||
|
|
|
@ -12,7 +12,7 @@ import org.gcube.informationsystem.resourceregistry.api.exceptions.entity.Entity
|
|||
import org.gcube.informationsystem.resourceregistry.contexts.security.SecurityContext;
|
||||
import org.gcube.informationsystem.resourceregistry.instances.base.ElementManagement;
|
||||
import org.gcube.informationsystem.resourceregistry.instances.base.ElementManagementUtility;
|
||||
import org.gcube.informationsystem.resourceregistry.instances.base.relations.BaseRelationManagement;
|
||||
import org.gcube.informationsystem.resourceregistry.instances.base.relations.RelationElementManagement;
|
||||
import org.gcube.informationsystem.resourceregistry.utils.Utility;
|
||||
|
||||
import com.fasterxml.jackson.databind.JsonNode;
|
||||
|
@ -27,16 +27,16 @@ import com.orientechnologies.orient.core.record.OVertex;
|
|||
/**
|
||||
* @author Luca Frosini (ISTI - CNR)
|
||||
*/
|
||||
public abstract class BaseEntityManagement<E extends EntityElement> extends ElementManagement<OVertex> {
|
||||
public abstract class EntityElementManagement<E extends EntityElement> extends ElementManagement<OVertex> {
|
||||
|
||||
/**
|
||||
* Provide a cache edge-internal-id -> RelationManagement
|
||||
* this avoid to recreate the relationManagement of already visited edges
|
||||
*/
|
||||
@SuppressWarnings("rawtypes")
|
||||
protected Map<String,BaseRelationManagement> relationManagements;
|
||||
protected Map<String,RelationElementManagement> relationManagements;
|
||||
|
||||
protected BaseEntityManagement(AccessType accessType) {
|
||||
protected EntityElementManagement(AccessType accessType) {
|
||||
super(accessType);
|
||||
|
||||
this.ignoreKeys.add(EntityElement.HEADER_PROPERTY);
|
||||
|
@ -50,7 +50,7 @@ public abstract class BaseEntityManagement<E extends EntityElement> extends Elem
|
|||
|
||||
}
|
||||
|
||||
protected BaseEntityManagement(AccessType accessType, SecurityContext workingContext, ODatabaseDocument oDatabaseDocument) {
|
||||
protected EntityElementManagement(AccessType accessType, SecurityContext workingContext, ODatabaseDocument oDatabaseDocument) {
|
||||
this(accessType);
|
||||
this.oDatabaseDocument = oDatabaseDocument;
|
||||
setWorkingContext(workingContext);
|
||||
|
@ -63,9 +63,9 @@ public abstract class BaseEntityManagement<E extends EntityElement> extends Elem
|
|||
* fake id starting with - (minus) sign. This not imply any collateral effect
|
||||
* but a better solution is a desiderata.
|
||||
*/
|
||||
protected BaseRelationManagement getBaseRelationManagement(OEdge edge) throws ResourceRegistryException {
|
||||
protected RelationElementManagement getBaseRelationManagement(OEdge edge) throws ResourceRegistryException {
|
||||
String id = edge.getIdentity().toString();
|
||||
BaseRelationManagement relationManagement = relationManagements.get(id);
|
||||
RelationElementManagement relationManagement = relationManagements.get(id);
|
||||
if(relationManagement == null) {
|
||||
relationManagement = ElementManagementUtility.getRelationManagement(getWorkingContext(), oDatabaseDocument, edge);
|
||||
relationManagements.put(id, relationManagement);
|
||||
|
@ -73,7 +73,7 @@ public abstract class BaseEntityManagement<E extends EntityElement> extends Elem
|
|||
return relationManagement;
|
||||
}
|
||||
|
||||
protected void addToRelationManagement(@SuppressWarnings("rawtypes") BaseRelationManagement baseRelationManagement)
|
||||
protected void addToRelationManagement(@SuppressWarnings("rawtypes") RelationElementManagement baseRelationManagement)
|
||||
throws ResourceRegistryException {
|
||||
OElement elem = baseRelationManagement.getElement();
|
||||
String id = elem.getIdentity().toString();
|
|
@ -29,9 +29,9 @@ import com.orientechnologies.orient.core.record.impl.ODocument;
|
|||
/**
|
||||
* @author Luca Frosini (ISTI - CNR)
|
||||
*/
|
||||
public class BasePropertyManagement {
|
||||
public class PropertyElementManagement {
|
||||
|
||||
private static Logger logger = LoggerFactory.getLogger(BasePropertyManagement.class);
|
||||
private static Logger logger = LoggerFactory.getLogger(PropertyElementManagement.class);
|
||||
|
||||
public static final Set<String> PROPERTY_IGNORE_KEYS;
|
||||
public static final Set<String> PROPERTY_IGNORE_START_WITH_KEYS;
|
|
@ -10,7 +10,7 @@ import org.gcube.informationsystem.resourceregistry.api.exceptions.relation.Rela
|
|||
import org.gcube.informationsystem.resourceregistry.api.exceptions.schema.SchemaException;
|
||||
import org.gcube.informationsystem.resourceregistry.contexts.security.SecurityContext;
|
||||
import org.gcube.informationsystem.resourceregistry.instances.base.ElementManagement;
|
||||
import org.gcube.informationsystem.resourceregistry.instances.base.entities.BaseEntityManagement;
|
||||
import org.gcube.informationsystem.resourceregistry.instances.base.entities.EntityElementManagement;
|
||||
import org.gcube.informationsystem.resourceregistry.instances.model.entities.FacetManagement;
|
||||
import org.gcube.informationsystem.resourceregistry.utils.Utility;
|
||||
|
||||
|
@ -24,7 +24,7 @@ import com.orientechnologies.orient.core.record.OVertex;
|
|||
/**
|
||||
* @author Luca Frosini (ISTI - CNR)
|
||||
*/
|
||||
public abstract class BaseRelationManagement<SEM extends BaseEntityManagement<? extends EntityElement>, TEM extends BaseEntityManagement<? extends EntityElement>>
|
||||
public abstract class RelationElementManagement<SEM extends EntityElementManagement<? extends EntityElement>, TEM extends EntityElementManagement<? extends EntityElement>>
|
||||
extends ElementManagement<OEdge> {
|
||||
|
||||
protected final Class<? extends EntityElement> sourceEntityClass;
|
||||
|
@ -33,7 +33,7 @@ public abstract class BaseRelationManagement<SEM extends BaseEntityManagement<?
|
|||
protected SEM sourceEntityManagement;
|
||||
protected TEM targetEntityManagement;
|
||||
|
||||
protected BaseRelationManagement(AccessType accessType, Class<? extends EntityElement> sourceEntityClass, Class<? extends EntityElement> targetEntityClass) {
|
||||
protected RelationElementManagement(AccessType accessType, Class<? extends EntityElement> sourceEntityClass, Class<? extends EntityElement> targetEntityClass) {
|
||||
super(accessType);
|
||||
|
||||
this.ignoreKeys.add(Relation.HEADER_PROPERTY);
|
||||
|
@ -51,7 +51,7 @@ public abstract class BaseRelationManagement<SEM extends BaseEntityManagement<?
|
|||
this.targetEntityManagement = null;
|
||||
}
|
||||
|
||||
protected BaseRelationManagement(AccessType accessType, Class<? extends EntityElement> sourceEntityClass, Class<? extends EntityElement> targetEntityClass, SecurityContext workingContext, ODatabaseDocument orientGraph) {
|
||||
protected RelationElementManagement(AccessType accessType, Class<? extends EntityElement> sourceEntityClass, Class<? extends EntityElement> targetEntityClass, SecurityContext workingContext, ODatabaseDocument orientGraph) {
|
||||
this(accessType, sourceEntityClass, targetEntityClass);
|
||||
this.oDatabaseDocument = orientGraph;
|
||||
setWorkingContext(workingContext);
|
||||
|
@ -100,12 +100,12 @@ public abstract class BaseRelationManagement<SEM extends BaseEntityManagement<?
|
|||
|
||||
try {
|
||||
if(includeSource) {
|
||||
BaseEntityManagement<? extends EntityElement> sourceEntityManagement = getSourceEntityManagement();
|
||||
EntityElementManagement<? extends EntityElement> sourceEntityManagement = getSourceEntityManagement();
|
||||
((ObjectNode) relation).replace(Relation.SOURCE_PROPERTY, sourceEntityManagement.serializeSelfOnly());
|
||||
}
|
||||
|
||||
if(includeTarget) {
|
||||
BaseEntityManagement<? extends EntityElement> targetEntityManagement = getTargetEntityManagement();
|
||||
EntityElementManagement<? extends EntityElement> targetEntityManagement = getTargetEntityManagement();
|
||||
((ObjectNode) relation).replace(Relation.TARGET_PROPERTY, targetEntityManagement.serializeAsJson());
|
||||
}
|
||||
|
|
@ -24,7 +24,7 @@ import org.gcube.informationsystem.resourceregistry.contexts.security.SecurityCo
|
|||
import org.gcube.informationsystem.resourceregistry.contexts.security.SecurityContext.PermissionMode;
|
||||
import org.gcube.informationsystem.resourceregistry.instances.base.ElementManagement;
|
||||
import org.gcube.informationsystem.resourceregistry.instances.base.ElementManagementUtility;
|
||||
import org.gcube.informationsystem.resourceregistry.instances.base.entities.BaseEntityManagement;
|
||||
import org.gcube.informationsystem.resourceregistry.instances.base.entities.EntityElementManagement;
|
||||
import org.gcube.informationsystem.resourceregistry.instances.model.relations.RelationManagement;
|
||||
import org.gcube.informationsystem.resourceregistry.utils.Utility;
|
||||
|
||||
|
@ -46,7 +46,7 @@ import com.orientechnologies.orient.core.sql.executor.OResultSet;
|
|||
/**
|
||||
* @author Luca Frosini (ISTI - CNR)
|
||||
*/
|
||||
public abstract class EntityManagement<E extends EntityElement> extends BaseEntityManagement<E> {
|
||||
public abstract class EntityManagement<E extends EntityElement> extends EntityElementManagement<E> {
|
||||
|
||||
/**
|
||||
* Provide a cache edge-internal-id -> RelationManagement
|
||||
|
|
|
@ -22,7 +22,7 @@ import org.gcube.informationsystem.resourceregistry.contexts.security.SecurityCo
|
|||
import org.gcube.informationsystem.resourceregistry.contexts.security.SecurityContext.PermissionMode;
|
||||
import org.gcube.informationsystem.resourceregistry.instances.base.ElementManagement;
|
||||
import org.gcube.informationsystem.resourceregistry.instances.base.ElementManagementUtility;
|
||||
import org.gcube.informationsystem.resourceregistry.instances.base.relations.BaseRelationManagement;
|
||||
import org.gcube.informationsystem.resourceregistry.instances.base.relations.RelationElementManagement;
|
||||
import org.gcube.informationsystem.resourceregistry.instances.model.entities.EntityManagement;
|
||||
import org.gcube.informationsystem.resourceregistry.instances.model.entities.FacetManagement;
|
||||
import org.gcube.informationsystem.resourceregistry.instances.model.entities.ResourceManagement;
|
||||
|
@ -46,7 +46,7 @@ import com.orientechnologies.orient.core.record.impl.ODocument;
|
|||
* @author Luca Frosini (ISTI - CNR)
|
||||
*/
|
||||
public abstract class RelationManagement<T extends EntityManagement<? extends Entity>>
|
||||
extends BaseRelationManagement<ResourceManagement, T>{
|
||||
extends RelationElementManagement<ResourceManagement, T>{
|
||||
|
||||
public final PropagationConstraint defaultPropagationConstraint;
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ import org.gcube.informationsystem.resourceregistry.contexts.ContextUtility;
|
|||
import org.gcube.informationsystem.resourceregistry.contexts.security.SecurityContext;
|
||||
import org.gcube.informationsystem.resourceregistry.dbinitialization.DatabaseEnvironment;
|
||||
import org.gcube.informationsystem.resourceregistry.instances.base.ElementManagement;
|
||||
import org.gcube.informationsystem.resourceregistry.instances.base.entities.BaseEntityManagement;
|
||||
import org.gcube.informationsystem.resourceregistry.instances.base.entities.EntityElementManagement;
|
||||
import org.gcube.informationsystem.resourceregistry.utils.Utility;
|
||||
import org.gcube.informationsystem.types.TypeBinder;
|
||||
import org.gcube.informationsystem.types.reference.entities.EntityType;
|
||||
|
@ -28,7 +28,7 @@ import com.orientechnologies.orient.core.record.OVertex;
|
|||
import com.orientechnologies.orient.core.sql.executor.OResult;
|
||||
import com.orientechnologies.orient.core.sql.executor.OResultSet;
|
||||
|
||||
public abstract class EntityTypeDefinitionManagement<E extends EntityType> extends BaseEntityManagement<E> {
|
||||
public abstract class EntityTypeDefinitionManagement<E extends EntityType> extends EntityElementManagement<E> {
|
||||
|
||||
private static Logger logger = LoggerFactory.getLogger(EntityTypeDefinitionManagement.class);
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ import org.gcube.informationsystem.resourceregistry.contexts.ContextUtility;
|
|||
import org.gcube.informationsystem.resourceregistry.contexts.security.SecurityContext;
|
||||
import org.gcube.informationsystem.resourceregistry.dbinitialization.DatabaseEnvironment;
|
||||
import org.gcube.informationsystem.resourceregistry.instances.base.ElementManagement;
|
||||
import org.gcube.informationsystem.resourceregistry.instances.base.relations.BaseRelationManagement;
|
||||
import org.gcube.informationsystem.resourceregistry.instances.base.relations.RelationElementManagement;
|
||||
import org.gcube.informationsystem.resourceregistry.types.entities.EntityTypeDefinitionManagement;
|
||||
import org.gcube.informationsystem.resourceregistry.types.entities.ResourceTypeDefinitionManagement;
|
||||
import org.gcube.informationsystem.resourceregistry.utils.Utility;
|
||||
|
@ -31,7 +31,7 @@ import com.orientechnologies.orient.core.sql.executor.OResult;
|
|||
import com.orientechnologies.orient.core.sql.executor.OResultSet;
|
||||
|
||||
public abstract class RelationTypeDefinitionManagement<T extends EntityTypeDefinitionManagement<TT>, TT extends EntityType>
|
||||
extends BaseRelationManagement<ResourceTypeDefinitionManagement, T> {
|
||||
extends RelationElementManagement<ResourceTypeDefinitionManagement, T> {
|
||||
|
||||
protected String name;
|
||||
|
||||
|
|
Loading…
Reference in New Issue