Fixed imports and code to comply with IsIdentifiedBy relation which has
been moved from IS Model to gCube Model
This commit is contained in:
parent
7e602b72bd
commit
a830b8de37
|
@ -20,14 +20,12 @@ import org.gcube.informationsystem.base.impl.properties.HeaderImpl;
|
||||||
import org.gcube.informationsystem.model.impl.properties.EncryptedImpl;
|
import org.gcube.informationsystem.model.impl.properties.EncryptedImpl;
|
||||||
import org.gcube.informationsystem.model.impl.properties.PropagationConstraintImpl;
|
import org.gcube.informationsystem.model.impl.properties.PropagationConstraintImpl;
|
||||||
import org.gcube.informationsystem.model.impl.relations.ConsistsOfImpl;
|
import org.gcube.informationsystem.model.impl.relations.ConsistsOfImpl;
|
||||||
import org.gcube.informationsystem.model.impl.relations.IsIdentifiedByImpl;
|
|
||||||
import org.gcube.informationsystem.model.reference.entities.Facet;
|
import org.gcube.informationsystem.model.reference.entities.Facet;
|
||||||
import org.gcube.informationsystem.model.reference.entities.Resource;
|
import org.gcube.informationsystem.model.reference.entities.Resource;
|
||||||
import org.gcube.informationsystem.model.reference.properties.Encrypted;
|
import org.gcube.informationsystem.model.reference.properties.Encrypted;
|
||||||
import org.gcube.informationsystem.model.reference.properties.PropagationConstraint;
|
import org.gcube.informationsystem.model.reference.properties.PropagationConstraint;
|
||||||
import org.gcube.informationsystem.model.reference.properties.PropagationConstraint.RemoveConstraint;
|
import org.gcube.informationsystem.model.reference.properties.PropagationConstraint.RemoveConstraint;
|
||||||
import org.gcube.informationsystem.model.reference.relations.ConsistsOf;
|
import org.gcube.informationsystem.model.reference.relations.ConsistsOf;
|
||||||
import org.gcube.informationsystem.model.reference.relations.IsIdentifiedBy;
|
|
||||||
import org.gcube.informationsystem.model.reference.relations.IsRelatedTo;
|
import org.gcube.informationsystem.model.reference.relations.IsRelatedTo;
|
||||||
import org.gcube.informationsystem.model.reference.relations.Relation;
|
import org.gcube.informationsystem.model.reference.relations.Relation;
|
||||||
import org.gcube.informationsystem.resourceregistry.ContextTest;
|
import org.gcube.informationsystem.resourceregistry.ContextTest;
|
||||||
|
@ -53,6 +51,7 @@ import org.gcube.resourcemanagement.model.impl.entities.facets.StateFacetImpl;
|
||||||
import org.gcube.resourcemanagement.model.impl.entities.resources.EServiceImpl;
|
import org.gcube.resourcemanagement.model.impl.entities.resources.EServiceImpl;
|
||||||
import org.gcube.resourcemanagement.model.impl.entities.resources.HostingNodeImpl;
|
import org.gcube.resourcemanagement.model.impl.entities.resources.HostingNodeImpl;
|
||||||
import org.gcube.resourcemanagement.model.impl.properties.ValueSchemaImpl;
|
import org.gcube.resourcemanagement.model.impl.properties.ValueSchemaImpl;
|
||||||
|
import org.gcube.resourcemanagement.model.impl.relations.consistsof.IsIdentifiedByImpl;
|
||||||
import org.gcube.resourcemanagement.model.impl.relations.isrelatedto.ActivatesImpl;
|
import org.gcube.resourcemanagement.model.impl.relations.isrelatedto.ActivatesImpl;
|
||||||
import org.gcube.resourcemanagement.model.reference.entities.facets.AccessPointFacet;
|
import org.gcube.resourcemanagement.model.reference.entities.facets.AccessPointFacet;
|
||||||
import org.gcube.resourcemanagement.model.reference.entities.facets.CPUFacet;
|
import org.gcube.resourcemanagement.model.reference.entities.facets.CPUFacet;
|
||||||
|
@ -66,9 +65,11 @@ import org.gcube.resourcemanagement.model.reference.entities.facets.SoftwareFace
|
||||||
import org.gcube.resourcemanagement.model.reference.entities.facets.StateFacet;
|
import org.gcube.resourcemanagement.model.reference.entities.facets.StateFacet;
|
||||||
import org.gcube.resourcemanagement.model.reference.entities.resources.Configuration;
|
import org.gcube.resourcemanagement.model.reference.entities.resources.Configuration;
|
||||||
import org.gcube.resourcemanagement.model.reference.entities.resources.EService;
|
import org.gcube.resourcemanagement.model.reference.entities.resources.EService;
|
||||||
|
import org.gcube.resourcemanagement.model.reference.entities.resources.GCubeResource;
|
||||||
import org.gcube.resourcemanagement.model.reference.entities.resources.HostingNode;
|
import org.gcube.resourcemanagement.model.reference.entities.resources.HostingNode;
|
||||||
import org.gcube.resourcemanagement.model.reference.entities.resources.Service;
|
import org.gcube.resourcemanagement.model.reference.entities.resources.Service;
|
||||||
import org.gcube.resourcemanagement.model.reference.properties.ValueSchema;
|
import org.gcube.resourcemanagement.model.reference.properties.ValueSchema;
|
||||||
|
import org.gcube.resourcemanagement.model.reference.relations.consistsof.IsIdentifiedBy;
|
||||||
import org.gcube.resourcemanagement.model.reference.relations.isrelatedto.Activates;
|
import org.gcube.resourcemanagement.model.reference.relations.isrelatedto.Activates;
|
||||||
import org.junit.Assert;
|
import org.junit.Assert;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
@ -788,7 +789,7 @@ public class ERManagementTest extends ContextTest {
|
||||||
resourceList = ISMapper.unmarshalList(Resource.class, json);
|
resourceList = ISMapper.unmarshalList(Resource.class, json);
|
||||||
Assert.assertTrue(resourceList.size()==1);
|
Assert.assertTrue(resourceList.size()==1);
|
||||||
resource = resourceList.get(0);
|
resource = resourceList.get(0);
|
||||||
Facet targetIdentificationFacet = resource.getIdentificationFacets().get(0);
|
Facet targetIdentificationFacet = ((GCubeResource) resource).getIdentificationFacets().get(0);
|
||||||
Assert.assertTrue(resource.getHeader().getUUID().compareTo(eServiceUUID)==0);
|
Assert.assertTrue(resource.getHeader().getUUID().compareTo(eServiceUUID)==0);
|
||||||
Assert.assertTrue(targetIdentificationFacet.getHeader().getUUID().compareTo(identificationFacetUUID)==0);
|
Assert.assertTrue(targetIdentificationFacet.getHeader().getUUID().compareTo(identificationFacetUUID)==0);
|
||||||
|
|
||||||
|
|
|
@ -26,13 +26,11 @@ import org.gcube.informationsystem.base.impl.properties.HeaderImpl;
|
||||||
import org.gcube.informationsystem.base.reference.properties.Header;
|
import org.gcube.informationsystem.base.reference.properties.Header;
|
||||||
import org.gcube.informationsystem.model.impl.properties.PropagationConstraintImpl;
|
import org.gcube.informationsystem.model.impl.properties.PropagationConstraintImpl;
|
||||||
import org.gcube.informationsystem.model.impl.relations.ConsistsOfImpl;
|
import org.gcube.informationsystem.model.impl.relations.ConsistsOfImpl;
|
||||||
import org.gcube.informationsystem.model.impl.relations.IsIdentifiedByImpl;
|
|
||||||
import org.gcube.informationsystem.model.reference.entities.Facet;
|
import org.gcube.informationsystem.model.reference.entities.Facet;
|
||||||
import org.gcube.informationsystem.model.reference.entities.Resource;
|
import org.gcube.informationsystem.model.reference.entities.Resource;
|
||||||
import org.gcube.informationsystem.model.reference.properties.PropagationConstraint;
|
import org.gcube.informationsystem.model.reference.properties.PropagationConstraint;
|
||||||
import org.gcube.informationsystem.model.reference.properties.PropagationConstraint.RemoveConstraint;
|
import org.gcube.informationsystem.model.reference.properties.PropagationConstraint.RemoveConstraint;
|
||||||
import org.gcube.informationsystem.model.reference.relations.ConsistsOf;
|
import org.gcube.informationsystem.model.reference.relations.ConsistsOf;
|
||||||
import org.gcube.informationsystem.model.reference.relations.IsIdentifiedBy;
|
|
||||||
import org.gcube.informationsystem.resourceregistry.ContextTest;
|
import org.gcube.informationsystem.resourceregistry.ContextTest;
|
||||||
import org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException;
|
import org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException;
|
||||||
import org.gcube.informationsystem.resourceregistry.instances.model.entities.ResourceManagement;
|
import org.gcube.informationsystem.resourceregistry.instances.model.entities.ResourceManagement;
|
||||||
|
@ -46,6 +44,7 @@ import org.gcube.resourcemanagement.model.impl.entities.facets.SoftwareFacetImpl
|
||||||
import org.gcube.resourcemanagement.model.impl.entities.resources.HostingNodeImpl;
|
import org.gcube.resourcemanagement.model.impl.entities.resources.HostingNodeImpl;
|
||||||
import org.gcube.resourcemanagement.model.impl.relations.consistsof.HasPersistentMemoryImpl;
|
import org.gcube.resourcemanagement.model.impl.relations.consistsof.HasPersistentMemoryImpl;
|
||||||
import org.gcube.resourcemanagement.model.impl.relations.consistsof.HasVolatileMemoryImpl;
|
import org.gcube.resourcemanagement.model.impl.relations.consistsof.HasVolatileMemoryImpl;
|
||||||
|
import org.gcube.resourcemanagement.model.impl.relations.consistsof.IsIdentifiedByImpl;
|
||||||
import org.gcube.resourcemanagement.model.reference.entities.facets.CPUFacet;
|
import org.gcube.resourcemanagement.model.reference.entities.facets.CPUFacet;
|
||||||
import org.gcube.resourcemanagement.model.reference.entities.facets.ContainerStateFacet;
|
import org.gcube.resourcemanagement.model.reference.entities.facets.ContainerStateFacet;
|
||||||
import org.gcube.resourcemanagement.model.reference.entities.facets.MemoryFacet;
|
import org.gcube.resourcemanagement.model.reference.entities.facets.MemoryFacet;
|
||||||
|
@ -57,6 +56,7 @@ import org.gcube.resourcemanagement.model.reference.entities.resources.EService;
|
||||||
import org.gcube.resourcemanagement.model.reference.entities.resources.HostingNode;
|
import org.gcube.resourcemanagement.model.reference.entities.resources.HostingNode;
|
||||||
import org.gcube.resourcemanagement.model.reference.relations.consistsof.HasPersistentMemory;
|
import org.gcube.resourcemanagement.model.reference.relations.consistsof.HasPersistentMemory;
|
||||||
import org.gcube.resourcemanagement.model.reference.relations.consistsof.HasVolatileMemory;
|
import org.gcube.resourcemanagement.model.reference.relations.consistsof.HasVolatileMemory;
|
||||||
|
import org.gcube.resourcemanagement.model.reference.relations.consistsof.IsIdentifiedBy;
|
||||||
import org.junit.Assert;
|
import org.junit.Assert;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
|
|
|
@ -4,10 +4,8 @@ import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
import org.gcube.informationsystem.model.impl.relations.IsIdentifiedByImpl;
|
|
||||||
import org.gcube.informationsystem.model.reference.entities.Facet;
|
import org.gcube.informationsystem.model.reference.entities.Facet;
|
||||||
import org.gcube.informationsystem.model.reference.relations.ConsistsOf;
|
import org.gcube.informationsystem.model.reference.relations.ConsistsOf;
|
||||||
import org.gcube.informationsystem.model.reference.relations.IsIdentifiedBy;
|
|
||||||
import org.gcube.informationsystem.resourceregistry.ContextTest;
|
import org.gcube.informationsystem.resourceregistry.ContextTest;
|
||||||
import org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException;
|
import org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException;
|
||||||
import org.gcube.informationsystem.resourceregistry.instances.base.ERManagement;
|
import org.gcube.informationsystem.resourceregistry.instances.base.ERManagement;
|
||||||
|
@ -15,9 +13,11 @@ import org.gcube.informationsystem.resourceregistry.instances.base.ERManagementU
|
||||||
import org.gcube.informationsystem.resourceregistry.instances.model.entities.ResourceManagement;
|
import org.gcube.informationsystem.resourceregistry.instances.model.entities.ResourceManagement;
|
||||||
import org.gcube.informationsystem.utils.ISMapper;
|
import org.gcube.informationsystem.utils.ISMapper;
|
||||||
import org.gcube.resourcemanagement.model.impl.entities.resources.EServiceImpl;
|
import org.gcube.resourcemanagement.model.impl.entities.resources.EServiceImpl;
|
||||||
|
import org.gcube.resourcemanagement.model.impl.relations.consistsof.IsIdentifiedByImpl;
|
||||||
import org.gcube.resourcemanagement.model.reference.entities.facets.SoftwareFacet;
|
import org.gcube.resourcemanagement.model.reference.entities.facets.SoftwareFacet;
|
||||||
import org.gcube.resourcemanagement.model.reference.entities.resources.EService;
|
import org.gcube.resourcemanagement.model.reference.entities.resources.EService;
|
||||||
import org.gcube.resourcemanagement.model.reference.entities.resources.Service;
|
import org.gcube.resourcemanagement.model.reference.entities.resources.Service;
|
||||||
|
import org.gcube.resourcemanagement.model.reference.relations.consistsof.IsIdentifiedBy;
|
||||||
import org.junit.Assert;
|
import org.junit.Assert;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
|
|
|
@ -9,12 +9,10 @@ import java.util.Calendar;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
import org.gcube.informationsystem.model.impl.properties.PropagationConstraintImpl;
|
import org.gcube.informationsystem.model.impl.properties.PropagationConstraintImpl;
|
||||||
import org.gcube.informationsystem.model.impl.relations.IsIdentifiedByImpl;
|
|
||||||
import org.gcube.informationsystem.model.reference.entities.Facet;
|
import org.gcube.informationsystem.model.reference.entities.Facet;
|
||||||
import org.gcube.informationsystem.model.reference.properties.PropagationConstraint;
|
import org.gcube.informationsystem.model.reference.properties.PropagationConstraint;
|
||||||
import org.gcube.informationsystem.model.reference.properties.PropagationConstraint.AddConstraint;
|
import org.gcube.informationsystem.model.reference.properties.PropagationConstraint.AddConstraint;
|
||||||
import org.gcube.informationsystem.model.reference.properties.PropagationConstraint.RemoveConstraint;
|
import org.gcube.informationsystem.model.reference.properties.PropagationConstraint.RemoveConstraint;
|
||||||
import org.gcube.informationsystem.model.reference.relations.IsIdentifiedBy;
|
|
||||||
import org.gcube.informationsystem.resourceregistry.ContextTest;
|
import org.gcube.informationsystem.resourceregistry.ContextTest;
|
||||||
import org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException;
|
import org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException;
|
||||||
import org.gcube.informationsystem.resourceregistry.api.exceptions.context.ContextNotFoundException;
|
import org.gcube.informationsystem.resourceregistry.api.exceptions.context.ContextNotFoundException;
|
||||||
|
@ -40,20 +38,22 @@ import org.gcube.resourcemanagement.model.impl.entities.resources.EServiceImpl;
|
||||||
import org.gcube.resourcemanagement.model.impl.entities.resources.HostingNodeImpl;
|
import org.gcube.resourcemanagement.model.impl.entities.resources.HostingNodeImpl;
|
||||||
import org.gcube.resourcemanagement.model.impl.relations.consistsof.HasPersistentMemoryImpl;
|
import org.gcube.resourcemanagement.model.impl.relations.consistsof.HasPersistentMemoryImpl;
|
||||||
import org.gcube.resourcemanagement.model.impl.relations.consistsof.HasVolatileMemoryImpl;
|
import org.gcube.resourcemanagement.model.impl.relations.consistsof.HasVolatileMemoryImpl;
|
||||||
|
import org.gcube.resourcemanagement.model.impl.relations.consistsof.IsIdentifiedByImpl;
|
||||||
import org.gcube.resourcemanagement.model.impl.relations.isrelatedto.ActivatesImpl;
|
import org.gcube.resourcemanagement.model.impl.relations.isrelatedto.ActivatesImpl;
|
||||||
import org.gcube.resourcemanagement.model.reference.entities.facets.AccessPointFacet;
|
import org.gcube.resourcemanagement.model.reference.entities.facets.AccessPointFacet;
|
||||||
import org.gcube.resourcemanagement.model.reference.entities.facets.CPUFacet;
|
import org.gcube.resourcemanagement.model.reference.entities.facets.CPUFacet;
|
||||||
import org.gcube.resourcemanagement.model.reference.entities.facets.EventFacet;
|
import org.gcube.resourcemanagement.model.reference.entities.facets.EventFacet;
|
||||||
import org.gcube.resourcemanagement.model.reference.entities.facets.LicenseFacet;
|
import org.gcube.resourcemanagement.model.reference.entities.facets.LicenseFacet;
|
||||||
import org.gcube.resourcemanagement.model.reference.entities.facets.MemoryFacet;
|
import org.gcube.resourcemanagement.model.reference.entities.facets.MemoryFacet;
|
||||||
|
import org.gcube.resourcemanagement.model.reference.entities.facets.MemoryFacet.MemoryUnit;
|
||||||
import org.gcube.resourcemanagement.model.reference.entities.facets.NetworkingFacet;
|
import org.gcube.resourcemanagement.model.reference.entities.facets.NetworkingFacet;
|
||||||
import org.gcube.resourcemanagement.model.reference.entities.facets.ServiceStateFacet;
|
import org.gcube.resourcemanagement.model.reference.entities.facets.ServiceStateFacet;
|
||||||
import org.gcube.resourcemanagement.model.reference.entities.facets.SoftwareFacet;
|
import org.gcube.resourcemanagement.model.reference.entities.facets.SoftwareFacet;
|
||||||
import org.gcube.resourcemanagement.model.reference.entities.facets.MemoryFacet.MemoryUnit;
|
|
||||||
import org.gcube.resourcemanagement.model.reference.entities.resources.EService;
|
import org.gcube.resourcemanagement.model.reference.entities.resources.EService;
|
||||||
import org.gcube.resourcemanagement.model.reference.entities.resources.HostingNode;
|
import org.gcube.resourcemanagement.model.reference.entities.resources.HostingNode;
|
||||||
import org.gcube.resourcemanagement.model.reference.relations.consistsof.HasPersistentMemory;
|
import org.gcube.resourcemanagement.model.reference.relations.consistsof.HasPersistentMemory;
|
||||||
import org.gcube.resourcemanagement.model.reference.relations.consistsof.HasVolatileMemory;
|
import org.gcube.resourcemanagement.model.reference.relations.consistsof.HasVolatileMemory;
|
||||||
|
import org.gcube.resourcemanagement.model.reference.relations.consistsof.IsIdentifiedBy;
|
||||||
import org.gcube.resourcemanagement.model.reference.relations.isrelatedto.Activates;
|
import org.gcube.resourcemanagement.model.reference.relations.isrelatedto.Activates;
|
||||||
import org.junit.Assert;
|
import org.junit.Assert;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
|
@ -2,9 +2,7 @@ package org.gcube.informationsystem.resourceregistry.instances.multicontext;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
import org.gcube.informationsystem.model.impl.relations.IsIdentifiedByImpl;
|
|
||||||
import org.gcube.informationsystem.model.reference.entities.Facet;
|
import org.gcube.informationsystem.model.reference.entities.Facet;
|
||||||
import org.gcube.informationsystem.model.reference.relations.IsIdentifiedBy;
|
|
||||||
import org.gcube.informationsystem.resourceregistry.ContextTest;
|
import org.gcube.informationsystem.resourceregistry.ContextTest;
|
||||||
import org.gcube.informationsystem.resourceregistry.api.exceptions.entity.facet.FacetAlreadyPresentException;
|
import org.gcube.informationsystem.resourceregistry.api.exceptions.entity.facet.FacetAlreadyPresentException;
|
||||||
import org.gcube.informationsystem.resourceregistry.api.exceptions.entity.resource.ResourceAlreadyPresentException;
|
import org.gcube.informationsystem.resourceregistry.api.exceptions.entity.resource.ResourceAlreadyPresentException;
|
||||||
|
@ -13,8 +11,10 @@ import org.gcube.informationsystem.resourceregistry.instances.model.entities.Res
|
||||||
import org.gcube.informationsystem.utils.ISMapper;
|
import org.gcube.informationsystem.utils.ISMapper;
|
||||||
import org.gcube.resourcemanagement.model.impl.entities.facets.SoftwareFacetImpl;
|
import org.gcube.resourcemanagement.model.impl.entities.facets.SoftwareFacetImpl;
|
||||||
import org.gcube.resourcemanagement.model.impl.entities.resources.EServiceImpl;
|
import org.gcube.resourcemanagement.model.impl.entities.resources.EServiceImpl;
|
||||||
|
import org.gcube.resourcemanagement.model.impl.relations.consistsof.IsIdentifiedByImpl;
|
||||||
import org.gcube.resourcemanagement.model.reference.entities.facets.SoftwareFacet;
|
import org.gcube.resourcemanagement.model.reference.entities.facets.SoftwareFacet;
|
||||||
import org.gcube.resourcemanagement.model.reference.entities.resources.EService;
|
import org.gcube.resourcemanagement.model.reference.entities.resources.EService;
|
||||||
|
import org.gcube.resourcemanagement.model.reference.relations.consistsof.IsIdentifiedBy;
|
||||||
import org.junit.Assert;
|
import org.junit.Assert;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
|
|
Loading…
Reference in New Issue