diff --git a/src/main/java/org/gcube/informationsystem/resourceregistry/contexts/ContextUtility.java b/src/main/java/org/gcube/informationsystem/resourceregistry/contexts/ContextUtility.java index 67b96de..0323d35 100644 --- a/src/main/java/org/gcube/informationsystem/resourceregistry/contexts/ContextUtility.java +++ b/src/main/java/org/gcube/informationsystem/resourceregistry/contexts/ContextUtility.java @@ -17,8 +17,8 @@ import org.gcube.informationsystem.resourceregistry.contexts.security.AdminSecur import org.gcube.informationsystem.resourceregistry.contexts.security.SecurityContext; import org.gcube.informationsystem.resourceregistry.contexts.security.SecurityContext.PermissionMode; import org.gcube.informationsystem.resourceregistry.instances.base.ElementManagementUtility; +import org.gcube.informationsystem.resourceregistry.utils.OrientDBUtility; import org.gcube.informationsystem.resourceregistry.utils.UUIDUtility; -import org.gcube.informationsystem.resourceregistry.utils.Utility; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -167,7 +167,7 @@ public class ContextUtility { ODatabaseDocument oDatabaseDocument = null; try { oDatabaseDocument = getAdminSecurityContext().getDatabaseDocument(PermissionMode.READER); - OVertex oVertex = Utility.getElementByUUID(oDatabaseDocument, Context.NAME, uuid, + OVertex oVertex = OrientDBUtility.getElementByUUID(oDatabaseDocument, Context.NAME, uuid, OVertex.class); return oVertex; } finally { @@ -235,7 +235,7 @@ public class ContextUtility { OResult oResult = resultSet.next(); OVertex context = ElementManagementUtility.getElementFromOptional(oResult.getVertex()); - logger.trace("Context Representing Vertex : {}", Utility.toJsonString(context, true)); + logger.trace("Context Representing Vertex : {}", OrientDBUtility.getAsStringForLogging(context)); if(resultSet.hasNext()) { throw new ContextNotFoundException("Found more than one context with name " + name diff --git a/src/main/java/org/gcube/informationsystem/resourceregistry/contexts/entities/ContextManagement.java b/src/main/java/org/gcube/informationsystem/resourceregistry/contexts/entities/ContextManagement.java index 6586881..aadcaf6 100644 --- a/src/main/java/org/gcube/informationsystem/resourceregistry/contexts/entities/ContextManagement.java +++ b/src/main/java/org/gcube/informationsystem/resourceregistry/contexts/entities/ContextManagement.java @@ -33,7 +33,7 @@ import org.gcube.informationsystem.resourceregistry.contexts.security.SecurityCo import org.gcube.informationsystem.resourceregistry.instances.base.entities.EntityElementManagement; import org.gcube.informationsystem.resourceregistry.queries.operators.QueryConditionalOperator; import org.gcube.informationsystem.resourceregistry.queries.operators.QueryLogicalOperator; -import org.gcube.informationsystem.resourceregistry.utils.Utility; +import org.gcube.informationsystem.resourceregistry.utils.OrientDBUtility; import org.gcube.informationsystem.serialization.ElementMapper; import org.gcube.informationsystem.types.reference.entities.EntityType; import org.gcube.informationsystem.utils.UUIDManager; @@ -193,7 +193,7 @@ public class ContextManagement extends EntityElementManagement { if(uuid == null) { throw new NotFoundException("null UUID does not allow to retrieve the Element"); } - return Utility.getElementByUUID(oDatabaseDocument, typeName == null ? accessType.getName() : typeName, uuid, + return OrientDBUtility.getElementByUUID(oDatabaseDocument, typeName == null ? accessType.getName() : typeName, uuid, elementClass); } catch(NotFoundException e) { throw getSpecificNotFoundException(e); @@ -560,7 +560,7 @@ public abstract class ElementManagement { public El retrieveElementFromAnyContext() throws NotFoundException, ResourceRegistryException { try { - return Utility.getElementByUUIDAsAdmin(typeName == null ? accessType.getName() : typeName, uuid, + return OrientDBUtility.getElementByUUIDAsAdmin(typeName == null ? accessType.getName() : typeName, uuid, elementClass); } catch(NotFoundException e) { throw getSpecificNotFoundException(e); @@ -1141,7 +1141,7 @@ public abstract class ElementManagement { if(key.compareTo(IdentifiableElement.METADATA_PROPERTY) == 0) { // Keeping the metadata MetadataOrient metadataOrient = MetadataUtility.getMetadataOrient((ODocument) object); - JsonNode metadataJson = Utility.toJsonNode(metadataOrient, false); + JsonNode metadataJson = OrientDBUtility.toJsonNode(metadataOrient); if(ContextUtility.getIncludeInstanceContexts().get()) { ((ObjectNode) metadataJson).set(Metadata.__CONTEXTS, getContextsAsObjectNode()); } diff --git a/src/main/java/org/gcube/informationsystem/resourceregistry/instances/base/ElementManagementUtility.java b/src/main/java/org/gcube/informationsystem/resourceregistry/instances/base/ElementManagementUtility.java index 81e4796..c3d227c 100644 --- a/src/main/java/org/gcube/informationsystem/resourceregistry/instances/base/ElementManagementUtility.java +++ b/src/main/java/org/gcube/informationsystem/resourceregistry/instances/base/ElementManagementUtility.java @@ -20,7 +20,7 @@ import org.gcube.informationsystem.resourceregistry.instances.model.relations.Co import org.gcube.informationsystem.resourceregistry.instances.model.relations.IsRelatedToManagement; import org.gcube.informationsystem.resourceregistry.instances.model.relations.RelationManagement; import org.gcube.informationsystem.resourceregistry.types.TypesCache; -import org.gcube.informationsystem.resourceregistry.utils.Utility; +import org.gcube.informationsystem.resourceregistry.utils.OrientDBUtility; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -81,9 +81,9 @@ public class ElementManagementUtility { public static OElement getAnyElementByUUID(UUID uuid) throws NotFoundException, ResourceRegistryException { try { - return Utility.getElementByUUIDAsAdmin(null, uuid, OVertex.class); + return OrientDBUtility.getElementByUUIDAsAdmin(null, uuid, OVertex.class); } catch(NotFoundException e) { - return Utility.getElementByUUIDAsAdmin(null, uuid, OEdge.class); + return OrientDBUtility.getElementByUUIDAsAdmin(null, uuid, OEdge.class); } catch(ResourceRegistryException e) { throw e; } catch(Exception e) { @@ -94,9 +94,9 @@ public class ElementManagementUtility { public static OElement getAnyElementByUUID(ODatabaseDocument oDatabaseDocument, UUID uuid) throws NotFoundException, ResourceRegistryException { try { - return Utility.getElementByUUID(oDatabaseDocument, null, uuid, OVertex.class); + return OrientDBUtility.getElementByUUID(oDatabaseDocument, null, uuid, OVertex.class); } catch(NotFoundException e) { - return Utility.getElementByUUID(oDatabaseDocument, null, uuid, OEdge.class); + return OrientDBUtility.getElementByUUID(oDatabaseDocument, null, uuid, OEdge.class); } catch(ResourceRegistryException e) { throw e; } catch(Exception e) { @@ -121,12 +121,12 @@ public class ElementManagementUtility { if(oDatabaseDocument == null) { throw new ResourceRegistryException( - ODatabaseDocument.class.getSimpleName() + "instance is null. " + Utility.SHOULD_NOT_OCCUR_ERROR_MESSAGE); + ODatabaseDocument.class.getSimpleName() + "instance is null. " + OrientDBUtility.SHOULD_NOT_OCCUR_ERROR_MESSAGE); } if(vertex == null) { throw new ResourceRegistryException( - OVertex.class.getSimpleName() + "instance is null. " + Utility.SHOULD_NOT_OCCUR_ERROR_MESSAGE); + OVertex.class.getSimpleName() + "instance is null. " + OrientDBUtility.SHOULD_NOT_OCCUR_ERROR_MESSAGE); } OClass oClass = null; @@ -134,7 +134,7 @@ public class ElementManagementUtility { oClass = ElementManagementUtility.getOClass(vertex); } catch(Exception e) { String error = String.format("Unable to detect type of %s. %s", vertex.toString(), - Utility.SHOULD_NOT_OCCUR_ERROR_MESSAGE); + OrientDBUtility.SHOULD_NOT_OCCUR_ERROR_MESSAGE); logger.error(error, e); throw new ResourceRegistryException(error); } @@ -146,7 +146,7 @@ public class ElementManagementUtility { entityManagement = new FacetManagement(); } else { String error = String.format("{%s is not a %s nor a %s. %s", vertex, Resource.NAME, Facet.NAME, - Utility.SHOULD_NOT_OCCUR_ERROR_MESSAGE); + OrientDBUtility.SHOULD_NOT_OCCUR_ERROR_MESSAGE); throw new ResourceRegistryException(error); } entityManagement.setODatabaseDocument(oDatabaseDocument); @@ -160,12 +160,12 @@ public class ElementManagementUtility { if(oDatabaseDocument == null) { throw new ResourceRegistryException( - ODatabaseDocument.class.getSimpleName() + "instance is null. " + Utility.SHOULD_NOT_OCCUR_ERROR_MESSAGE); + ODatabaseDocument.class.getSimpleName() + "instance is null. " + OrientDBUtility.SHOULD_NOT_OCCUR_ERROR_MESSAGE); } if(edge == null) { throw new ResourceRegistryException( - OEdge.class.getSimpleName() + "instance is null. " + Utility.SHOULD_NOT_OCCUR_ERROR_MESSAGE); + OEdge.class.getSimpleName() + "instance is null. " + OrientDBUtility.SHOULD_NOT_OCCUR_ERROR_MESSAGE); } OClass oClass = ElementManagementUtility.getOClass(edge); @@ -177,7 +177,7 @@ public class ElementManagementUtility { relationManagement = new IsRelatedToManagement(); } else { String error = String.format("{%s is not a %s nor a %s. %s", edge, ConsistsOf.NAME, IsRelatedTo.NAME, - Utility.SHOULD_NOT_OCCUR_ERROR_MESSAGE); + OrientDBUtility.SHOULD_NOT_OCCUR_ERROR_MESSAGE); throw new ResourceRegistryException(error); } diff --git a/src/main/java/org/gcube/informationsystem/resourceregistry/instances/base/entities/EntityElementManagement.java b/src/main/java/org/gcube/informationsystem/resourceregistry/instances/base/entities/EntityElementManagement.java index cb0c82c..0af2d67 100644 --- a/src/main/java/org/gcube/informationsystem/resourceregistry/instances/base/entities/EntityElementManagement.java +++ b/src/main/java/org/gcube/informationsystem/resourceregistry/instances/base/entities/EntityElementManagement.java @@ -18,7 +18,7 @@ import org.gcube.informationsystem.resourceregistry.contexts.security.SecurityCo import org.gcube.informationsystem.resourceregistry.instances.base.ElementManagement; import org.gcube.informationsystem.resourceregistry.instances.base.ElementManagementUtility; import org.gcube.informationsystem.resourceregistry.instances.base.relations.RelationElementManagement; -import org.gcube.informationsystem.resourceregistry.utils.Utility; +import org.gcube.informationsystem.resourceregistry.utils.OrientDBUtility; import org.gcube.informationsystem.types.reference.entities.EntityType; import com.orientechnologies.orient.core.db.document.ODatabaseDocument; @@ -85,7 +85,7 @@ public abstract class EntityElementManagement errorMessage.append(" point to the same "); errorMessage.append(elem.getClass().getSimpleName()); errorMessage.append(". "); - errorMessage.append(Utility.SHOULD_NOT_OCCUR_ERROR_MESSAGE); + errorMessage.append(OrientDBUtility.SHOULD_NOT_OCCUR_ERROR_MESSAGE); throw new ResourceRegistryException(errorMessage.toString()); } relationManagements.put(id, relationManagement); @@ -284,7 +284,7 @@ public abstract class EntityManagement } logger.debug("Created {} is {}", OVertex.class.getSimpleName(), - Utility.toJsonString((OVertex) element, true)); + OrientDBUtility.getAsStringForLogging((OVertex) element)); return element; } catch(ResourceRegistryException e) { @@ -505,7 +505,7 @@ public abstract class EntityManagement arrayNode.add(jsonNode); } catch(ResourceRegistryException e) { logger.error("Unable to correctly serialize {}. It will be excluded from results. {}", - vertex.toString(), Utility.SHOULD_NOT_OCCUR_ERROR_MESSAGE); + vertex.toString(), OrientDBUtility.SHOULD_NOT_OCCUR_ERROR_MESSAGE); } } try { @@ -694,7 +694,7 @@ public abstract class EntityManagement arrayNode.add(node); } catch(ResourceRegistryException e) { logger.error("Unable to correctly serialize {}. It will be excluded from results. {}", - vertex.toString(), Utility.SHOULD_NOT_OCCUR_ERROR_MESSAGE); + vertex.toString(), OrientDBUtility.SHOULD_NOT_OCCUR_ERROR_MESSAGE); } } } @@ -722,7 +722,7 @@ public abstract class EntityManagement * SELECT FROM (TRAVERSE inE('isIdentifiedBy'), outV('EService') FROM (SELECT * FROM SoftwareFacet WHERE group='VREManagement' AND name='SmartExecutor')) * - * WHERE @class='EService' // Only is not polymorphic + * WHERE type='EService' // Only is not polymorphic */ StringBuilder selectStringBuilder = new StringBuilder("SELECT FROM (TRAVERSE "); @@ -753,7 +753,7 @@ public abstract class EntityManagement selectStringBuilder.append(" ))"); if(!polymorphic) { - selectStringBuilder.append(" WHERE @class='"); + selectStringBuilder.append(" WHERE type='"); selectStringBuilder.append(typeName); selectStringBuilder.append("'"); } @@ -776,7 +776,7 @@ public abstract class EntityManagement oClass = ElementManagementUtility.getOClass(element); } catch(Exception e) { String error = String.format("Unable to detect type of %s. %s", element.toString(), - Utility.SHOULD_NOT_OCCUR_ERROR_MESSAGE); + OrientDBUtility.SHOULD_NOT_OCCUR_ERROR_MESSAGE); logger.error(error, e); throw new ResourceRegistryException(error); } @@ -802,7 +802,7 @@ public abstract class EntityManagement arrayNode.add(jsonNode); } catch(ResourceRegistryException e) { logger.error("Unable to correctly serialize {}. It will be excluded from results. {}", - vertex.toString(), Utility.SHOULD_NOT_OCCUR_ERROR_MESSAGE); + vertex.toString(), OrientDBUtility.SHOULD_NOT_OCCUR_ERROR_MESSAGE); } } diff --git a/src/main/java/org/gcube/informationsystem/resourceregistry/instances/model/entities/ResourceManagement.java b/src/main/java/org/gcube/informationsystem/resourceregistry/instances/model/entities/ResourceManagement.java index f53f16e..dc565f7 100644 --- a/src/main/java/org/gcube/informationsystem/resourceregistry/instances/model/entities/ResourceManagement.java +++ b/src/main/java/org/gcube/informationsystem/resourceregistry/instances/model/entities/ResourceManagement.java @@ -32,7 +32,7 @@ import org.gcube.informationsystem.resourceregistry.instances.model.relations.Is import org.gcube.informationsystem.resourceregistry.instances.model.relations.RelationManagement; import org.gcube.informationsystem.resourceregistry.types.CachedType; import org.gcube.informationsystem.resourceregistry.types.TypesCache; -import org.gcube.informationsystem.resourceregistry.utils.Utility; +import org.gcube.informationsystem.resourceregistry.utils.OrientDBUtility; import org.gcube.informationsystem.types.reference.entities.ResourceType; import org.gcube.informationsystem.types.reference.properties.LinkedEntity; @@ -104,7 +104,7 @@ public class ResourceManagement extends EntityManagement errorMessage.append("SourceEntityManagement for "); errorMessage.append(relationManagement.getClass().getSimpleName()); errorMessage.append(" is not the one expected. "); - errorMessage.append(Utility.SHOULD_NOT_OCCUR_ERROR_MESSAGE); + errorMessage.append(OrientDBUtility.SHOULD_NOT_OCCUR_ERROR_MESSAGE); throw new ResourceRegistryException(errorMessage.toString()); } @@ -114,10 +114,10 @@ public class ResourceManagement extends EntityManagement JsonNode consistsOf = relationManagement.serializeAsJsonNode(); sourceResource = addConsistsOf(sourceResource, consistsOf); } catch(ResourceRegistryException e) { - logger.error("Unable to correctly serialize {}. {}", edge, Utility.SHOULD_NOT_OCCUR_ERROR_MESSAGE); + logger.error("Unable to correctly serialize {}. {}", edge, OrientDBUtility.SHOULD_NOT_OCCUR_ERROR_MESSAGE); throw e; } catch(Exception e) { - logger.error("Unable to correctly serialize {}. {}", edge, Utility.SHOULD_NOT_OCCUR_ERROR_MESSAGE); + logger.error("Unable to correctly serialize {}. {}", edge, OrientDBUtility.SHOULD_NOT_OCCUR_ERROR_MESSAGE); throw new ResourceRegistryException(e); } @@ -234,8 +234,8 @@ public class ResourceManagement extends EntityManagement } else if(oClass.isSubClassOf(ConsistsOf.NAME)) { relationManagement = new ConsistsOfManagement(); } else { - logger.warn("{} is not a {} nor a {}. {}", Utility.toJsonString(edge, true), IsRelatedTo.NAME, - ConsistsOf.NAME, Utility.SHOULD_NOT_OCCUR_ERROR_MESSAGE); + logger.warn("{} is not a {} nor a {}. {}", OrientDBUtility.getAsStringForLogging(edge), IsRelatedTo.NAME, + ConsistsOf.NAME, OrientDBUtility.SHOULD_NOT_OCCUR_ERROR_MESSAGE); } if(relationManagement != null) { relationManagement.setWorkingContext(getWorkingContext()); diff --git a/src/main/java/org/gcube/informationsystem/resourceregistry/instances/model/relations/IsRelatedToManagement.java b/src/main/java/org/gcube/informationsystem/resourceregistry/instances/model/relations/IsRelatedToManagement.java index 0a3350a..bed921f 100644 --- a/src/main/java/org/gcube/informationsystem/resourceregistry/instances/model/relations/IsRelatedToManagement.java +++ b/src/main/java/org/gcube/informationsystem/resourceregistry/instances/model/relations/IsRelatedToManagement.java @@ -19,7 +19,7 @@ import org.gcube.informationsystem.resourceregistry.api.exceptions.relations.isr import org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException; import org.gcube.informationsystem.resourceregistry.instances.base.entities.EntityElementManagement; import org.gcube.informationsystem.resourceregistry.instances.model.entities.ResourceManagement; -import org.gcube.informationsystem.resourceregistry.utils.Utility; +import org.gcube.informationsystem.resourceregistry.utils.OrientDBUtility; import org.gcube.informationsystem.types.reference.entities.EntityType; import org.gcube.informationsystem.types.reference.entities.ResourceType; @@ -88,10 +88,10 @@ public class IsRelatedToManagement extends RelationManagement erManagement = ElementManagementUtility.getERManagement(securityContext, oDatabaseDocument, element); - // To support polymorphism we do not include @class="TypeName" in query. So we need post processing filtering of results + // To support polymorphism we do not include ="TypeName" in query. So we need post processing filtering of results String requestedType = entryPoint.getType(); String gotType = erManagement.getTypeName(); @@ -157,7 +157,7 @@ public class JsonQuery { } catch(ResourceRegistryException e) { logger.error("Unable to correctly serialize {}. It will be excluded from results. {}", - element.toString(), Utility.SHOULD_NOT_OCCUR_ERROR_MESSAGE); + element.toString(), OrientDBUtility.SHOULD_NOT_OCCUR_ERROR_MESSAGE); } } diff --git a/src/main/java/org/gcube/informationsystem/resourceregistry/queries/json/base/entities/JsonQueryFacet.java b/src/main/java/org/gcube/informationsystem/resourceregistry/queries/json/base/entities/JsonQueryFacet.java index 4e94d47..7476f9c 100644 --- a/src/main/java/org/gcube/informationsystem/resourceregistry/queries/json/base/entities/JsonQueryFacet.java +++ b/src/main/java/org/gcube/informationsystem/resourceregistry/queries/json/base/entities/JsonQueryFacet.java @@ -61,7 +61,7 @@ public class JsonQueryFacet extends JsonQueryEntity { newBuffer.append(")"); } - // Size 1 means that only '@class' property is present + // Size 1 means that only 'type' property is present if(size > 1) { newBuffer.append(" WHERE "); newBuffer.append(addConstraints(jsonNode, null, null)); diff --git a/src/main/java/org/gcube/informationsystem/resourceregistry/queries/json/base/relations/JsonQueryConsistsOf.java b/src/main/java/org/gcube/informationsystem/resourceregistry/queries/json/base/relations/JsonQueryConsistsOf.java index 2edb7a4..6f449c6 100644 --- a/src/main/java/org/gcube/informationsystem/resourceregistry/queries/json/base/relations/JsonQueryConsistsOf.java +++ b/src/main/java/org/gcube/informationsystem/resourceregistry/queries/json/base/relations/JsonQueryConsistsOf.java @@ -79,7 +79,7 @@ public class JsonQueryConsistsOf extends JsonQueryRelation { consistsOfBuffer.append(stringBuffer); consistsOfBuffer.append(")"); // Close ) 2 - // Size 2 means that only '@class' and 'target' properties are present + // Size 2 means that only 'type' and 'target' properties are present if(size > 2) { consistsOfBuffer.append(") WHERE "); // Close ) SELECT consistsOfBuffer.append(addConstraints(jsonNode, null, null)); diff --git a/src/main/java/org/gcube/informationsystem/resourceregistry/queries/json/base/relations/JsonQueryIsRelatedTo.java b/src/main/java/org/gcube/informationsystem/resourceregistry/queries/json/base/relations/JsonQueryIsRelatedTo.java index a800e6c..b0ff7b5 100644 --- a/src/main/java/org/gcube/informationsystem/resourceregistry/queries/json/base/relations/JsonQueryIsRelatedTo.java +++ b/src/main/java/org/gcube/informationsystem/resourceregistry/queries/json/base/relations/JsonQueryIsRelatedTo.java @@ -33,7 +33,7 @@ public class JsonQueryIsRelatedTo extends JsonQueryRelation { int size = jsonNode.size(); - // Remove @class from size + // Remove type from size --size; if(jsonNode.has(IsRelatedTo.SOURCE_PROPERTY)) { @@ -72,7 +72,7 @@ public class JsonQueryIsRelatedTo extends JsonQueryRelation { stringBuffer = buffer; - // Size 0 means that only '@class' and 'target'/'source' properties are present + // Size 0 means that only 'type' and 'target'/'source' properties are present if(size > 0) { if(!entryPoint) { stringBuffer.append(" )"); // Close ) SELECT diff --git a/src/main/java/org/gcube/informationsystem/resourceregistry/queries/templates/QueryTemplateManagement.java b/src/main/java/org/gcube/informationsystem/resourceregistry/queries/templates/QueryTemplateManagement.java index c62642e..ff407b9 100644 --- a/src/main/java/org/gcube/informationsystem/resourceregistry/queries/templates/QueryTemplateManagement.java +++ b/src/main/java/org/gcube/informationsystem/resourceregistry/queries/templates/QueryTemplateManagement.java @@ -19,7 +19,7 @@ import org.gcube.informationsystem.resourceregistry.contexts.security.SecurityCo import org.gcube.informationsystem.resourceregistry.instances.base.ElementManagementUtility; import org.gcube.informationsystem.resourceregistry.instances.base.entities.EntityElementManagement; import org.gcube.informationsystem.resourceregistry.queries.json.JsonQuery; -import org.gcube.informationsystem.resourceregistry.utils.Utility; +import org.gcube.informationsystem.resourceregistry.utils.OrientDBUtility; import org.gcube.informationsystem.serialization.ElementMapper; import org.gcube.informationsystem.types.reference.entities.EntityType; import org.slf4j.Logger; @@ -185,7 +185,7 @@ public class QueryTemplateManagement extends EntityElementManagement exten OResult oResult = resultSet.next(); OVertex element = (OVertex) ElementManagementUtility.getElementFromOptional(oResult.getElement()); - logger.trace("{} with id {} is : {}", typeName, getName(), Utility.toJsonString(element, true)); + logger.trace("{} with id {} is : {}", typeName, getName(), OrientDBUtility.getAsStringForLogging(element)); if (resultSet.hasNext()) { throw new ResourceRegistryException("Found more than one " + typeName + " with name " + getName() @@ -168,7 +168,7 @@ public abstract class EntityTypeDefinitionManagement exten updateProperties(oClass, element, jsonNode, ignoreKeys, ignoreStartWithKeys); - logger.debug("Created {} is {}", OVertex.class.getSimpleName(), Utility.toJsonString(element, true)); + logger.debug("Created {} is {}", OVertex.class.getSimpleName(), OrientDBUtility.getAsStringForLogging(element)); return element; } catch (ResourceRegistryException e) { diff --git a/src/main/java/org/gcube/informationsystem/resourceregistry/types/properties/PropertyTypeDefinitionManagement.java b/src/main/java/org/gcube/informationsystem/resourceregistry/types/properties/PropertyTypeDefinitionManagement.java index e413085..5f4f65f 100644 --- a/src/main/java/org/gcube/informationsystem/resourceregistry/types/properties/PropertyTypeDefinitionManagement.java +++ b/src/main/java/org/gcube/informationsystem/resourceregistry/types/properties/PropertyTypeDefinitionManagement.java @@ -16,7 +16,7 @@ import org.gcube.informationsystem.resourceregistry.contexts.security.TypeSecuri 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.utils.Utility; +import org.gcube.informationsystem.resourceregistry.utils.OrientDBUtility; import org.gcube.informationsystem.types.reference.entities.EntityType; import org.gcube.informationsystem.types.reference.properties.PropertyType; import org.slf4j.Logger; @@ -146,7 +146,7 @@ public class PropertyTypeDefinitionManagement extends ElementManagement El getElementByUUIDAsAdmin(String elementType, UUID uuid, @@ -72,7 +95,7 @@ public class Utility { current = ContextUtility.getCurrentODatabaseDocumentFromThreadLocal(); AdminSecurityContext adminSecurityContext = ContextUtility.getAdminSecurityContext(); adminDatabaseDocument = adminSecurityContext.getDatabaseDocument(PermissionMode.READER); - return Utility.getElementByUUID(adminDatabaseDocument, elementType, uuid, clz); + return OrientDBUtility.getElementByUUID(adminDatabaseDocument, elementType, uuid, clz); } finally { if(adminDatabaseDocument != null) { adminDatabaseDocument.close(); @@ -111,7 +134,7 @@ public class Utility { @SuppressWarnings("unchecked") El element = (El) ElementManagementUtility.getElementFromOptional(oResult.getElement()); - logger.trace("{} with id {} is : {}", elementType, uuid.toString(), Utility.toJsonString(element, true)); + logger.trace("{} with id {} is : {}", elementType, uuid.toString(), OrientDBUtility.getAsStringForLogging(element)); if(resultSet.hasNext()) { throw new ResourceRegistryException("Found more than one " + elementType + " with uuid " + uuid.toString() @@ -125,10 +148,10 @@ public class Utility { throws ResourceRegistryException { try { ODocument oDocument = element.getProperty(property); - P e = ElementMapper.unmarshal(clz, oDocument.toJSON()); + P e = ElementMapper.unmarshal(clz, OrientDBUtility.toJsonString(oDocument)); return e; } catch(Exception ex) { - String error = String.format("Error while getting %s from %s", property, toJsonString(element, true)); + String error = String.format("Error while getting %s from %s", property, getAsStringForException(element)); throw new ResourceRegistryException(error, ex); } } diff --git a/src/main/java/org/gcube/informationsystem/resourceregistry/utils/PropagationConstraintOrient.java b/src/main/java/org/gcube/informationsystem/resourceregistry/utils/PropagationConstraintOrient.java index 5ac0168..8158156 100644 --- a/src/main/java/org/gcube/informationsystem/resourceregistry/utils/PropagationConstraintOrient.java +++ b/src/main/java/org/gcube/informationsystem/resourceregistry/utils/PropagationConstraintOrient.java @@ -69,4 +69,11 @@ public class PropagationConstraintOrient extends ODocument implements org.gcube. } + @Override + public String toJSON(String iFormat) { + String ret = super.toJSON(iFormat); + ret = OrientDBUtility.replaceType(ret); + return ret; + } + } diff --git a/src/test/java/org/gcube/informationsystem/resourceregistry/instances/ERManagementTest.java b/src/test/java/org/gcube/informationsystem/resourceregistry/instances/ERManagementTest.java index 32518c8..4b001ee 100644 --- a/src/test/java/org/gcube/informationsystem/resourceregistry/instances/ERManagementTest.java +++ b/src/test/java/org/gcube/informationsystem/resourceregistry/instances/ERManagementTest.java @@ -127,7 +127,7 @@ public class ERManagementTest extends ContextTest { Configuration configuration = new ConfigurationImpl(); IdentifierFacet identifierFacet = new IdentifierFacetImpl(); - identifierFacet.setType(IdentificationType.STRING); + identifierFacet.setIdentificationType(IdentificationType.STRING); identifierFacet.setValue("MyID"); identifierFacet.setPersistent(false); @@ -567,9 +567,9 @@ public class ERManagementTest extends ContextTest { authorization.setSchema(uri); accessPointFacet.setAuthorization(authorization); - String additionlaPropertyKey = "Test"; + String additionalPropertyKey = "Test"; String additionlaPropertyValue = "MyTest"; - accessPointFacet.setAdditionalProperty(additionlaPropertyKey, additionlaPropertyValue); + accessPointFacet.setAdditionalProperty(additionalPropertyKey, additionlaPropertyValue); Encrypted encrypted = new EncryptedImpl(); String plainValue = "Encrypted"; @@ -594,7 +594,7 @@ public class ERManagementTest extends ContextTest { Assert.assertTrue(encValue.compareTo(encryptedValue) == 0); String decryptedValue = StringEncrypter.getEncrypter().decrypt(encValue); Assert.assertTrue(decryptedValue.compareTo(plainValue) == 0); - Assert.assertTrue(((String) apf.getAdditionalProperty(additionlaPropertyKey)).compareTo(additionlaPropertyValue) == 0); + Assert.assertTrue(((String) apf.getAdditionalProperty(additionalPropertyKey)).compareTo(additionlaPropertyValue) == 0); deleteResource(createdConfiguration); } @@ -618,7 +618,8 @@ public class ERManagementTest extends ContextTest { SoftwareFacet softwareFacet = updatedEService.getFacets(SoftwareFacet.class).get(0); Assert.assertTrue(softwareFacet.getVersion().compareTo(newVersion) == 0); - + } catch (Throwable e) { + throw e; }finally { deleteResource(eService); } diff --git a/src/test/java/org/gcube/informationsystem/resourceregistry/instances/InvalidOperationTest.java b/src/test/java/org/gcube/informationsystem/resourceregistry/instances/InvalidOperationTest.java index 10c6a9c..69b918e 100644 --- a/src/test/java/org/gcube/informationsystem/resourceregistry/instances/InvalidOperationTest.java +++ b/src/test/java/org/gcube/informationsystem/resourceregistry/instances/InvalidOperationTest.java @@ -3,6 +3,7 @@ package org.gcube.informationsystem.resourceregistry.instances; import java.util.Map; import java.util.UUID; +import org.gcube.informationsystem.base.reference.Element; import org.gcube.informationsystem.model.impl.relations.ConsistsOfImpl; import org.gcube.informationsystem.model.reference.entities.Facet; import org.gcube.informationsystem.model.reference.entities.Resource; @@ -41,8 +42,8 @@ public class InvalidOperationTest extends ERManagementTest { private static Logger logger = LoggerFactory.getLogger(InvalidOperationTest.class); - public static final String ACTIVATES = "{\"propagationConstraint\":{\"@class\":\"PropagationConstraint\",\"add\":\"propagate\",\"remove\":\"cascade\",\"delete\":\"cascade\"},\"@class\":\"Activates\",\"source\":{\"@class\":\"Configuration\",\"uuid\":\"CONFIGURATION_UUID\"},\"target\":{\"uuid\":\"ESERVICE_UUID\",\"@class\":\"EService\"}}"; - public static final String ACTOR = "{\"@class\":\"Actor\",\"metadata\":null,\"consistsOf\":[{\"@class\":\"IsIdentifiedBy\",\"metadata\":null,\"propagationConstraint\":{\"@class\":\"PropagationConstraint\",\"remove\":\"cascade\",\"delete\":\"cascade\",\"add\":\"propagate\"},\"source\":{\"@class\":\"Actor\",\"metadata\":null},\"target\":{\"@class\":\"ContactFacet\",\"metadata\":null,\"title\":\"Dr.\",\"name\":\"Frosini\",\"middleName\":null,\"surname\":null,\"eMail\":\"luca.frosini@isti.cnr.it\"}}],\"isRelatedTo\":[]}"; + public static final String ACTIVATES = "{\"propagationConstraint\":{\"" + Element.CLASS_PROPERTY + "\":\"PropagationConstraint\",\"add\":\"propagate\",\"remove\":\"cascade\",\"delete\":\"cascade\"},\"" + Element.CLASS_PROPERTY + "\":\"Activates\",\"source\":{\"" + Element.CLASS_PROPERTY + "\":\"Configuration\",\"uuid\":\"CONFIGURATION_UUID\"},\"target\":{\"uuid\":\"ESERVICE_UUID\",\"" + Element.CLASS_PROPERTY + "\":\"EService\"}}"; + public static final String ACTOR = "{\"" + Element.CLASS_PROPERTY + "\":\"Actor\",\"metadata\":null,\"consistsOf\":[{\"" + Element.CLASS_PROPERTY + "\":\"IsIdentifiedBy\",\"metadata\":null,\"propagationConstraint\":{\"" + Element.CLASS_PROPERTY + "\":\"PropagationConstraint\",\"remove\":\"cascade\",\"delete\":\"cascade\",\"add\":\"propagate\"},\"source\":{\"" + Element.CLASS_PROPERTY + "\":\"Actor\",\"metadata\":null},\"target\":{\"" + Element.CLASS_PROPERTY + "\":\"ContactFacet\",\"metadata\":null,\"title\":\"Dr.\",\"name\":\"Frosini\",\"middleName\":null,\"surname\":null,\"eMail\":\"luca.frosini@isti.cnr.it\"}}],\"isRelatedTo\":[]}"; @Test(expected = SchemaViolationException.class) public void createInvalidIsRealtedTo() throws Exception { diff --git a/src/test/java/org/gcube/informationsystem/resourceregistry/instances/multicontext/AddToContextTest.java b/src/test/java/org/gcube/informationsystem/resourceregistry/instances/multicontext/AddToContextTest.java index 26edbd8..4a630cf 100644 --- a/src/test/java/org/gcube/informationsystem/resourceregistry/instances/multicontext/AddToContextTest.java +++ b/src/test/java/org/gcube/informationsystem/resourceregistry/instances/multicontext/AddToContextTest.java @@ -96,7 +96,7 @@ public class AddToContextTest extends MultiContextTest { IdentifierFacet identifierFacet = new IdentifierFacetImpl(); identifierFacet.setValue(id); - identifierFacet.setType(IdentificationType.STRING); + identifierFacet.setIdentificationType(IdentificationType.STRING); identifierFacet.setPersistent(false); IsIdentifiedBy isIdentifiedBy = new IsIdentifiedByImpl<>(dataset, identifierFacet); dataset.addFacet(isIdentifiedBy); diff --git a/src/test/java/org/gcube/informationsystem/resourceregistry/queries/QueryTest.java b/src/test/java/org/gcube/informationsystem/resourceregistry/queries/QueryTest.java index 32fe90c..bc35d01 100644 --- a/src/test/java/org/gcube/informationsystem/resourceregistry/queries/QueryTest.java +++ b/src/test/java/org/gcube/informationsystem/resourceregistry/queries/QueryTest.java @@ -20,7 +20,6 @@ import org.gcube.informationsystem.resourceregistry.instances.base.ElementManage import org.gcube.informationsystem.resourceregistry.instances.model.entities.ResourceManagement; import org.gcube.informationsystem.resourceregistry.instances.model.relations.ConsistsOfManagement; import org.gcube.informationsystem.resourceregistry.instances.model.relations.IsRelatedToManagement; -import org.gcube.informationsystem.resourceregistry.utils.Utility; import org.gcube.informationsystem.serialization.ElementMapper; import org.gcube.informationsystem.utils.TypeUtility; import org.gcube.resourcemanagement.model.impl.entities.facets.IdentifierFacetImpl; @@ -318,7 +317,7 @@ public class QueryTest extends ERManagementTest { IdentifierFacet identifierFacet = new IdentifierFacetImpl(); identifierFacet.setValue(name); - identifierFacet.setType(IdentificationType.STRING); + identifierFacet.setIdentificationType(IdentificationType.STRING); if(value!=null) { identifierFacet.setAdditionalProperty(EXTRA, value); } diff --git a/src/test/resources/json.query.example b/src/test/resources/json.query.example index b9f531e..3f26abb 100644 --- a/src/test/resources/json.query.example +++ b/src/test/resources/json.query.example @@ -1,38 +1,38 @@ { - "@class": "EService", + "type": "EService", "consistsOf": [ { - "@class": "ConsistsOf", + "type": "ConsistsOf", "propagationConstraint" : { "add": "propagate" }, "target": { - "@class": "StateFacet", + "type": "StateFacet", "value": "down" } }, { - "@class": "IsIdentifiedBy", + "type": "IsIdentifiedBy", "target": { - "@class": "SoftwareFacet", + "type": "SoftwareFacet", "name": "data-transfer-service", "group": "DataTransfer" } }, { - "@class": "ConsistsOf", + "type": "ConsistsOf", "target": { - "@class": "AccessPointFacet", + "type": "AccessPointFacet", "endpoint": "http://pc-frosini.isti.cnr.it:8080/data-transfer-service/gcube/service" } } ], "isRelatedTo" : [ { - "@class": "activates", + "type": "activates", "source": { - "@class": "HostingNode" + "type": "HostingNode" } } ] @@ -76,7 +76,7 @@ SELECT FROM ( ) ) -// WHERE @class="EService" +// WHERE type="EService" @@ -111,7 +111,7 @@ SELECT FROM ( ) WHERE endpoint="http://pc-frosini.isti.cnr.it:8080/data-transfer-service/gcube/service" ) ) -) WHERE @class="EService" +) WHERE type="EService" @@ -131,7 +131,7 @@ SELECT FROM ( ) ) WHERE endpoint="http://pc-frosini.isti.cnr.it:8080/data-transfer-service/gcube/service" ) -) WHERE @class="EService" +) WHERE type="EService" // Generated from code: @@ -163,7 +163,7 @@ SELECT FROM ( ) // This is validated by the code to get polymorphic result -// WHERE @class="EService" +// WHERE type="EService" MATCH diff --git a/src/test/resources/logback-test.xml b/src/test/resources/logback-test.xml index 2dd6611..1bb86ba 100644 --- a/src/test/resources/logback-test.xml +++ b/src/test/resources/logback-test.xml @@ -14,7 +14,7 @@ - + diff --git a/src/test/resources/queries/query1.json b/src/test/resources/queries/query1.json index c26039a..eaecfab 100644 --- a/src/test/resources/queries/query1.json +++ b/src/test/resources/queries/query1.json @@ -1,20 +1,20 @@ { - "@class": "EService", + "type": "EService", "consistsOf": [ { - "@class": "ConsistsOf", + "type": "ConsistsOf", "propagationConstraint" : { "add": "propagate" }, "target": { - "@class": "StateFacet", + "type": "StateFacet", "value": "down" } }, { - "@class": "IsIdentifiedBy", + "type": "IsIdentifiedBy", "target": { - "@class": "SoftwareFacet", + "type": "SoftwareFacet", "name": "data-transfer-service", "group": "DataTransfer" } diff --git a/src/test/resources/queries/query2.json b/src/test/resources/queries/query2.json index be84f8c..a06f5d4 100644 --- a/src/test/resources/queries/query2.json +++ b/src/test/resources/queries/query2.json @@ -1,38 +1,38 @@ { - "@class": "EService", + "type": "EService", "consistsOf": [ { - "@class": "ConsistsOf", + "type": "ConsistsOf", "propagationConstraint" : { "add": "propagate" }, "target": { - "@class": "StateFacet", + "type": "StateFacet", "value": "down" } }, { - "@class": "IsIdentifiedBy", + "type": "IsIdentifiedBy", "target": { - "@class": "SoftwareFacet", + "type": "SoftwareFacet", "name": "data-transfer-service", "group": "DataTransfer" } }, { - "@class": "ConsistsOf", + "type": "ConsistsOf", "target": { - "@class": "AccessPointFacet", + "type": "AccessPointFacet", "endpoint": "http://pc-frosini.isti.cnr.it:8080/data-transfer-service/gcube/service" } } ], "isRelatedTo" : [ { - "@class": "Activates", + "type": "Activates", "uuid": "d3f58e52-5346-47bc-b736-9d77a0b554ce", "source": { - "@class": "HostingNode", + "type": "HostingNode", "uuid" : "5fbc1a56-d450-4f0f-85c1-9b1684581717" } } diff --git a/src/test/resources/queries/query3.json b/src/test/resources/queries/query3.json index d49d3cf..b0e757f 100644 --- a/src/test/resources/queries/query3.json +++ b/src/test/resources/queries/query3.json @@ -1,42 +1,42 @@ { - "@class": "EService", + "type": "EService", "consistsOf": [ { - "@class": "ConsistsOf", + "type": "ConsistsOf", "propagationConstraint" : { "add": "propagate" }, "target": { - "@class": "StateFacet", + "type": "StateFacet", "value": "down" } }, { - "@class": "IsIdentifiedBy", + "type": "IsIdentifiedBy", "target": { - "@class": "SoftwareFacet", + "type": "SoftwareFacet", "name": "data-transfer-service", "group": "DataTransfer" } }, { - "@class": "ConsistsOf", + "type": "ConsistsOf", "target": { - "@class": "AccessPointFacet", + "type": "AccessPointFacet", "endpoint": "http://pc-frosini.isti.cnr.it:8080/data-transfer-service/gcube/service" } } ], "isRelatedTo" : [ { - "@class": "Activates", + "type": "Activates", "source": { - "@class": "HostingNode", + "type": "HostingNode", "consistsOf": [ { - "@class": "ConsistsOf", + "type": "ConsistsOf", "target": { - "@class": "CPUFacet", + "type": "CPUFacet", "vendor": "GenuineIntel" } } diff --git a/src/test/resources/queries/query4.json b/src/test/resources/queries/query4.json index ce4b566..a41d521 100644 --- a/src/test/resources/queries/query4.json +++ b/src/test/resources/queries/query4.json @@ -1,10 +1,10 @@ { - "@class": "StateFacet", + "type": "StateFacet", "value": "down", "_in": { - "@class": "ConsistsOf", + "type": "ConsistsOf", "source" : { - "@class" : "EService", + "type" : "EService", "uuid": "0255b7ec-e3da-4071-b456-9a2907ece1db" } } diff --git a/src/test/resources/queries/query5.json b/src/test/resources/queries/query5.json index 40e98ee..6090c97 100644 --- a/src/test/resources/queries/query5.json +++ b/src/test/resources/queries/query5.json @@ -1,10 +1,10 @@ { - "@class": "StateFacet", + "type": "StateFacet", "value": "down", "_in": { - "@class": "ConsistsOf", + "type": "ConsistsOf", "source" : { - "@class" : "EService", + "type" : "EService", "$or": [ {"$and": { "uuid" : "aec0ef31-c735-4a4c-b2f4-57dfbd2fe925", diff --git a/src/test/resources/queries/query6.json b/src/test/resources/queries/query6.json index 16a4fec..765c7fa 100644 --- a/src/test/resources/queries/query6.json +++ b/src/test/resources/queries/query6.json @@ -1,45 +1,45 @@ { - "@class": "EService", + "type": "EService", "uuid": "0255b7ec-e3da-4071-b456-9a2907ece1db", "consistsOf": [ { - "@class": "ConsistsOf", + "type": "ConsistsOf", "propagationConstraint" : { "add": "propagate" }, "target": { - "@class": "StateFacet", + "type": "StateFacet", "value": "down" } }, { - "@class": "IsIdentifiedBy", + "type": "IsIdentifiedBy", "target": { - "@class": "SoftwareFacet", + "type": "SoftwareFacet", "name": "data-transfer-service", "group": "DataTransfer" } }, { - "@class": "ConsistsOf", + "type": "ConsistsOf", "target": { - "@class": "AccessPointFacet", + "type": "AccessPointFacet", "endpoint": "http://pc-frosini.isti.cnr.it:8080/data-transfer-service/gcube/service" } } ], "isRelatedTo" : [ { - "@class": "Activates", + "type": "Activates", "uuid": "d3f58e52-5346-47bc-b736-9d77a0b554ce", "source": { - "@class": "HostingNode", + "type": "HostingNode", "uuid" : "5fbc1a56-d450-4f0f-85c1-9b1684581717", "consistsOf": [ { - "@class": "ConsistsOf", + "type": "ConsistsOf", "target": { - "@class": "CPUFacet", + "type": "CPUFacet", "vendor": "GenuineIntel" } } diff --git a/src/test/resources/queries/query7.json b/src/test/resources/queries/query7.json index 167f7e5..7a3c640 100644 --- a/src/test/resources/queries/query7.json +++ b/src/test/resources/queries/query7.json @@ -1,9 +1,9 @@ { - "@class": "StateFacet", + "type": "StateFacet", "_in": { - "@class": "ConsistsOf", + "type": "ConsistsOf", "source" : { - "@class" : "EService", + "type" : "EService", "$or": [ {"$and": { "uuid" : "aec0ef31-c735-4a4c-b2f4-57dfbd2fe925", diff --git a/src/test/resources/queries/query8.json b/src/test/resources/queries/query8.json index 367ffc8..0628f82 100644 --- a/src/test/resources/queries/query8.json +++ b/src/test/resources/queries/query8.json @@ -1,12 +1,12 @@ { - "@class": "CallsFor", + "type": "CallsFor", "source": { - "@class": "EService", + "type": "EService", "consistsOf": [ { - "@class": "IsIdentifiedBy", + "type": "IsIdentifiedBy", "target": { - "@class": "SoftwareFacet", + "type": "SoftwareFacet", "group": "org.gcube.data-catalogue", "name": "gcat" } @@ -14,12 +14,12 @@ ] }, "target":{ - "@class": "VirtualService", + "type": "VirtualService", "consistsOf": [ { - "@class": "IsIdentifiedBy", + "type": "IsIdentifiedBy", "target": { - "@class": "SoftwareFacet", + "type": "SoftwareFacet", "group": "org.gcube.data-catalogue", "name": "catalogue-virtual-service" } diff --git a/src/test/resources/queries/query9.json b/src/test/resources/queries/query9.json index 5ee9d9b..1836af8 100644 --- a/src/test/resources/queries/query9.json +++ b/src/test/resources/queries/query9.json @@ -1,28 +1,28 @@ { - "@class": "SimpleFacet", + "type": "SimpleFacet", "_in": { - "@class": "ConsistsOf", + "type": "ConsistsOf", "source": { - "@class": "Configuration", + "type": "Configuration", "consistsOf": [ { - "@class": "IsIdentifiedBy", + "type": "IsIdentifiedBy", "target": { - "@class": "IdentifierFacet", + "type": "IdentifierFacet", "value": "gcat-configuration" } } ], "isRelatedTo": [ { - "@class": "IsCustomizedBy", + "type": "IsCustomizedBy", "source": { - "@class": "VirtualService", + "type": "VirtualService", "consistsOf": [ { - "@class": "IsIdentifiedBy", + "type": "IsIdentifiedBy", "target": { - "@class": "SoftwareFacet", + "type": "SoftwareFacet", "group": "org.gcube.data-catalogue", "name": "catalogue-virtual-service" } diff --git a/src/test/resources/queryTemplates/queryTemplate1-bis.json b/src/test/resources/queryTemplates/queryTemplate1-bis.json index 79dc389..fa77248 100644 --- a/src/test/resources/queryTemplates/queryTemplate1-bis.json +++ b/src/test/resources/queryTemplates/queryTemplate1-bis.json @@ -1,20 +1,20 @@ { - "@class": "EService", + "type": "EService", "consistsOf": [ { - "@class": "ConsistsOf", + "type": "ConsistsOf", "propagationConstraint" : { "add": "propagate" }, "target": { - "@class": "StateFacet", + "type": "StateFacet", "value": "$state" } }, { - "@class": "IsIdentifiedBy", + "type": "IsIdentifiedBy", "target": { - "@class": "SoftwareFacet", + "type": "SoftwareFacet", "group": "$group", "name": "$name" } diff --git a/src/test/resources/queryTemplates/queryTemplate1.json b/src/test/resources/queryTemplates/queryTemplate1.json index e4759bf..0e718cf 100644 --- a/src/test/resources/queryTemplates/queryTemplate1.json +++ b/src/test/resources/queryTemplates/queryTemplate1.json @@ -1,20 +1,20 @@ { - "@class": "EService", + "type": "EService", "consistsOf": [ { - "@class": "ConsistsOf", + "type": "ConsistsOf", "propagationConstraint" : { "add": "propagate" }, "target": { - "@class": "StateFacet", + "type": "StateFacet", "value": "$state" } }, { - "@class": "IsIdentifiedBy", + "type": "IsIdentifiedBy", "target": { - "@class": "SoftwareFacet", + "type": "SoftwareFacet", "name": "$name", "group": "$group" }