Fixed code to comply with uuid property rename to id
This commit is contained in:
parent
5638c99feb
commit
7d7b9478bb
|
@ -130,7 +130,7 @@ public class ContextManagement extends EntityElementManagement<Context, EntityTy
|
|||
select.append(getName());
|
||||
select.append("\"");
|
||||
select.append(QueryLogicalOperator.AND.getLogicalOperator());
|
||||
select.append(IdentifiableElement.UUID_PROPERTY);
|
||||
select.append(IdentifiableElement.ID_PROPERTY);
|
||||
select.append(QueryConditionalOperator.NE.getConditionalOperator());
|
||||
select.append("\"");
|
||||
select.append(parentContext.uuid);
|
||||
|
|
|
@ -142,7 +142,7 @@ public abstract class ElementManagement<El extends OElement, T extends Type> {
|
|||
this.ignoreKeys = new HashSet<String>();
|
||||
this.ignoreKeys.add(Element.TYPE_PROPERTY);
|
||||
this.ignoreKeys.add(Element.SUPERTYPES_PROPERTY);
|
||||
this.ignoreKeys.add(IdentifiableElement.UUID_PROPERTY);
|
||||
this.ignoreKeys.add(IdentifiableElement.ID_PROPERTY);
|
||||
this.ignoreKeys.add(IdentifiableElement.METADATA_PROPERTY);
|
||||
|
||||
this.ignoreStartWithKeys = new HashSet<String>();
|
||||
|
@ -407,7 +407,7 @@ public abstract class ElementManagement<El extends OElement, T extends Type> {
|
|||
/* Add first these key to provide an order in Json */
|
||||
|
||||
List<String> keysToAddFirst = new ArrayList<>();
|
||||
keysToAddFirst.add(IdentifiableElement.UUID_PROPERTY);
|
||||
keysToAddFirst.add(IdentifiableElement.ID_PROPERTY);
|
||||
keysToAddFirst.add(IdentifiableElement.METADATA_PROPERTY);
|
||||
keysToAddFirst.add(Relation.PROPAGATION_CONSTRAINT_PROPERTY);
|
||||
|
||||
|
@ -475,7 +475,7 @@ public abstract class ElementManagement<El extends OElement, T extends Type> {
|
|||
|
||||
element = reallyCreate();
|
||||
|
||||
element.setProperty(IdentifiableElement.UUID_PROPERTY, uuid.toString());
|
||||
element.setProperty(IdentifiableElement.ID_PROPERTY, uuid.toString());
|
||||
|
||||
MetadataUtility.addMetadata(element);
|
||||
|
||||
|
@ -1180,7 +1180,7 @@ public abstract class ElementManagement<El extends OElement, T extends Type> {
|
|||
return metadataJson;
|
||||
}
|
||||
|
||||
if(key.compareTo(IdentifiableElement.UUID_PROPERTY) == 0 ) {
|
||||
if(key.compareTo(IdentifiableElement.ID_PROPERTY) == 0 ) {
|
||||
return new TextNode(object.toString());
|
||||
}
|
||||
|
||||
|
|
|
@ -170,7 +170,7 @@ public abstract class EntityManagement<E extends Entity, ET extends EntityType>
|
|||
try {
|
||||
retrieveElementFromAnyContext();
|
||||
throw getSpecificAvailableInAnotherContextException(typeName == null ? accessType.getName()
|
||||
: typeName + " with UUID " + uuid + " is available in another "
|
||||
: typeName + " with ID " + uuid + " is available in another "
|
||||
+ Context.class.getSimpleName());
|
||||
} catch(AvailableInAnotherContextException e1) {
|
||||
throw e1;
|
||||
|
@ -713,7 +713,7 @@ public abstract class EntityManagement<E extends Entity, ET extends EntityType>
|
|||
ArrayNode arrayNode = objectMapper.createArrayNode();
|
||||
|
||||
if(referenceUUID != null) {
|
||||
constraint.put(Entity.UUID_PROPERTY, referenceUUID.toString());
|
||||
constraint.put(Entity.ID_PROPERTY, referenceUUID.toString());
|
||||
}
|
||||
|
||||
// TODO check types
|
||||
|
@ -792,8 +792,8 @@ public abstract class EntityManagement<E extends Entity, ET extends EntityType>
|
|||
EntityManagement<?,?> entityManagement = ElementManagementUtility.getEntityManagement(getWorkingContext(),
|
||||
oDatabaseDocument, vertex);
|
||||
try {
|
||||
if(constraint.containsKey(Entity.UUID_PROPERTY)) {
|
||||
String uuid = constraint.get(Entity.UUID_PROPERTY);
|
||||
if(constraint.containsKey(Entity.ID_PROPERTY)) {
|
||||
String uuid = constraint.get(Entity.ID_PROPERTY);
|
||||
if(entityManagement.getUUID().compareTo(UUID.fromString(uuid)) == 0) {
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -64,9 +64,9 @@ public class SharingManager {
|
|||
* The the body is the following
|
||||
*
|
||||
* [
|
||||
* {"type" : "HostingNode", "uuid" : "16032d09-3823-444e-a1ff-a67de4f350a8" },
|
||||
* {"type" : "Hosts", "uuid" : "97ab8a6b-6b1b-4868-b8fc-ba48d0439ba9"},
|
||||
* {"type" : "EService", "uuid" : "d3b1a29b-aa70-4a5a-be83-361a4209dd3e"}
|
||||
* {"type" : "HostingNode", "id" : "16032d09-3823-444e-a1ff-a67de4f350a8" },
|
||||
* {"type" : "Hosts", "id" : "97ab8a6b-6b1b-4868-b8fc-ba48d0439ba9"},
|
||||
* {"type" : "EService", "id" : "d3b1a29b-aa70-4a5a-be83-361a4209dd3e"}
|
||||
* ]
|
||||
*
|
||||
*
|
||||
|
|
|
@ -534,7 +534,7 @@ public class TypeManagement {
|
|||
|
||||
String propertyName = newPropertyDefinition.getName();
|
||||
|
||||
if(propertyName.compareTo(IdentifiableElement.UUID_PROPERTY)==0 ||
|
||||
if(propertyName.compareTo(IdentifiableElement.ID_PROPERTY)==0 ||
|
||||
propertyName.compareTo(IdentifiableElement.METADATA_PROPERTY)==0 ||
|
||||
propertyName.compareTo(Relation.PROPAGATION_CONSTRAINT_PROPERTY)==0) {
|
||||
continue;
|
||||
|
|
|
@ -119,7 +119,7 @@ public class OrientDBUtility {
|
|||
}
|
||||
|
||||
// TODO Rewrite using Gremlin
|
||||
String select = "SELECT FROM " + elementType + " WHERE " + IdentifiableElement.UUID_PROPERTY + " = \"" + uuid.toString() + "\"";
|
||||
String select = "SELECT FROM " + elementType + " WHERE " + IdentifiableElement.ID_PROPERTY + " = \"" + uuid.toString() + "\"";
|
||||
|
||||
OResultSet resultSet = oDatabaseDocument.query(select, new HashMap<>());
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ import com.orientechnologies.orient.core.record.OElement;
|
|||
public class UUIDUtility extends org.gcube.informationsystem.utils.UUIDUtility {
|
||||
|
||||
public static UUID getUUID(OElement element) throws ResourceRegistryException {
|
||||
String uuidString = element.getProperty(IdentifiableElement.UUID_PROPERTY);
|
||||
String uuidString = element.getProperty(IdentifiableElement.ID_PROPERTY);
|
||||
UUID uuid = UUID.fromString(uuidString);
|
||||
return uuid;
|
||||
}
|
||||
|
|
|
@ -47,10 +47,10 @@ public class ContextManagementTest extends ContextTest {
|
|||
|
||||
public static void checkUUUIDAndMetadata(IdentifiableElement er, UUID uuid, boolean create) {
|
||||
Assert.assertTrue(er.getMetadata() != null);
|
||||
Assert.assertTrue(er.getUUID() != null);
|
||||
Assert.assertTrue(er.getID() != null);
|
||||
|
||||
if(uuid != null) {
|
||||
Assert.assertTrue(er.getUUID().compareTo(uuid) == 0);
|
||||
Assert.assertTrue(er.getID().compareTo(uuid) == 0);
|
||||
}
|
||||
|
||||
String user = MetadataUtility.getUser();
|
||||
|
@ -68,7 +68,7 @@ public class ContextManagementTest extends ContextTest {
|
|||
throws ResourceRegistryException {
|
||||
if(checkParent) {
|
||||
if(pre.getMetadata() != null) {
|
||||
checkUUUIDAndMetadata(post, pre.getUUID(), create);
|
||||
checkUUUIDAndMetadata(post, pre.getID(), create);
|
||||
} else {
|
||||
checkUUUIDAndMetadata(post, null, create);
|
||||
}
|
||||
|
@ -148,7 +148,7 @@ public class ContextManagementTest extends ContextTest {
|
|||
logger.debug("Created {}", contextString);
|
||||
Context c = ElementMapper.unmarshal(Context.class, contextString);
|
||||
assertions(context, c, true, true);
|
||||
roleUserAssertions(c.getUUID(), null, false);
|
||||
roleUserAssertions(c.getID(), null, false);
|
||||
return c;
|
||||
}
|
||||
|
||||
|
@ -159,7 +159,7 @@ public class ContextManagementTest extends ContextTest {
|
|||
logger.debug("Updated {}", contextString);
|
||||
Context c = ElementMapper.unmarshal(Context.class, contextString);
|
||||
assertions(context, c, true, false);
|
||||
roleUserAssertions(c.getUUID(), null, false);
|
||||
roleUserAssertions(c.getID(), null, false);
|
||||
return c;
|
||||
}
|
||||
|
||||
|
@ -180,7 +180,7 @@ public class ContextManagementTest extends ContextTest {
|
|||
}
|
||||
|
||||
protected void delete(Context context) throws ResourceRegistryException {
|
||||
delete(context.getUUID());
|
||||
delete(context.getID());
|
||||
}
|
||||
|
||||
protected void invalidCreate(Context context) throws ResourceRegistryException, IOException {
|
||||
|
@ -420,7 +420,7 @@ public class ContextManagementTest extends ContextTest {
|
|||
delete(contextA5);
|
||||
} catch(ContextNotFoundException e) {
|
||||
logger.debug("The context with uuid {} was not found. (Was already deleted)",
|
||||
contextA5.getUUID());
|
||||
contextA5.getID());
|
||||
}
|
||||
|
||||
delete(contextB3);
|
||||
|
@ -435,7 +435,7 @@ public class ContextManagementTest extends ContextTest {
|
|||
// ________A1________
|
||||
|
||||
Context contextC = new ContextImpl(CTX_NAME_C);
|
||||
contextC.setUUID(contextA1.getUUID());
|
||||
contextC.setID(contextA1.getID());
|
||||
invalidCreate(contextC);
|
||||
|
||||
delete(contextA1);
|
||||
|
@ -480,7 +480,7 @@ public class ContextManagementTest extends ContextTest {
|
|||
Context childContext = child.getTarget();
|
||||
Assert.assertTrue(childContext.getParent().getSource() == context);
|
||||
}
|
||||
roleUserAssertions(context.getUUID(), null, false);
|
||||
roleUserAssertions(context.getID(), null, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -509,11 +509,11 @@ public class ContextManagementTest extends ContextTest {
|
|||
|
||||
List<Context> contextsFromCache = contextCache.getContexts();
|
||||
for(Context c : contextsFromCache) {
|
||||
UUID uuid = c.getUUID();
|
||||
UUID uuid = c.getID();
|
||||
if(c.getParent()!=null) {
|
||||
IsParentOf isParentOf = c.getParent();
|
||||
Context parentContext = isParentOf.getSource();
|
||||
UUID parentUUID = parentContext.getUUID();
|
||||
UUID parentUUID = parentContext.getID();
|
||||
Assert.assertTrue(parentContext.getName().compareTo(contextCache.getContextByUUID(parentUUID).getName())==0);
|
||||
List<IsParentOf> children = parentContext.getChildren();
|
||||
boolean found = false;
|
||||
|
@ -524,9 +524,9 @@ public class ContextManagementTest extends ContextTest {
|
|||
}
|
||||
}
|
||||
Assert.assertTrue(found);
|
||||
logger.debug("{} : {} (parent {} : {})", c.getUUID(), contextCache.getContextFullNameByUUID(uuid), parentUUID, contextCache.getContextFullNameByUUID(parentUUID));
|
||||
logger.debug("{} : {} (parent {} : {})", c.getID(), contextCache.getContextFullNameByUUID(uuid), parentUUID, contextCache.getContextFullNameByUUID(parentUUID));
|
||||
}else {
|
||||
logger.debug("{} : {}", c.getUUID(), contextCache.getContextFullNameByUUID(uuid));
|
||||
logger.debug("{} : {}", c.getID(), contextCache.getContextFullNameByUUID(uuid));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -534,7 +534,7 @@ public class ContextManagementTest extends ContextTest {
|
|||
logger.debug("Current context : {}", currentContext);
|
||||
|
||||
for(Context c : contexts) {
|
||||
UUID uuid = c.getUUID();
|
||||
UUID uuid = c.getID();
|
||||
Context context = read(uuid);
|
||||
String fullName = ContextCache.getInstance().getContextFullNameByUUID(uuid);
|
||||
logger.debug("{} - {} : {}", uuid, fullName, context);
|
||||
|
|
|
@ -218,11 +218,11 @@ public class ERManagementTest extends ContextTest {
|
|||
}
|
||||
|
||||
public static void checkUUIDAndMetadata(IdentifiableElement identifiableElement, IdentifiableElement createdIdentifiableElement) {
|
||||
UUID createdUUID = createdIdentifiableElement.getUUID();
|
||||
UUID createdUUID = createdIdentifiableElement.getID();
|
||||
Assert.assertTrue(createdUUID!=null);
|
||||
|
||||
if(identifiableElement.getUUID()!=null) {
|
||||
Assert.assertTrue(createdUUID.compareTo(identifiableElement.getUUID())==0);
|
||||
if(identifiableElement.getID()!=null) {
|
||||
Assert.assertTrue(createdUUID.compareTo(identifiableElement.getID())==0);
|
||||
}
|
||||
|
||||
Metadata createdMetadata = createdIdentifiableElement.getMetadata();
|
||||
|
@ -329,8 +329,8 @@ public class ERManagementTest extends ContextTest {
|
|||
ResourceManagement resourceManagement = new ResourceManagement();
|
||||
resourceManagement.setElementType(r.getTypeName());
|
||||
resourceManagement.setJson(ElementMapper.marshal(r));
|
||||
if(r.getUUID()!=null) {
|
||||
resourceManagement.setUUID(r.getUUID());
|
||||
if(r.getID()!=null) {
|
||||
resourceManagement.setUUID(r.getID());
|
||||
}
|
||||
return resourceManagement;
|
||||
}
|
||||
|
@ -339,8 +339,8 @@ public class ERManagementTest extends ContextTest {
|
|||
IsRelatedToManagement isRelatedToManagement = new IsRelatedToManagement();
|
||||
isRelatedToManagement.setElementType(isRelatedTo.getTypeName());
|
||||
isRelatedToManagement.setJson(ElementMapper.marshal(isRelatedTo));
|
||||
if(isRelatedTo.getUUID()!=null) {
|
||||
isRelatedToManagement.setUUID(isRelatedTo.getUUID());
|
||||
if(isRelatedTo.getID()!=null) {
|
||||
isRelatedToManagement.setUUID(isRelatedTo.getID());
|
||||
}
|
||||
return isRelatedToManagement;
|
||||
}
|
||||
|
@ -488,7 +488,7 @@ public class ERManagementTest extends ContextTest {
|
|||
Assert.assertTrue(cpuFacet.getModel().compareTo(createdCpuFacet.getModel()) == 0);
|
||||
Assert.assertTrue(cpuFacet.getVendor().compareTo(createdCpuFacet.getVendor()) == 0);
|
||||
|
||||
UUID uuid = createdCpuFacet.getUUID();
|
||||
UUID uuid = createdCpuFacet.getID();
|
||||
|
||||
FacetManagement facetManagement = new FacetManagement();
|
||||
facetManagement.setElementType(createdCpuFacet.getTypeName());
|
||||
|
@ -500,7 +500,7 @@ public class ERManagementTest extends ContextTest {
|
|||
Assert.assertTrue(cpuFacet.getClockSpeed().compareTo(readCpuFacet.getClockSpeed()) == 0);
|
||||
Assert.assertTrue(cpuFacet.getModel().compareTo(readCpuFacet.getModel()) == 0);
|
||||
Assert.assertTrue(cpuFacet.getVendor().compareTo(readCpuFacet.getVendor()) == 0);
|
||||
Assert.assertTrue(uuid.compareTo(readCpuFacet.getUUID()) == 0);
|
||||
Assert.assertTrue(uuid.compareTo(readCpuFacet.getID()) == 0);
|
||||
|
||||
String newVendor = "Intel";
|
||||
String newClockSpeed = "2 GHz";
|
||||
|
@ -524,7 +524,7 @@ public class ERManagementTest extends ContextTest {
|
|||
Assert.assertTrue(updatedCpuFacet.getVendor().compareTo(newVendor) == 0);
|
||||
Assert.assertTrue(((String) updatedCpuFacet.getAdditionalProperty(additionPropertyKey))
|
||||
.compareTo((String) readCpuFacet.getAdditionalProperty(additionPropertyKey)) == 0);
|
||||
Assert.assertTrue(uuid.compareTo(updatedCpuFacet.getUUID()) == 0);
|
||||
Assert.assertTrue(uuid.compareTo(updatedCpuFacet.getID()) == 0);
|
||||
String user = ContextTest.getUser();
|
||||
Assert.assertTrue(updatedCpuFacet.getMetadata().getLastUpdateBy().compareTo(user) == 0);
|
||||
|
||||
|
@ -540,7 +540,7 @@ public class ERManagementTest extends ContextTest {
|
|||
Assert.assertTrue(updatedCpuFacet.getVendor().compareTo(readUpdatedCpuFacet.getVendor()) == 0);
|
||||
Assert.assertTrue(((String) updatedCpuFacet.getAdditionalProperty(additionPropertyKey))
|
||||
.compareTo((String) readUpdatedCpuFacet.getAdditionalProperty(additionPropertyKey)) == 0);
|
||||
Assert.assertTrue(uuid.compareTo(updatedCpuFacet.getUUID()) == 0);
|
||||
Assert.assertTrue(uuid.compareTo(updatedCpuFacet.getID()) == 0);
|
||||
|
||||
facetManagement = new FacetManagement();
|
||||
facetManagement.setElementType(readCpuFacet.getTypeName());
|
||||
|
|
|
@ -61,8 +61,8 @@ public class InvalidOperationTest extends ERManagementTest {
|
|||
*/
|
||||
IsRelatedToManagement isRelatedToManagement = new IsRelatedToManagement();
|
||||
isRelatedToManagement.setElementType(Activates.NAME);
|
||||
String json = ACTIVATES.replace("CONFIGURATION_UUID", configuration.getUUID().toString());
|
||||
json = json.replace("ESERVICE_UUID", eService.getUUID().toString());
|
||||
String json = ACTIVATES.replace("CONFIGURATION_UUID", configuration.getID().toString());
|
||||
json = json.replace("ESERVICE_UUID", eService.getID().toString());
|
||||
isRelatedToManagement.setJson(json);
|
||||
isRelatedToManagement.create();
|
||||
}finally {
|
||||
|
@ -167,7 +167,7 @@ public class InvalidOperationTest extends ERManagementTest {
|
|||
|
||||
ConsistsOfManagement consistsOfManagement = new ConsistsOfManagement();
|
||||
consistsOfManagement.setElementType(isIdentifiedBy.getTypeName());
|
||||
consistsOfManagement.setUUID(isIdentifiedBy.getUUID());
|
||||
consistsOfManagement.setUUID(isIdentifiedBy.getID());
|
||||
consistsOfManagement.delete();
|
||||
}finally {
|
||||
ERManagementTest.deleteResource(eService);
|
||||
|
@ -182,12 +182,12 @@ public class InvalidOperationTest extends ERManagementTest {
|
|||
IsIdentifiedBy<EService, SoftwareFacet> isIdentifiedBy = (IsIdentifiedBy<EService, SoftwareFacet>) eService.getConsistsOf(IsIdentifiedBy.class).get(0);
|
||||
ConsistsOfManagement consistsOfManagement = new ConsistsOfManagement();
|
||||
consistsOfManagement.setElementType(IsIdentifiedBy.NAME);
|
||||
consistsOfManagement.setUUID(isIdentifiedBy.getUUID());
|
||||
consistsOfManagement.setUUID(isIdentifiedBy.getID());
|
||||
|
||||
SoftwareFacet softwareFacet = isIdentifiedBy.getTarget();
|
||||
FacetManagement facetManagement = new FacetManagement();
|
||||
facetManagement.setElementType(SoftwareFacet.NAME);
|
||||
facetManagement.setUUID(softwareFacet.getUUID());
|
||||
facetManagement.setUUID(softwareFacet.getID());
|
||||
|
||||
try {
|
||||
facetManagement.delete();
|
||||
|
@ -201,14 +201,14 @@ public class InvalidOperationTest extends ERManagementTest {
|
|||
public void testCreateConsistsOfBeetweenResources() throws Exception {
|
||||
Map<String, Resource> map = ERManagementTest.createHostingNodeAndEService();
|
||||
|
||||
UUID hostingNodeUUID = map.get(HostingNode.NAME).getUUID();
|
||||
UUID eServiceUUID = map.get(EService.NAME).getUUID();
|
||||
UUID hostingNodeUUID = map.get(HostingNode.NAME).getID();
|
||||
UUID eServiceUUID = map.get(EService.NAME).getID();
|
||||
|
||||
HostingNode hostingNode = new HostingNodeImpl();
|
||||
hostingNode.setUUID(hostingNodeUUID);
|
||||
hostingNode.setID(hostingNodeUUID);
|
||||
|
||||
SimpleFacet fakeEServiceAsSimpleFacet = new SimpleFacetImpl();
|
||||
fakeEServiceAsSimpleFacet.setUUID(eServiceUUID);
|
||||
fakeEServiceAsSimpleFacet.setID(eServiceUUID);
|
||||
|
||||
ConsistsOf<HostingNode, SimpleFacet> consistsOf = new ConsistsOfImpl<HostingNode, SimpleFacet>(hostingNode, fakeEServiceAsSimpleFacet);
|
||||
|
||||
|
|
|
@ -93,7 +93,7 @@ public class SmartgearResourcesTest extends ERManagementTest {
|
|||
UUID uuid = UUIDManager.getInstance().generateValidUUID();
|
||||
|
||||
HostingNode hostingNode = new HostingNodeImpl();
|
||||
hostingNode.setUUID(uuid);
|
||||
hostingNode.setID(uuid);
|
||||
|
||||
NetworkingFacet networkingFacet = new NetworkingFacetImpl();
|
||||
try {
|
||||
|
|
|
@ -59,7 +59,7 @@ public class AddToContextTest extends MultiContextTest {
|
|||
IsIdentifiedBy<EService, SoftwareFacet> isIdentifiedBy = (IsIdentifiedBy<EService, SoftwareFacet>) eService.getConsistsOf(IsIdentifiedBy.class).get(0);
|
||||
ConsistsOfManagement consistsOfManagement = new ConsistsOfManagement();
|
||||
consistsOfManagement.setElementType(IsIdentifiedBy.NAME);
|
||||
consistsOfManagement.setUUID(isIdentifiedBy.getUUID());
|
||||
consistsOfManagement.setUUID(isIdentifiedBy.getID());
|
||||
|
||||
try {
|
||||
consistsOfManagement.removeFromContext(ContextUtility.getCurrentSecurityContext().getUUID());
|
||||
|
@ -74,7 +74,7 @@ public class AddToContextTest extends MultiContextTest {
|
|||
SoftwareFacet softwareFacet = isIdentifiedBy.getTarget();
|
||||
FacetManagement facetManagement = new FacetManagement();
|
||||
facetManagement.setElementType(SoftwareFacet.NAME);
|
||||
facetManagement.setUUID(softwareFacet.getUUID());
|
||||
facetManagement.setUUID(softwareFacet.getID());
|
||||
|
||||
try {
|
||||
facetManagement.removeFromContext(ContextUtility.getCurrentSecurityContext().getUUID());
|
||||
|
@ -92,7 +92,7 @@ public class AddToContextTest extends MultiContextTest {
|
|||
|
||||
protected Dataset createDataset(String id, String uuidString) throws Exception {
|
||||
Dataset dataset = new DatasetImpl();
|
||||
dataset.setUUID(UUID.fromString(uuidString));
|
||||
dataset.setID(UUID.fromString(uuidString));
|
||||
|
||||
IdentifierFacet identifierFacet = new IdentifierFacetImpl();
|
||||
identifierFacet.setValue(id);
|
||||
|
@ -138,7 +138,7 @@ public class AddToContextTest extends MultiContextTest {
|
|||
protected IsCorrelatedTo<Dataset, Dataset> createIsCorrelatedTo(Dataset source, Dataset target, String uuid) throws Exception {
|
||||
PropagationConstraint propagationConstraint = getPropagationConstraint();
|
||||
IsCorrelatedTo<Dataset, Dataset> isCorrelatedTo = new IsCorrelatedToImpl<Dataset, Dataset>(source, target, propagationConstraint);
|
||||
isCorrelatedTo.setUUID(UUID.fromString(uuid));
|
||||
isCorrelatedTo.setID(UUID.fromString(uuid));
|
||||
|
||||
IsRelatedToManagement isRelatedToManagement = getIsRelatedToManagement(isCorrelatedTo);
|
||||
String json = isRelatedToManagement.create();
|
||||
|
@ -161,7 +161,7 @@ public class AddToContextTest extends MultiContextTest {
|
|||
@SuppressWarnings("unchecked")
|
||||
Map<String,String> contextsR1 = (Map<String, String>) r1.getMetadata().getAdditionalProperty(Metadata.__CONTEXTS);
|
||||
Set<String> contextsR1Fullname = new HashSet<>(contextsR1.values());
|
||||
logger.info("Contexts of {} with UUID {} and Id {} are {}", Dataset.NAME, r1.getUUID(), ((IdentifierFacet)r1.getIdentificationFacets().get(0)).getValue(), contextsR1Fullname);
|
||||
logger.info("Contexts of {} with UUID {} and Id {} are {}", Dataset.NAME, r1.getID(), ((IdentifierFacet)r1.getIdentificationFacets().get(0)).getValue(), contextsR1Fullname);
|
||||
Assert.assertTrue(contextsR1.size()==expectedContextSize);
|
||||
|
||||
ContextUtility.getHierarchicalMode().set(false);
|
||||
|
|
|
@ -151,21 +151,21 @@ public class BasicTest extends MultiContextTest {
|
|||
EService eService = ERManagementTest.createEService();
|
||||
|
||||
Map<UUID, IdentifiableElement> eServiceInstances = new HashMap<>();
|
||||
eServiceInstances.put(eService.getUUID(), eService);
|
||||
eServiceInstances.put(eService.getID(), eService);
|
||||
for(ConsistsOf<?,?> consistsOf : eService.getConsistsOf()) {
|
||||
eServiceInstances.put(consistsOf.getUUID(), consistsOf);
|
||||
eServiceInstances.put(consistsOf.getTarget().getUUID(), consistsOf.getTarget());
|
||||
eServiceInstances.put(consistsOf.getID(), consistsOf);
|
||||
eServiceInstances.put(consistsOf.getTarget().getID(), consistsOf.getTarget());
|
||||
}
|
||||
|
||||
HostingNode hostingNode = ERManagementTest.createHostingNode(eService);
|
||||
UUID hostingNodeUUID = hostingNode.getUUID();
|
||||
UUID hostingNodeUUID = hostingNode.getID();
|
||||
|
||||
Map<UUID, IdentifiableElement> hostingNodeInstances = new HashMap<>();
|
||||
hostingNodeInstances.put(hostingNodeUUID, hostingNode);
|
||||
|
||||
for(ConsistsOf<?,?> consistsOf : hostingNode.getConsistsOf()) {
|
||||
hostingNodeInstances.put(consistsOf.getUUID(), consistsOf);
|
||||
hostingNodeInstances.put(consistsOf.getTarget().getUUID(), consistsOf.getTarget());
|
||||
hostingNodeInstances.put(consistsOf.getID(), consistsOf);
|
||||
hostingNodeInstances.put(consistsOf.getTarget().getID(), consistsOf.getTarget());
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------------ */
|
||||
|
@ -236,7 +236,7 @@ public class BasicTest extends MultiContextTest {
|
|||
ResourceManagement resourceManagement = ERManagementTest.getResourceManagement(hostingNode);
|
||||
try {
|
||||
resourceManagement.read();
|
||||
String error = String.format("{} with UUID {} should not be visible.", HostingNode.NAME, hostingNode.getUUID());
|
||||
String error = String.format("{} with UUID {} should not be visible.", HostingNode.NAME, hostingNode.getID());
|
||||
logger.trace(error);
|
||||
throw new Exception(error);
|
||||
}catch (ResourceAvailableInAnotherContextException e) {
|
||||
|
@ -246,7 +246,7 @@ public class BasicTest extends MultiContextTest {
|
|||
isRelatedToManagement = ERManagementTest.getIsRelatedToManagement(activates);
|
||||
try {
|
||||
isRelatedToManagement.read();
|
||||
String error = String.format("{} with UUID {} should not be visible.", Activates.NAME, activates.getUUID());
|
||||
String error = String.format("{} with UUID {} should not be visible.", Activates.NAME, activates.getID());
|
||||
logger.trace(error);
|
||||
throw new Exception(error);
|
||||
}catch (RelationAvailableInAnotherContextException e) {
|
||||
|
@ -256,7 +256,7 @@ public class BasicTest extends MultiContextTest {
|
|||
resourceManagement = ERManagementTest.getResourceManagement(eService);
|
||||
try {
|
||||
resourceManagement.read();
|
||||
String error = String.format("{} with UUID {} should not be visible.", EService.NAME, eService.getUUID());
|
||||
String error = String.format("{} with UUID {} should not be visible.", EService.NAME, eService.getID());
|
||||
logger.trace(error);
|
||||
throw new Exception(error);
|
||||
}catch (ResourceAvailableInAnotherContextException e) {
|
||||
|
@ -287,7 +287,7 @@ public class BasicTest extends MultiContextTest {
|
|||
|
||||
try {
|
||||
resourceManagement.read();
|
||||
String error = String.format("{} with UUID {} should not be found.", HostingNode.NAME, hostingNode.getUUID());
|
||||
String error = String.format("{} with UUID {} should not be found.", HostingNode.NAME, hostingNode.getID());
|
||||
logger.trace(error);
|
||||
throw new Exception(error);
|
||||
}catch (ResourceNotFoundException e) {
|
||||
|
@ -297,7 +297,7 @@ public class BasicTest extends MultiContextTest {
|
|||
IsRelatedToManagement isRelatedToManagement = ERManagementTest.getIsRelatedToManagement(activates);
|
||||
try {
|
||||
isRelatedToManagement.read();
|
||||
String error = String.format("{} with UUID {} should not be found.", Activates.NAME, activates.getUUID());
|
||||
String error = String.format("{} with UUID {} should not be found.", Activates.NAME, activates.getID());
|
||||
logger.trace(error);
|
||||
throw new Exception(error);
|
||||
}catch (IsRelatedToNotFoundException e) {
|
||||
|
@ -307,7 +307,7 @@ public class BasicTest extends MultiContextTest {
|
|||
resourceManagement = ERManagementTest.getResourceManagement(eService);
|
||||
try {
|
||||
resourceManagement.read();
|
||||
String error = String.format("{} with UUID {} should not be found.", EService.NAME, eService.getUUID());
|
||||
String error = String.format("{} with UUID {} should not be found.", EService.NAME, eService.getID());
|
||||
logger.trace(error);
|
||||
throw new Exception(error);
|
||||
}catch (ResourceNotFoundException e) {
|
||||
|
|
|
@ -83,7 +83,7 @@ public class ComplexTest extends MultiContextTest {
|
|||
|
||||
for(Facet facet : hostingNode.getFacets()) {
|
||||
FacetManagement facetManagement = new FacetManagement();
|
||||
facetManagement.setUUID(facet.getUUID());
|
||||
facetManagement.setUUID(facet.getID());
|
||||
String typeName = TypeUtility.getTypeName(facet.getClass());
|
||||
facetManagement.setElementType(typeName);
|
||||
String facetContexts = facetManagement.getContexts();
|
||||
|
@ -97,7 +97,7 @@ public class ComplexTest extends MultiContextTest {
|
|||
}
|
||||
|
||||
activatesManagement = new IsRelatedToManagement();
|
||||
activatesManagement.setUUID(createdActivates.getUUID());
|
||||
activatesManagement.setUUID(createdActivates.getID());
|
||||
activatesManagement.setElementType(TypeUtility.getTypeName(createdActivates.getClass()));
|
||||
String isRelatedToContexts = activatesManagement.getContexts();
|
||||
logger.debug("Contexts of {} with UUID {} have the following UUID {}", Activates.NAME, activatesManagement.getUUID(), isRelatedToContexts);
|
||||
|
|
|
@ -43,7 +43,7 @@ public class MultiContextTest extends ERManagementTest {
|
|||
@SuppressWarnings({ "unchecked", "unused" })
|
||||
private Map<UUID, Element> getRemovedExpectedInstances(Resource r) throws Exception {
|
||||
Map<UUID, Element> expected = new HashMap<>();
|
||||
expected.put(r.getUUID(), r);
|
||||
expected.put(r.getID(), r);
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
List<IsRelatedTo> list = getOutcomingIsRelatedTo(r);
|
||||
|
@ -51,16 +51,16 @@ public class MultiContextTest extends ERManagementTest {
|
|||
|
||||
for (IsRelatedTo<? extends Resource, ? extends Resource> isRelatedTo : list) {
|
||||
if (isRelatedTo.getPropagationConstraint().getRemoveConstraint() == RemoveConstraint.cascade) {
|
||||
expected.put(isRelatedTo.getUUID(), isRelatedTo);
|
||||
expected.put(isRelatedTo.getID(), isRelatedTo);
|
||||
expected.putAll(getRemovedExpectedInstances(isRelatedTo.getTarget()));
|
||||
}
|
||||
|
||||
if (isRelatedTo.getPropagationConstraint().getRemoveConstraint() == RemoveConstraint.cascadeWhenOrphan) {
|
||||
expected.put(isRelatedTo.getUUID(), isRelatedTo);
|
||||
expected.put(isRelatedTo.getID(), isRelatedTo);
|
||||
@SuppressWarnings("rawtypes")
|
||||
List<IsRelatedTo> incoming = getIncomingIsRelatedTo(r);
|
||||
if(incoming.size()==1) {
|
||||
Assert.assertTrue(incoming.get(0).getUUID().compareTo(isRelatedTo.getUUID())==0);
|
||||
Assert.assertTrue(incoming.get(0).getID().compareTo(isRelatedTo.getID())==0);
|
||||
expected.putAll(getRemovedExpectedInstances(isRelatedTo.getTarget()));
|
||||
}
|
||||
|
||||
|
@ -70,9 +70,9 @@ public class MultiContextTest extends ERManagementTest {
|
|||
for (ConsistsOf<? extends Resource, ? extends Facet> consistsOf : r.getConsistsOf()) {
|
||||
if (consistsOf.getPropagationConstraint().getRemoveConstraint() == RemoveConstraint.cascade || consistsOf
|
||||
.getPropagationConstraint().getRemoveConstraint() == RemoveConstraint.cascadeWhenOrphan) {
|
||||
expected.put(consistsOf.getUUID(), consistsOf);
|
||||
expected.put(consistsOf.getID(), consistsOf);
|
||||
Facet facet = consistsOf.getTarget();
|
||||
expected.put(facet.getUUID(), facet);
|
||||
expected.put(facet.getID(), facet);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -154,7 +154,7 @@ public class MultiContextTest extends ERManagementTest {
|
|||
resourceManagement.setElementType(Resource.NAME);
|
||||
|
||||
String resourceType = TypeMapper.getType(r);
|
||||
UUID resourceUUID = r.getUUID();
|
||||
UUID resourceUUID = r.getID();
|
||||
|
||||
// resourceManagement.setUUID(resourceUUID);
|
||||
String ret = resourceManagement.query(IsRelatedTo.NAME, resourceType, resourceUUID, oDirection, true,
|
||||
|
@ -183,7 +183,7 @@ public class MultiContextTest extends ERManagementTest {
|
|||
Resource r = ElementMapper.unmarshal(resource.getClass(), json);
|
||||
|
||||
Map<UUID, Element> expected = new HashMap<>();
|
||||
expected.put(r.getUUID(), r);
|
||||
expected.put(r.getID(), r);
|
||||
|
||||
RelationConstraintEvaluator relationConstraintEvaluator = new RelationConstraintEvaluator() {
|
||||
|
||||
|
@ -203,15 +203,15 @@ public class MultiContextTest extends ERManagementTest {
|
|||
|
||||
for (IsRelatedTo<? extends Resource, ? extends Resource> isRelatedTo : r.getIsRelatedTo()) {
|
||||
if (isRelatedTo.getPropagationConstraint().getAddConstraint() == AddConstraint.propagate) {
|
||||
expected.put(isRelatedTo.getUUID(), isRelatedTo);
|
||||
expected.put(isRelatedTo.getID(), isRelatedTo);
|
||||
expected.putAll(getExpectedInstancesAddToContext(isRelatedTo.getTarget()));
|
||||
}
|
||||
}
|
||||
for (ConsistsOf<? extends Resource, ? extends Facet> consistsOf : r.getConsistsOf()) {
|
||||
if (consistsOf.getPropagationConstraint().getAddConstraint() == AddConstraint.propagate) {
|
||||
expected.put(consistsOf.getUUID(), consistsOf);
|
||||
expected.put(consistsOf.getID(), consistsOf);
|
||||
Facet facet = consistsOf.getTarget();
|
||||
expected.put(facet.getUUID(), facet);
|
||||
expected.put(facet.getID(), facet);
|
||||
}
|
||||
}
|
||||
return expected;
|
||||
|
@ -237,7 +237,7 @@ public class MultiContextTest extends ERManagementTest {
|
|||
String json = resourceManagement.read();
|
||||
Resource resource = ElementMapper.unmarshal(r.getClass(), json);
|
||||
Assert.assertTrue(resource.getClass() == r.getClass());
|
||||
Assert.assertTrue(resource.getUUID().compareTo(r.getUUID())==0);
|
||||
Assert.assertTrue(resource.getID().compareTo(r.getID())==0);
|
||||
ContextTest.setContextByName(currentContext);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -162,8 +162,8 @@ public class QueryTest extends ERManagementTest {
|
|||
HostingNode hostingNode = (HostingNode) map.get(HostingNode.NAME);
|
||||
|
||||
try {
|
||||
UUID eServiceUUID = eService.getUUID();
|
||||
UUID hostingNodeUUID = hostingNode.getUUID();
|
||||
UUID eServiceUUID = eService.getID();
|
||||
UUID hostingNodeUUID = hostingNode.getID();
|
||||
|
||||
ResourceManagement resourceManagement = new ResourceManagement();
|
||||
resourceManagement.setElementType(Service.NAME);
|
||||
|
@ -174,13 +174,13 @@ public class QueryTest extends ERManagementTest {
|
|||
List<Resource> resourceList = ElementMapper.unmarshalList(Resource.class, json);
|
||||
Assert.assertTrue(resourceList.size() == 1);
|
||||
Resource resource = resourceList.get(0);
|
||||
Assert.assertTrue(resource.getUUID().compareTo(hostingNodeUUID) == 0);
|
||||
Assert.assertTrue(resource.getID().compareTo(hostingNodeUUID) == 0);
|
||||
|
||||
json = resourceManagement.query(IsRelatedTo.NAME, EService.NAME, eServiceUUID, ODirection.OUT, true, null);
|
||||
resourceList = ElementMapper.unmarshalList(Resource.class, json);
|
||||
Assert.assertTrue(resourceList.size() == 1);
|
||||
resource = resourceList.get(0);
|
||||
Assert.assertTrue(resource.getUUID().compareTo(hostingNodeUUID) == 0);
|
||||
Assert.assertTrue(resource.getID().compareTo(hostingNodeUUID) == 0);
|
||||
|
||||
json = resourceManagement.query(IsRelatedTo.NAME, EService.NAME, eServiceUUID, ODirection.IN, true, null);
|
||||
resourceList = ElementMapper.unmarshalList(Resource.class, json);
|
||||
|
@ -202,7 +202,7 @@ public class QueryTest extends ERManagementTest {
|
|||
null);
|
||||
resourceList = ElementMapper.unmarshalList(Resource.class, json);
|
||||
Assert.assertTrue(resourceList.size() == 1);
|
||||
Assert.assertTrue(resourceList.get(0).getUUID().compareTo(eServiceUUID) == 0);
|
||||
Assert.assertTrue(resourceList.get(0).getID().compareTo(eServiceUUID) == 0);
|
||||
|
||||
json = resourceManagement.query(IsRelatedTo.NAME, HostingNode.NAME, hostingNodeUUID, ODirection.OUT, true, null);
|
||||
resourceList = ElementMapper.unmarshalList(Resource.class, json);
|
||||
|
@ -211,7 +211,7 @@ public class QueryTest extends ERManagementTest {
|
|||
json = resourceManagement.query(IsRelatedTo.NAME, HostingNode.NAME, hostingNodeUUID, ODirection.IN, true, null);
|
||||
resourceList = ElementMapper.unmarshalList(Resource.class, json);
|
||||
Assert.assertTrue(resourceList.size() == 1);
|
||||
Assert.assertTrue(resourceList.get(0).getUUID().compareTo(eServiceUUID) == 0);
|
||||
Assert.assertTrue(resourceList.get(0).getID().compareTo(eServiceUUID) == 0);
|
||||
|
||||
json = resourceManagement.query(IsRelatedTo.NAME, HostingNode.NAME, hostingNodeUUID, ODirection.BOTH, false,
|
||||
null);
|
||||
|
@ -229,7 +229,7 @@ public class QueryTest extends ERManagementTest {
|
|||
/* END Getting HostingNode */
|
||||
|
||||
Facet identificationFacet = eService.getIdentificationFacets().get(0);
|
||||
UUID identificationFacetUUID = identificationFacet.getUUID();
|
||||
UUID identificationFacetUUID = identificationFacet.getID();
|
||||
|
||||
/* EService --ConsistsOf--> SoftwareFacet */
|
||||
try {
|
||||
|
@ -245,8 +245,8 @@ public class QueryTest extends ERManagementTest {
|
|||
Assert.assertTrue(resourceList.size() == 1);
|
||||
resource = resourceList.get(0);
|
||||
Facet targetIdentificationFacet = ((GCubeResource) resource).getIdentificationFacets().get(0);
|
||||
Assert.assertTrue(resource.getUUID().compareTo(eServiceUUID) == 0);
|
||||
Assert.assertTrue(targetIdentificationFacet.getUUID().compareTo(identificationFacetUUID) == 0);
|
||||
Assert.assertTrue(resource.getID().compareTo(eServiceUUID) == 0);
|
||||
Assert.assertTrue(targetIdentificationFacet.getID().compareTo(identificationFacetUUID) == 0);
|
||||
|
||||
try {
|
||||
json = resourceManagement.query(ConsistsOf.NAME, SoftwareFacet.NAME, identificationFacetUUID, ODirection.IN,
|
||||
|
@ -366,8 +366,8 @@ public class QueryTest extends ERManagementTest {
|
|||
int expectedSize = 1;
|
||||
|
||||
Set<UUID> expectedUUIDFor2Results = new HashSet<>();
|
||||
expectedUUIDFor2Results.add(createdConfigurations.get(3).getUUID());
|
||||
expectedUUIDFor2Results.add(createdConfigurations.get(4).getUUID());
|
||||
expectedUUIDFor2Results.add(createdConfigurations.get(3).getID());
|
||||
expectedUUIDFor2Results.add(createdConfigurations.get(4).getID());
|
||||
|
||||
for(int i=0; i<names.length; i++) {
|
||||
|
||||
|
@ -377,7 +377,7 @@ public class QueryTest extends ERManagementTest {
|
|||
}
|
||||
|
||||
Configuration expected = createdConfigurations.get(i);
|
||||
UUID expectedUUID = expected.getUUID();
|
||||
UUID expectedUUID = expected.getID();
|
||||
|
||||
for(Boolean polymorphic : polymorphics) {
|
||||
|
||||
|
@ -398,12 +398,12 @@ public class QueryTest extends ERManagementTest {
|
|||
Assert.assertTrue(list.size()==expectedSize);
|
||||
if(expectedSize==1) {
|
||||
Configuration configuration = list.get(0);
|
||||
UUID gotUUID = configuration.getUUID();
|
||||
UUID gotUUID = configuration.getID();
|
||||
Assert.assertTrue(gotUUID.compareTo(expectedUUID)==0);
|
||||
}else {
|
||||
Set<UUID> gotUUIDs = new HashSet<>();
|
||||
for(Configuration c : list) {
|
||||
gotUUIDs.add(c.getUUID());
|
||||
gotUUIDs.add(c.getID());
|
||||
}
|
||||
|
||||
Assert.assertTrue(gotUUIDs.containsAll(expectedUUIDFor2Results));
|
||||
|
@ -425,13 +425,13 @@ public class QueryTest extends ERManagementTest {
|
|||
if(expectedSize==1) {
|
||||
ConfigurationTemplate configurationTemplate = listPolimorphic.get(0);
|
||||
Assert.assertTrue(configurationTemplate instanceof Configuration);
|
||||
UUID gotPolimorphicUUID = configurationTemplate.getUUID();
|
||||
UUID gotPolimorphicUUID = configurationTemplate.getID();
|
||||
Assert.assertTrue(gotPolimorphicUUID.compareTo(expectedUUID)==0);
|
||||
}else {
|
||||
Set<UUID> gotUUIDs = new HashSet<>();
|
||||
for(ConfigurationTemplate c : listPolimorphic) {
|
||||
Assert.assertTrue(c instanceof Configuration);
|
||||
gotUUIDs.add(c.getUUID());
|
||||
gotUUIDs.add(c.getID());
|
||||
}
|
||||
|
||||
Assert.assertTrue(gotUUIDs.containsAll(expectedUUIDFor2Results));
|
||||
|
|
|
@ -38,8 +38,8 @@ public class QueryTemplateManagementTest extends ContextTest {
|
|||
public static final String GROUP_VARIABLE_NAME = "$group";
|
||||
|
||||
public static void checkUUIDAndMetadata(IdentifiableElement previous, IdentifiableElement got) {
|
||||
Assert.assertTrue(got.getUUID()!= null);
|
||||
Assert.assertTrue(got.getUUID().compareTo(previous.getUUID()) == 0);
|
||||
Assert.assertTrue(got.getID()!= null);
|
||||
Assert.assertTrue(got.getID().compareTo(previous.getID()) == 0);
|
||||
|
||||
Metadata gotMetadata = got.getMetadata();
|
||||
Metadata previousMetadata = previous.getMetadata();
|
||||
|
|
|
@ -41,10 +41,10 @@ public class FacetManagementTest extends MultiContextTest {
|
|||
}
|
||||
|
||||
public static void checkUUIDAndMetadata(IdentifiableElement er, UUID uuid, boolean create) {
|
||||
Assert.assertTrue(er.getUUID() != null);
|
||||
Assert.assertTrue(er.getID() != null);
|
||||
|
||||
if(uuid != null) {
|
||||
Assert.assertTrue(er.getUUID().compareTo(uuid) == 0);
|
||||
Assert.assertTrue(er.getID().compareTo(uuid) == 0);
|
||||
}
|
||||
|
||||
Assert.assertTrue(er.getMetadata() != null);
|
||||
|
|
|
@ -30,10 +30,10 @@
|
|||
"isRelatedTo" : [
|
||||
{
|
||||
"type": "Activates",
|
||||
"uuid": "d3f58e52-5346-47bc-b736-9d77a0b554ce",
|
||||
"id": "d3f58e52-5346-47bc-b736-9d77a0b554ce",
|
||||
"source": {
|
||||
"type": "HostingNode",
|
||||
"uuid" : "5fbc1a56-d450-4f0f-85c1-9b1684581717"
|
||||
"id" : "5fbc1a56-d450-4f0f-85c1-9b1684581717"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
|
@ -1 +1 @@
|
|||
TRAVERSE outV("EService") FROM ( TRAVERSE inE("ConsistsOf") FROM ( SELECT FROM ( TRAVERSE inV("AccessPointFacet") FROM ( TRAVERSE outE("ConsistsOf") FROM ( TRAVERSE outV("EService") FROM ( TRAVERSE inE("IsIdentifiedBy") FROM ( SELECT FROM ( TRAVERSE inV("SoftwareFacet") FROM ( TRAVERSE outE("IsIdentifiedBy") FROM ( TRAVERSE outV("EService") FROM ( SELECT FROM ( TRAVERSE inE("ConsistsOf") FROM ( SELECT FROM ( TRAVERSE inV("StateFacet") FROM ( TRAVERSE outE("ConsistsOf") FROM ( TRAVERSE inV("EService") FROM ( TRAVERSE outE("Activates") FROM ( SELECT FROM ( TRAVERSE outV("HostingNode") FROM ( SELECT FROM Activates WHERE uuid = "d3f58e52-5346-47bc-b736-9d77a0b554ce")) WHERE uuid = "5fbc1a56-d450-4f0f-85c1-9b1684581717"))))) WHERE value = "down")) WHERE propagationConstraint.add = "propagate")))) WHERE name = "data-transfer-service" AND group = "DataTransfer"))))) WHERE endpoint = "http://pc-frosini.isti.cnr.it:8080/data-transfer-service/gcube/service"))
|
||||
TRAVERSE outV("EService") FROM ( TRAVERSE inE("ConsistsOf") FROM ( SELECT FROM ( TRAVERSE inV("AccessPointFacet") FROM ( TRAVERSE outE("ConsistsOf") FROM ( TRAVERSE outV("EService") FROM ( TRAVERSE inE("IsIdentifiedBy") FROM ( SELECT FROM ( TRAVERSE inV("SoftwareFacet") FROM ( TRAVERSE outE("IsIdentifiedBy") FROM ( TRAVERSE outV("EService") FROM ( SELECT FROM ( TRAVERSE inE("ConsistsOf") FROM ( SELECT FROM ( TRAVERSE inV("StateFacet") FROM ( TRAVERSE outE("ConsistsOf") FROM ( TRAVERSE inV("EService") FROM ( TRAVERSE outE("Activates") FROM ( SELECT FROM ( TRAVERSE outV("HostingNode") FROM ( SELECT FROM Activates WHERE id = "d3f58e52-5346-47bc-b736-9d77a0b554ce")) WHERE id = "5fbc1a56-d450-4f0f-85c1-9b1684581717"))))) WHERE value = "down")) WHERE propagationConstraint.add = "propagate")))) WHERE name = "data-transfer-service" AND group = "DataTransfer"))))) WHERE endpoint = "http://pc-frosini.isti.cnr.it:8080/data-transfer-service/gcube/service"))
|
|
@ -5,7 +5,7 @@
|
|||
"type": "ConsistsOf",
|
||||
"source" : {
|
||||
"type" : "EService",
|
||||
"uuid": "0255b7ec-e3da-4071-b456-9a2907ece1db"
|
||||
"id": "0255b7ec-e3da-4071-b456-9a2907ece1db"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1 +1 @@
|
|||
SELECT FROM ( TRAVERSE inV("StateFacet") FROM ( TRAVERSE outE("ConsistsOf") FROM ( SELECT FROM EService WHERE uuid = "0255b7ec-e3da-4071-b456-9a2907ece1db"))) WHERE value = "down"
|
||||
SELECT FROM ( TRAVERSE inV("StateFacet") FROM ( TRAVERSE outE("ConsistsOf") FROM ( SELECT FROM EService WHERE id = "0255b7ec-e3da-4071-b456-9a2907ece1db"))) WHERE value = "down"
|
|
@ -7,11 +7,11 @@
|
|||
"type" : "EService",
|
||||
"$or": [
|
||||
{"$and": {
|
||||
"uuid" : "aec0ef31-c735-4a4c-b2f4-57dfbd2fe925",
|
||||
"id" : "aec0ef31-c735-4a4c-b2f4-57dfbd2fe925",
|
||||
"metadata" :{ "createdBy": {"$ne": "luca.frosini"} }
|
||||
}},
|
||||
{"$and": {
|
||||
"uuid" : "0255b7ec-e3da-4071-b456-9a2907ece1db",
|
||||
"id" : "0255b7ec-e3da-4071-b456-9a2907ece1db",
|
||||
"metadata" : { "createdBy": "DataTransfer:data-transfer-service:pc-frosini.isti.cnr.it_8080" }
|
||||
}}
|
||||
]
|
||||
|
|
|
@ -1 +1 @@
|
|||
SELECT FROM ( TRAVERSE inV("StateFacet") FROM ( TRAVERSE outE("ConsistsOf") FROM ( SELECT FROM EService WHERE ((uuid = "aec0ef31-c735-4a4c-b2f4-57dfbd2fe925" AND metadata.createdBy <> "luca.frosini") OR (uuid = "0255b7ec-e3da-4071-b456-9a2907ece1db" AND metadata.createdBy = "DataTransfer:data-transfer-service:pc-frosini.isti.cnr.it_8080"))))) WHERE value = "down"
|
||||
SELECT FROM ( TRAVERSE inV("StateFacet") FROM ( TRAVERSE outE("ConsistsOf") FROM ( SELECT FROM EService WHERE ((id = "aec0ef31-c735-4a4c-b2f4-57dfbd2fe925" AND metadata.createdBy <> "luca.frosini") OR (id = "0255b7ec-e3da-4071-b456-9a2907ece1db" AND metadata.createdBy = "DataTransfer:data-transfer-service:pc-frosini.isti.cnr.it_8080"))))) WHERE value = "down"
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"type": "EService",
|
||||
"uuid": "0255b7ec-e3da-4071-b456-9a2907ece1db",
|
||||
"id": "0255b7ec-e3da-4071-b456-9a2907ece1db",
|
||||
"consistsOf": [
|
||||
{
|
||||
"type": "ConsistsOf",
|
||||
|
@ -31,10 +31,10 @@
|
|||
"isRelatedTo" : [
|
||||
{
|
||||
"type": "Activates",
|
||||
"uuid": "d3f58e52-5346-47bc-b736-9d77a0b554ce",
|
||||
"id": "d3f58e52-5346-47bc-b736-9d77a0b554ce",
|
||||
"source": {
|
||||
"type": "HostingNode",
|
||||
"uuid" : "5fbc1a56-d450-4f0f-85c1-9b1684581717",
|
||||
"id" : "5fbc1a56-d450-4f0f-85c1-9b1684581717",
|
||||
"consistsOf": [
|
||||
{
|
||||
"type": "ConsistsOf",
|
||||
|
|
|
@ -1 +1 @@
|
|||
SELECT FROM ( TRAVERSE outV("EService") FROM ( TRAVERSE inE("ConsistsOf") FROM ( SELECT FROM ( TRAVERSE inV("AccessPointFacet") FROM ( TRAVERSE outE("ConsistsOf") FROM ( TRAVERSE outV("EService") FROM ( TRAVERSE inE("IsIdentifiedBy") FROM ( SELECT FROM ( TRAVERSE inV("SoftwareFacet") FROM ( TRAVERSE outE("IsIdentifiedBy") FROM ( TRAVERSE outV("EService") FROM ( SELECT FROM ( TRAVERSE inE("ConsistsOf") FROM ( SELECT FROM ( TRAVERSE inV("StateFacet") FROM ( TRAVERSE outE("ConsistsOf") FROM ( TRAVERSE inV("EService") FROM ( TRAVERSE outE("Activates") FROM ( SELECT FROM ( TRAVERSE outV("HostingNode") FROM ( TRAVERSE inE("ConsistsOf") FROM ( SELECT FROM ( TRAVERSE inV("CPUFacet") FROM ( TRAVERSE outE("ConsistsOf") FROM ( TRAVERSE outV("HostingNode") FROM ( SELECT FROM Activates WHERE uuid = "d3f58e52-5346-47bc-b736-9d77a0b554ce")))) WHERE vendor = "GenuineIntel"))) WHERE uuid = "5fbc1a56-d450-4f0f-85c1-9b1684581717"))))) WHERE value = "down")) WHERE propagationConstraint.add = "propagate")))) WHERE name = "data-transfer-service" AND group = "DataTransfer"))))) WHERE endpoint = "http://pc-frosini.isti.cnr.it:8080/data-transfer-service/gcube/service"))) WHERE uuid = "0255b7ec-e3da-4071-b456-9a2907ece1db"
|
||||
SELECT FROM ( TRAVERSE outV("EService") FROM ( TRAVERSE inE("ConsistsOf") FROM ( SELECT FROM ( TRAVERSE inV("AccessPointFacet") FROM ( TRAVERSE outE("ConsistsOf") FROM ( TRAVERSE outV("EService") FROM ( TRAVERSE inE("IsIdentifiedBy") FROM ( SELECT FROM ( TRAVERSE inV("SoftwareFacet") FROM ( TRAVERSE outE("IsIdentifiedBy") FROM ( TRAVERSE outV("EService") FROM ( SELECT FROM ( TRAVERSE inE("ConsistsOf") FROM ( SELECT FROM ( TRAVERSE inV("StateFacet") FROM ( TRAVERSE outE("ConsistsOf") FROM ( TRAVERSE inV("EService") FROM ( TRAVERSE outE("Activates") FROM ( SELECT FROM ( TRAVERSE outV("HostingNode") FROM ( TRAVERSE inE("ConsistsOf") FROM ( SELECT FROM ( TRAVERSE inV("CPUFacet") FROM ( TRAVERSE outE("ConsistsOf") FROM ( TRAVERSE outV("HostingNode") FROM ( SELECT FROM Activates WHERE id = "d3f58e52-5346-47bc-b736-9d77a0b554ce")))) WHERE vendor = "GenuineIntel"))) WHERE id = "5fbc1a56-d450-4f0f-85c1-9b1684581717"))))) WHERE value = "down")) WHERE propagationConstraint.add = "propagate")))) WHERE name = "data-transfer-service" AND group = "DataTransfer"))))) WHERE endpoint = "http://pc-frosini.isti.cnr.it:8080/data-transfer-service/gcube/service"))) WHERE id = "0255b7ec-e3da-4071-b456-9a2907ece1db"
|
|
@ -6,11 +6,11 @@
|
|||
"type" : "EService",
|
||||
"$or": [
|
||||
{"$and": {
|
||||
"uuid" : "aec0ef31-c735-4a4c-b2f4-57dfbd2fe925",
|
||||
"id" : "aec0ef31-c735-4a4c-b2f4-57dfbd2fe925",
|
||||
"metadata" :{ "createdBy": {"$ne": "luca.frosini"} }
|
||||
}},
|
||||
{"$and": {
|
||||
"uuid" : "0255b7ec-e3da-4071-b456-9a2907ece1db",
|
||||
"id" : "0255b7ec-e3da-4071-b456-9a2907ece1db",
|
||||
"metadata" : { "createdBy": "DataTransfer:data-transfer-service:pc-frosini.isti.cnr.it_8080" }
|
||||
}}
|
||||
]
|
||||
|
|
|
@ -1 +1 @@
|
|||
SELECT FROM ( TRAVERSE inV("StateFacet") FROM ( TRAVERSE outE("ConsistsOf") FROM ( SELECT FROM EService WHERE ((uuid = "aec0ef31-c735-4a4c-b2f4-57dfbd2fe925" AND metadata.createdBy <> "luca.frosini") OR (uuid = "0255b7ec-e3da-4071-b456-9a2907ece1db" AND metadata.createdBy = "DataTransfer:data-transfer-service:pc-frosini.isti.cnr.it_8080")))))
|
||||
SELECT FROM ( TRAVERSE inV("StateFacet") FROM ( TRAVERSE outE("ConsistsOf") FROM ( SELECT FROM EService WHERE ((id = "aec0ef31-c735-4a4c-b2f4-57dfbd2fe925" AND metadata.createdBy <> "luca.frosini") OR (id = "0255b7ec-e3da-4071-b456-9a2907ece1db" AND metadata.createdBy = "DataTransfer:data-transfer-service:pc-frosini.isti.cnr.it_8080")))))
|
Loading…
Reference in New Issue