Merged changes made in branch caused by is-model and gcube-model repackaging
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/information-system/resource-registry-publisher@171807 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
531f52241c
commit
a0c5acfbee
4
pom.xml
4
pom.xml
|
@ -80,8 +80,8 @@
|
|||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.gcube.information-system</groupId>
|
||||
<artifactId>gcube-resources</artifactId>
|
||||
<groupId>org.gcube.resource-management</groupId>
|
||||
<artifactId>gcube-model</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
|
|
@ -2,11 +2,11 @@ package org.gcube.informationsystem.resourceregistry.publisher;
|
|||
|
||||
import java.util.UUID;
|
||||
|
||||
import org.gcube.informationsystem.model.ER;
|
||||
import org.gcube.informationsystem.model.entity.Facet;
|
||||
import org.gcube.informationsystem.model.entity.Resource;
|
||||
import org.gcube.informationsystem.model.relation.ConsistsOf;
|
||||
import org.gcube.informationsystem.model.relation.IsRelatedTo;
|
||||
import org.gcube.informationsystem.model.reference.ER;
|
||||
import org.gcube.informationsystem.model.reference.entity.Facet;
|
||||
import org.gcube.informationsystem.model.reference.entity.Resource;
|
||||
import org.gcube.informationsystem.model.reference.relation.ConsistsOf;
|
||||
import org.gcube.informationsystem.model.reference.relation.IsRelatedTo;
|
||||
import org.gcube.informationsystem.resourceregistry.api.exceptions.AlreadyPresentException;
|
||||
import org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException;
|
||||
import org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException;
|
||||
|
|
|
@ -8,16 +8,16 @@ import org.gcube.common.authorization.client.Constants;
|
|||
import org.gcube.common.authorization.library.AuthorizationEntry;
|
||||
import org.gcube.common.authorization.library.provider.SecurityTokenProvider;
|
||||
import org.gcube.common.scope.api.ScopeProvider;
|
||||
import org.gcube.informationsystem.impl.embedded.HeaderImpl;
|
||||
import org.gcube.informationsystem.impl.utils.ISMapper;
|
||||
import org.gcube.informationsystem.impl.utils.Utility;
|
||||
import org.gcube.informationsystem.model.ER;
|
||||
import org.gcube.informationsystem.model.embedded.Header;
|
||||
import org.gcube.informationsystem.model.entity.Context;
|
||||
import org.gcube.informationsystem.model.entity.Facet;
|
||||
import org.gcube.informationsystem.model.entity.Resource;
|
||||
import org.gcube.informationsystem.model.relation.ConsistsOf;
|
||||
import org.gcube.informationsystem.model.relation.IsRelatedTo;
|
||||
import org.gcube.informationsystem.model.impl.embedded.HeaderImpl;
|
||||
import org.gcube.informationsystem.model.impl.utils.ISMapper;
|
||||
import org.gcube.informationsystem.model.impl.utils.Utility;
|
||||
import org.gcube.informationsystem.model.reference.ER;
|
||||
import org.gcube.informationsystem.model.reference.embedded.Header;
|
||||
import org.gcube.informationsystem.model.reference.entity.Context;
|
||||
import org.gcube.informationsystem.model.reference.entity.Facet;
|
||||
import org.gcube.informationsystem.model.reference.entity.Resource;
|
||||
import org.gcube.informationsystem.model.reference.relation.ConsistsOf;
|
||||
import org.gcube.informationsystem.model.reference.relation.IsRelatedTo;
|
||||
import org.gcube.informationsystem.resourceregistry.api.exceptions.AlreadyPresentException;
|
||||
import org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException;
|
||||
import org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException;
|
||||
|
|
|
@ -12,43 +12,43 @@ import java.util.List;
|
|||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
|
||||
import org.gcube.informationsystem.impl.embedded.PropagationConstraintImpl;
|
||||
import org.gcube.informationsystem.impl.entity.facet.AccessPointFacetImpl;
|
||||
import org.gcube.informationsystem.impl.entity.facet.CPUFacetImpl;
|
||||
import org.gcube.informationsystem.impl.entity.facet.EventFacetImpl;
|
||||
import org.gcube.informationsystem.impl.entity.facet.LicenseFacetImpl;
|
||||
import org.gcube.informationsystem.impl.entity.facet.NetworkingFacetImpl;
|
||||
import org.gcube.informationsystem.impl.entity.facet.ServiceStateFacetImpl;
|
||||
import org.gcube.informationsystem.impl.entity.facet.SoftwareFacetImpl;
|
||||
import org.gcube.informationsystem.impl.entity.resource.EServiceImpl;
|
||||
import org.gcube.informationsystem.impl.entity.resource.HostingNodeImpl;
|
||||
import org.gcube.informationsystem.impl.relation.ConsistsOfImpl;
|
||||
import org.gcube.informationsystem.impl.relation.IsIdentifiedByImpl;
|
||||
import org.gcube.informationsystem.impl.relation.isrelatedto.HostsImpl;
|
||||
import org.gcube.informationsystem.impl.utils.ISMapper;
|
||||
import org.gcube.informationsystem.model.embedded.PropagationConstraint;
|
||||
import org.gcube.informationsystem.model.embedded.PropagationConstraint.AddConstraint;
|
||||
import org.gcube.informationsystem.model.embedded.PropagationConstraint.RemoveConstraint;
|
||||
import org.gcube.informationsystem.model.entity.Facet;
|
||||
import org.gcube.informationsystem.model.entity.Resource;
|
||||
import org.gcube.informationsystem.model.entity.facet.AccessPointFacet;
|
||||
import org.gcube.informationsystem.model.entity.facet.CPUFacet;
|
||||
import org.gcube.informationsystem.model.entity.facet.EventFacet;
|
||||
import org.gcube.informationsystem.model.entity.facet.LicenseFacet;
|
||||
import org.gcube.informationsystem.model.entity.facet.NetworkingFacet;
|
||||
import org.gcube.informationsystem.model.entity.facet.ServiceStateFacet;
|
||||
import org.gcube.informationsystem.model.entity.facet.SoftwareFacet;
|
||||
import org.gcube.informationsystem.model.entity.resource.EService;
|
||||
import org.gcube.informationsystem.model.entity.resource.HostingNode;
|
||||
import org.gcube.informationsystem.model.relation.ConsistsOf;
|
||||
import org.gcube.informationsystem.model.relation.IsIdentifiedBy;
|
||||
import org.gcube.informationsystem.model.relation.IsRelatedTo;
|
||||
import org.gcube.informationsystem.model.relation.Relation;
|
||||
import org.gcube.informationsystem.model.relation.isrelatedto.Hosts;
|
||||
import org.gcube.informationsystem.model.impl.embedded.PropagationConstraintImpl;
|
||||
import org.gcube.informationsystem.model.impl.relation.ConsistsOfImpl;
|
||||
import org.gcube.informationsystem.model.impl.relation.IsIdentifiedByImpl;
|
||||
import org.gcube.informationsystem.model.impl.utils.ISMapper;
|
||||
import org.gcube.informationsystem.model.reference.embedded.PropagationConstraint;
|
||||
import org.gcube.informationsystem.model.reference.embedded.PropagationConstraint.AddConstraint;
|
||||
import org.gcube.informationsystem.model.reference.embedded.PropagationConstraint.RemoveConstraint;
|
||||
import org.gcube.informationsystem.model.reference.entity.Facet;
|
||||
import org.gcube.informationsystem.model.reference.entity.Resource;
|
||||
import org.gcube.informationsystem.model.reference.relation.ConsistsOf;
|
||||
import org.gcube.informationsystem.model.reference.relation.IsIdentifiedBy;
|
||||
import org.gcube.informationsystem.model.reference.relation.IsRelatedTo;
|
||||
import org.gcube.informationsystem.model.reference.relation.Relation;
|
||||
import org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException;
|
||||
import org.gcube.informationsystem.resourceregistry.client.Direction;
|
||||
import org.gcube.informationsystem.resourceregistry.client.ResourceRegistryClient;
|
||||
import org.gcube.informationsystem.resourceregistry.client.ResourceRegistryClientFactory;
|
||||
import org.gcube.resourcemanagement.model.impl.entity.facet.AccessPointFacetImpl;
|
||||
import org.gcube.resourcemanagement.model.impl.entity.facet.CPUFacetImpl;
|
||||
import org.gcube.resourcemanagement.model.impl.entity.facet.EventFacetImpl;
|
||||
import org.gcube.resourcemanagement.model.impl.entity.facet.LicenseFacetImpl;
|
||||
import org.gcube.resourcemanagement.model.impl.entity.facet.NetworkingFacetImpl;
|
||||
import org.gcube.resourcemanagement.model.impl.entity.facet.ServiceStateFacetImpl;
|
||||
import org.gcube.resourcemanagement.model.impl.entity.facet.SoftwareFacetImpl;
|
||||
import org.gcube.resourcemanagement.model.impl.entity.resource.EServiceImpl;
|
||||
import org.gcube.resourcemanagement.model.impl.entity.resource.HostingNodeImpl;
|
||||
import org.gcube.resourcemanagement.model.impl.relation.isrelatedto.ActivatesImpl;
|
||||
import org.gcube.resourcemanagement.model.reference.entity.facet.AccessPointFacet;
|
||||
import org.gcube.resourcemanagement.model.reference.entity.facet.CPUFacet;
|
||||
import org.gcube.resourcemanagement.model.reference.entity.facet.EventFacet;
|
||||
import org.gcube.resourcemanagement.model.reference.entity.facet.LicenseFacet;
|
||||
import org.gcube.resourcemanagement.model.reference.entity.facet.NetworkingFacet;
|
||||
import org.gcube.resourcemanagement.model.reference.entity.facet.ServiceStateFacet;
|
||||
import org.gcube.resourcemanagement.model.reference.entity.facet.SoftwareFacet;
|
||||
import org.gcube.resourcemanagement.model.reference.entity.resource.EService;
|
||||
import org.gcube.resourcemanagement.model.reference.entity.resource.HostingNode;
|
||||
import org.gcube.resourcemanagement.model.reference.relation.isrelatedto.Activates;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
import org.slf4j.Logger;
|
||||
|
@ -329,9 +329,9 @@ public class ERManagementTest extends ScopedTest {
|
|||
propagationConstraint.setRemoveConstraint(RemoveConstraint.cascade);
|
||||
propagationConstraint.setAddConstraint(AddConstraint.unpropagate);
|
||||
|
||||
Hosts<HostingNode,EService> hosts = new HostsImpl<HostingNode,EService>(hostingNode, eService,
|
||||
Activates<HostingNode,EService> activates = new ActivatesImpl<HostingNode,EService>(hostingNode, eService,
|
||||
propagationConstraint);
|
||||
hostingNode.attachResource(hosts);
|
||||
hostingNode.attachResource(activates);
|
||||
|
||||
hostingNode = resourceRegistryPublisher.createResource(hostingNode);
|
||||
logger.debug("Unmarshalled {} {}", HostingNode.NAME, hostingNode);
|
||||
|
@ -585,7 +585,7 @@ public class ERManagementTest extends ScopedTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testCreateHostingNodeThenHostsWithEService() throws Exception {
|
||||
public void testCreateHostingNodeThenActivatesWithEService() throws Exception {
|
||||
|
||||
HostingNode hostingNode = new HostingNodeImpl();
|
||||
|
||||
|
@ -625,13 +625,13 @@ public class ERManagementTest extends ScopedTest {
|
|||
propagationConstraint.setRemoveConstraint(RemoveConstraint.cascade);
|
||||
propagationConstraint.setAddConstraint(AddConstraint.unpropagate);
|
||||
|
||||
Hosts<HostingNode,EService> hosts = new HostsImpl<HostingNode,EService>(hostingNode, eService,
|
||||
Activates<HostingNode,EService> activates = new ActivatesImpl<HostingNode,EService>(hostingNode, eService,
|
||||
propagationConstraint);
|
||||
|
||||
hosts = resourceRegistryPublisher.createIsRelatedTo(hosts);
|
||||
hostingNode.attachResource(hosts);
|
||||
activates = resourceRegistryPublisher.createIsRelatedTo(activates);
|
||||
hostingNode.attachResource(activates);
|
||||
|
||||
logger.debug("Created Hosts is {}", ISMapper.marshal(hosts));
|
||||
logger.debug("Created {} is {}", Activates.NAME, ISMapper.marshal(activates));
|
||||
|
||||
boolean deleted = resourceRegistryPublisher.deleteResource(hostingNode);
|
||||
Assert.assertTrue(deleted);
|
||||
|
|
|
@ -6,26 +6,24 @@ package org.gcube.informationsystem.resourceregistry.publisher;
|
|||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
import org.gcube.informationsystem.impl.entity.facet.CPUFacetImpl;
|
||||
import org.gcube.informationsystem.impl.entity.facet.NetworkingFacetImpl;
|
||||
import org.gcube.informationsystem.impl.entity.facet.SoftwareFacetImpl;
|
||||
import org.gcube.informationsystem.impl.entity.resource.EServiceImpl;
|
||||
import org.gcube.informationsystem.impl.entity.resource.HostingNodeImpl;
|
||||
import org.gcube.informationsystem.impl.relation.IsIdentifiedByImpl;
|
||||
import org.gcube.informationsystem.impl.relation.isrelatedto.HostsImpl;
|
||||
import org.gcube.informationsystem.impl.utils.ISMapper;
|
||||
import org.gcube.informationsystem.model.entity.Facet;
|
||||
import org.gcube.informationsystem.model.entity.Resource;
|
||||
import org.gcube.informationsystem.model.entity.facet.CPUFacet;
|
||||
import org.gcube.informationsystem.model.entity.facet.NetworkingFacet;
|
||||
import org.gcube.informationsystem.model.entity.facet.SoftwareFacet;
|
||||
import org.gcube.informationsystem.model.entity.resource.EService;
|
||||
import org.gcube.informationsystem.model.entity.resource.HostingNode;
|
||||
import org.gcube.informationsystem.model.relation.ConsistsOf;
|
||||
import org.gcube.informationsystem.model.relation.IsIdentifiedBy;
|
||||
import org.gcube.informationsystem.model.relation.isrelatedto.Hosts;
|
||||
import org.gcube.informationsystem.resourceregistry.publisher.ResourceRegistryPublisher;
|
||||
import org.gcube.informationsystem.resourceregistry.publisher.ResourceRegistryPublisherFactory;
|
||||
import org.gcube.informationsystem.model.impl.relation.IsIdentifiedByImpl;
|
||||
import org.gcube.informationsystem.model.impl.utils.ISMapper;
|
||||
import org.gcube.informationsystem.model.reference.entity.Facet;
|
||||
import org.gcube.informationsystem.model.reference.entity.Resource;
|
||||
import org.gcube.informationsystem.model.reference.relation.ConsistsOf;
|
||||
import org.gcube.informationsystem.model.reference.relation.IsIdentifiedBy;
|
||||
import org.gcube.resourcemanagement.model.impl.entity.facet.CPUFacetImpl;
|
||||
import org.gcube.resourcemanagement.model.impl.entity.facet.NetworkingFacetImpl;
|
||||
import org.gcube.resourcemanagement.model.impl.entity.facet.SoftwareFacetImpl;
|
||||
import org.gcube.resourcemanagement.model.impl.entity.resource.EServiceImpl;
|
||||
import org.gcube.resourcemanagement.model.impl.entity.resource.HostingNodeImpl;
|
||||
import org.gcube.resourcemanagement.model.impl.relation.isrelatedto.ActivatesImpl;
|
||||
import org.gcube.resourcemanagement.model.reference.entity.facet.CPUFacet;
|
||||
import org.gcube.resourcemanagement.model.reference.entity.facet.NetworkingFacet;
|
||||
import org.gcube.resourcemanagement.model.reference.entity.facet.SoftwareFacet;
|
||||
import org.gcube.resourcemanagement.model.reference.entity.resource.EService;
|
||||
import org.gcube.resourcemanagement.model.reference.entity.resource.HostingNode;
|
||||
import org.gcube.resourcemanagement.model.reference.relation.isrelatedto.Activates;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
import org.slf4j.Logger;
|
||||
|
@ -167,9 +165,9 @@ public class EntityManagementTest extends ScopedTest {
|
|||
IsIdentifiedBy<HostingNode, NetworkingFacet> isIdentifiedByHNNF = new IsIdentifiedByImpl<>(hostingNode, createdNetworkingFacet, null);
|
||||
hostingNode.addFacet(isIdentifiedByHNNF);
|
||||
|
||||
Hosts<HostingNode, EService> hosts = new HostsImpl<HostingNode, EService>(hostingNode, createdEService, null);
|
||||
Activates<HostingNode, EService> activates = new ActivatesImpl<HostingNode, EService>(hostingNode, createdEService, null);
|
||||
|
||||
hostingNode.attachResource(hosts);
|
||||
hostingNode.attachResource(activates);
|
||||
|
||||
HostingNode createdHostingNode = resourceRegistryPublisher.createResource(hostingNode);
|
||||
|
||||
|
@ -222,15 +220,15 @@ public class EntityManagementTest extends ScopedTest {
|
|||
IsIdentifiedBy<HostingNode, CPUFacet> isIdentifiedByCPUFacet = new IsIdentifiedByImpl<>(createdHostingNode, createdCpuFacet, null);
|
||||
IsIdentifiedBy<HostingNode, CPUFacet> createdIsIdentifiedByCPUFacet = resourceRegistryPublisher.createConsistsOf(isIdentifiedByCPUFacet);
|
||||
|
||||
Hosts<HostingNode, EService> hosts = new HostsImpl<>(createdHostingNode, createdEService, null);
|
||||
Hosts<HostingNode, EService> createdHosts = resourceRegistryPublisher.createIsRelatedTo(hosts);
|
||||
Activates<HostingNode, EService> activates = new ActivatesImpl<>(createdHostingNode, createdEService, null);
|
||||
Activates<HostingNode, EService> createdActivates = resourceRegistryPublisher.createIsRelatedTo(activates);
|
||||
|
||||
|
||||
boolean deleted = resourceRegistryPublisher.deleteConsistsOf(createdIsIdentifiedByCPUFacet);
|
||||
Assert.assertTrue(deleted);
|
||||
|
||||
|
||||
deleted = resourceRegistryPublisher.deleteIsRelatedTo(createdHosts);
|
||||
deleted = resourceRegistryPublisher.deleteIsRelatedTo(createdActivates);
|
||||
Assert.assertTrue(deleted);
|
||||
|
||||
|
||||
|
|
|
@ -8,41 +8,41 @@ import java.net.URL;
|
|||
import java.util.Calendar;
|
||||
import java.util.UUID;
|
||||
|
||||
import org.gcube.informationsystem.impl.entity.facet.AccessPointFacetImpl;
|
||||
import org.gcube.informationsystem.impl.entity.facet.CPUFacetImpl;
|
||||
import org.gcube.informationsystem.impl.entity.facet.EventFacetImpl;
|
||||
import org.gcube.informationsystem.impl.entity.facet.LicenseFacetImpl;
|
||||
import org.gcube.informationsystem.impl.entity.facet.MemoryFacetImpl;
|
||||
import org.gcube.informationsystem.impl.entity.facet.NetworkingFacetImpl;
|
||||
import org.gcube.informationsystem.impl.entity.facet.ServiceStateFacetImpl;
|
||||
import org.gcube.informationsystem.impl.entity.facet.SoftwareFacetImpl;
|
||||
import org.gcube.informationsystem.impl.entity.resource.EServiceImpl;
|
||||
import org.gcube.informationsystem.impl.entity.resource.HostingNodeImpl;
|
||||
import org.gcube.informationsystem.impl.relation.IsIdentifiedByImpl;
|
||||
import org.gcube.informationsystem.impl.relation.consistsof.HasPersistentMemoryImpl;
|
||||
import org.gcube.informationsystem.impl.relation.consistsof.HasVolatileMemoryImpl;
|
||||
import org.gcube.informationsystem.impl.relation.isrelatedto.HostsImpl;
|
||||
import org.gcube.informationsystem.model.entity.Facet;
|
||||
import org.gcube.informationsystem.model.entity.facet.AccessPointFacet;
|
||||
import org.gcube.informationsystem.model.entity.facet.CPUFacet;
|
||||
import org.gcube.informationsystem.model.entity.facet.EventFacet;
|
||||
import org.gcube.informationsystem.model.entity.facet.LicenseFacet;
|
||||
import org.gcube.informationsystem.model.entity.facet.MemoryFacet;
|
||||
import org.gcube.informationsystem.model.entity.facet.MemoryFacet.MemoryUnit;
|
||||
import org.gcube.informationsystem.model.entity.facet.NetworkingFacet;
|
||||
import org.gcube.informationsystem.model.entity.facet.ServiceStateFacet;
|
||||
import org.gcube.informationsystem.model.entity.facet.SoftwareFacet;
|
||||
import org.gcube.informationsystem.model.entity.resource.EService;
|
||||
import org.gcube.informationsystem.model.entity.resource.HostingNode;
|
||||
import org.gcube.informationsystem.model.relation.IsIdentifiedBy;
|
||||
import org.gcube.informationsystem.model.relation.consistsof.HasPersistentMemory;
|
||||
import org.gcube.informationsystem.model.relation.consistsof.HasVolatileMemory;
|
||||
import org.gcube.informationsystem.model.relation.isrelatedto.Hosts;
|
||||
import org.gcube.informationsystem.model.impl.relation.IsIdentifiedByImpl;
|
||||
import org.gcube.informationsystem.model.reference.entity.Facet;
|
||||
import org.gcube.informationsystem.model.reference.relation.IsIdentifiedBy;
|
||||
import org.gcube.informationsystem.resourceregistry.api.exceptions.AvailableInAnotherContextException;
|
||||
import org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException;
|
||||
import org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException;
|
||||
import org.gcube.informationsystem.resourceregistry.client.ResourceRegistryClient;
|
||||
import org.gcube.informationsystem.resourceregistry.client.ResourceRegistryClientFactory;
|
||||
import org.gcube.resourcemanagement.model.impl.entity.facet.AccessPointFacetImpl;
|
||||
import org.gcube.resourcemanagement.model.impl.entity.facet.CPUFacetImpl;
|
||||
import org.gcube.resourcemanagement.model.impl.entity.facet.EventFacetImpl;
|
||||
import org.gcube.resourcemanagement.model.impl.entity.facet.LicenseFacetImpl;
|
||||
import org.gcube.resourcemanagement.model.impl.entity.facet.MemoryFacetImpl;
|
||||
import org.gcube.resourcemanagement.model.impl.entity.facet.NetworkingFacetImpl;
|
||||
import org.gcube.resourcemanagement.model.impl.entity.facet.ServiceStateFacetImpl;
|
||||
import org.gcube.resourcemanagement.model.impl.entity.facet.SoftwareFacetImpl;
|
||||
import org.gcube.resourcemanagement.model.impl.entity.resource.EServiceImpl;
|
||||
import org.gcube.resourcemanagement.model.impl.entity.resource.HostingNodeImpl;
|
||||
import org.gcube.resourcemanagement.model.impl.relation.consistsof.HasPersistentMemoryImpl;
|
||||
import org.gcube.resourcemanagement.model.impl.relation.consistsof.HasVolatileMemoryImpl;
|
||||
import org.gcube.resourcemanagement.model.impl.relation.isrelatedto.ActivatesImpl;
|
||||
import org.gcube.resourcemanagement.model.reference.entity.facet.AccessPointFacet;
|
||||
import org.gcube.resourcemanagement.model.reference.entity.facet.CPUFacet;
|
||||
import org.gcube.resourcemanagement.model.reference.entity.facet.EventFacet;
|
||||
import org.gcube.resourcemanagement.model.reference.entity.facet.LicenseFacet;
|
||||
import org.gcube.resourcemanagement.model.reference.entity.facet.MemoryFacet;
|
||||
import org.gcube.resourcemanagement.model.reference.entity.facet.NetworkingFacet;
|
||||
import org.gcube.resourcemanagement.model.reference.entity.facet.ServiceStateFacet;
|
||||
import org.gcube.resourcemanagement.model.reference.entity.facet.SoftwareFacet;
|
||||
import org.gcube.resourcemanagement.model.reference.entity.facet.MemoryFacet.MemoryUnit;
|
||||
import org.gcube.resourcemanagement.model.reference.entity.resource.EService;
|
||||
import org.gcube.resourcemanagement.model.reference.entity.resource.HostingNode;
|
||||
import org.gcube.resourcemanagement.model.reference.relation.consistsof.HasPersistentMemory;
|
||||
import org.gcube.resourcemanagement.model.reference.relation.consistsof.HasVolatileMemory;
|
||||
import org.gcube.resourcemanagement.model.reference.relation.isrelatedto.Activates;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
import org.slf4j.Logger;
|
||||
|
@ -137,8 +137,8 @@ public class MultiContextTest extends ScopedTest {
|
|||
new HasPersistentMemoryImpl<HostingNode, MemoryFacet>(hostingNode, disk, null);
|
||||
hostingNode.addFacet(hasPersistentMemory);
|
||||
|
||||
Hosts<HostingNode, EService> hosts = new HostsImpl<HostingNode, EService>(hostingNode, createdEService, null);
|
||||
hostingNode.attachResource(hosts);
|
||||
Activates<HostingNode, EService> activates = new ActivatesImpl<HostingNode, EService>(hostingNode, createdEService, null);
|
||||
hostingNode.attachResource(activates);
|
||||
|
||||
HostingNode createdHN = resourceRegistryPublisher.createResource(hostingNode);
|
||||
logger.debug("Created : {}", createdHN);
|
||||
|
|
|
@ -6,16 +6,10 @@ package org.gcube.informationsystem.resourceregistry.publisher;
|
|||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
import org.gcube.informationsystem.impl.entity.facet.CPUFacetImpl;
|
||||
import org.gcube.informationsystem.impl.entity.facet.SoftwareFacetImpl;
|
||||
import org.gcube.informationsystem.impl.entity.resource.EServiceImpl;
|
||||
import org.gcube.informationsystem.impl.relation.IsIdentifiedByImpl;
|
||||
import org.gcube.informationsystem.model.entity.Facet;
|
||||
import org.gcube.informationsystem.model.entity.Resource;
|
||||
import org.gcube.informationsystem.model.entity.facet.CPUFacet;
|
||||
import org.gcube.informationsystem.model.entity.facet.SoftwareFacet;
|
||||
import org.gcube.informationsystem.model.entity.resource.EService;
|
||||
import org.gcube.informationsystem.model.relation.IsIdentifiedBy;
|
||||
import org.gcube.informationsystem.model.impl.relation.IsIdentifiedByImpl;
|
||||
import org.gcube.informationsystem.model.reference.entity.Facet;
|
||||
import org.gcube.informationsystem.model.reference.entity.Resource;
|
||||
import org.gcube.informationsystem.model.reference.relation.IsIdentifiedBy;
|
||||
import org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException;
|
||||
import org.gcube.informationsystem.resourceregistry.api.exceptions.entity.facet.FacetNotFoundException;
|
||||
import org.gcube.informationsystem.resourceregistry.api.exceptions.entity.resource.ResourceNotFoundException;
|
||||
|
@ -23,6 +17,12 @@ import org.gcube.informationsystem.resourceregistry.client.ResourceRegistryClien
|
|||
import org.gcube.informationsystem.resourceregistry.client.ResourceRegistryClientFactory;
|
||||
import org.gcube.informationsystem.resourceregistry.publisher.ResourceRegistryPublisher;
|
||||
import org.gcube.informationsystem.resourceregistry.publisher.ResourceRegistryPublisherFactory;
|
||||
import org.gcube.resourcemanagement.model.impl.entity.facet.CPUFacetImpl;
|
||||
import org.gcube.resourcemanagement.model.impl.entity.facet.SoftwareFacetImpl;
|
||||
import org.gcube.resourcemanagement.model.impl.entity.resource.EServiceImpl;
|
||||
import org.gcube.resourcemanagement.model.reference.entity.facet.CPUFacet;
|
||||
import org.gcube.resourcemanagement.model.reference.entity.facet.SoftwareFacet;
|
||||
import org.gcube.resourcemanagement.model.reference.entity.resource.EService;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
import org.slf4j.Logger;
|
||||
|
|
|
@ -22,37 +22,37 @@ import java.util.UUID;
|
|||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import org.gcube.informationsystem.impl.embedded.HeaderImpl;
|
||||
import org.gcube.informationsystem.impl.entity.facet.CPUFacetImpl;
|
||||
import org.gcube.informationsystem.impl.entity.facet.ContainerStateFacetImpl;
|
||||
import org.gcube.informationsystem.impl.entity.facet.MemoryFacetImpl;
|
||||
import org.gcube.informationsystem.impl.entity.facet.NetworkingFacetImpl;
|
||||
import org.gcube.informationsystem.impl.entity.facet.SimplePropertyFacetImpl;
|
||||
import org.gcube.informationsystem.impl.entity.facet.SoftwareFacetImpl;
|
||||
import org.gcube.informationsystem.impl.entity.resource.HostingNodeImpl;
|
||||
import org.gcube.informationsystem.impl.relation.IsIdentifiedByImpl;
|
||||
import org.gcube.informationsystem.impl.relation.consistsof.HasPersistentMemoryImpl;
|
||||
import org.gcube.informationsystem.impl.relation.consistsof.HasVolatileMemoryImpl;
|
||||
import org.gcube.informationsystem.impl.utils.ISMapper;
|
||||
import org.gcube.informationsystem.model.embedded.Header;
|
||||
import org.gcube.informationsystem.model.entity.Facet;
|
||||
import org.gcube.informationsystem.model.entity.Resource;
|
||||
import org.gcube.informationsystem.model.entity.facet.CPUFacet;
|
||||
import org.gcube.informationsystem.model.entity.facet.ContainerStateFacet;
|
||||
import org.gcube.informationsystem.model.entity.facet.MemoryFacet;
|
||||
import org.gcube.informationsystem.model.entity.facet.MemoryFacet.MemoryUnit;
|
||||
import org.gcube.informationsystem.model.entity.facet.NetworkingFacet;
|
||||
import org.gcube.informationsystem.model.entity.facet.SimplePropertyFacet;
|
||||
import org.gcube.informationsystem.model.entity.facet.SoftwareFacet;
|
||||
import org.gcube.informationsystem.model.entity.resource.EService;
|
||||
import org.gcube.informationsystem.model.entity.resource.HostingNode;
|
||||
import org.gcube.informationsystem.model.relation.ConsistsOf;
|
||||
import org.gcube.informationsystem.model.relation.IsIdentifiedBy;
|
||||
import org.gcube.informationsystem.model.relation.consistsof.HasPersistentMemory;
|
||||
import org.gcube.informationsystem.model.relation.consistsof.HasVolatileMemory;
|
||||
import org.gcube.informationsystem.model.impl.embedded.HeaderImpl;
|
||||
import org.gcube.informationsystem.model.impl.relation.IsIdentifiedByImpl;
|
||||
import org.gcube.informationsystem.model.impl.utils.ISMapper;
|
||||
import org.gcube.informationsystem.model.reference.embedded.Header;
|
||||
import org.gcube.informationsystem.model.reference.entity.Facet;
|
||||
import org.gcube.informationsystem.model.reference.entity.Resource;
|
||||
import org.gcube.informationsystem.model.reference.relation.ConsistsOf;
|
||||
import org.gcube.informationsystem.model.reference.relation.IsIdentifiedBy;
|
||||
import org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException;
|
||||
import org.gcube.informationsystem.resourceregistry.publisher.ResourceRegistryPublisher;
|
||||
import org.gcube.informationsystem.resourceregistry.publisher.ResourceRegistryPublisherFactory;
|
||||
import org.gcube.resourcemanagement.model.impl.entity.facet.CPUFacetImpl;
|
||||
import org.gcube.resourcemanagement.model.impl.entity.facet.ContainerStateFacetImpl;
|
||||
import org.gcube.resourcemanagement.model.impl.entity.facet.MemoryFacetImpl;
|
||||
import org.gcube.resourcemanagement.model.impl.entity.facet.NetworkingFacetImpl;
|
||||
import org.gcube.resourcemanagement.model.impl.entity.facet.SimplePropertyFacetImpl;
|
||||
import org.gcube.resourcemanagement.model.impl.entity.facet.SoftwareFacetImpl;
|
||||
import org.gcube.resourcemanagement.model.impl.entity.resource.HostingNodeImpl;
|
||||
import org.gcube.resourcemanagement.model.impl.relation.consistsof.HasPersistentMemoryImpl;
|
||||
import org.gcube.resourcemanagement.model.impl.relation.consistsof.HasVolatileMemoryImpl;
|
||||
import org.gcube.resourcemanagement.model.reference.entity.facet.CPUFacet;
|
||||
import org.gcube.resourcemanagement.model.reference.entity.facet.ContainerStateFacet;
|
||||
import org.gcube.resourcemanagement.model.reference.entity.facet.MemoryFacet;
|
||||
import org.gcube.resourcemanagement.model.reference.entity.facet.NetworkingFacet;
|
||||
import org.gcube.resourcemanagement.model.reference.entity.facet.SimplePropertyFacet;
|
||||
import org.gcube.resourcemanagement.model.reference.entity.facet.SoftwareFacet;
|
||||
import org.gcube.resourcemanagement.model.reference.entity.facet.MemoryFacet.MemoryUnit;
|
||||
import org.gcube.resourcemanagement.model.reference.entity.resource.EService;
|
||||
import org.gcube.resourcemanagement.model.reference.entity.resource.HostingNode;
|
||||
import org.gcube.resourcemanagement.model.reference.relation.consistsof.HasPersistentMemory;
|
||||
import org.gcube.resourcemanagement.model.reference.relation.consistsof.HasVolatileMemory;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
import org.slf4j.Logger;
|
||||
|
|
Loading…
Reference in New Issue