Creating IS model refs #4023
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/private/luca.frosini/information-system-model@128811 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
214562bc75
commit
d13ec28dcb
|
@ -19,7 +19,7 @@ import org.gcube.informationsystem.model.relation.RelationProperty;
|
|||
public abstract class ResourceImpl extends EntityImpl implements Resource {
|
||||
|
||||
protected Map<Facet, RelationProperty> addedFacets;
|
||||
protected Map<Facet, RelationProperty> attachedFacets;
|
||||
protected Map<String, RelationProperty> attachedFacets;
|
||||
protected List<Facet> detachedFacets;
|
||||
|
||||
|
||||
|
@ -34,7 +34,7 @@ public abstract class ResourceImpl extends EntityImpl implements Resource {
|
|||
protected ResourceImpl(String name, String description, String version) {
|
||||
super(name, description, version);
|
||||
addedFacets = new HashMap<Facet, RelationProperty>();
|
||||
attachedFacets = new HashMap<Facet, RelationProperty>();
|
||||
attachedFacets = new HashMap<String, RelationProperty>();
|
||||
detachedFacets = new ArrayList<>();
|
||||
|
||||
|
||||
|
@ -53,35 +53,27 @@ public abstract class ResourceImpl extends EntityImpl implements Resource {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void attachFacet(Facet facet) {
|
||||
attachedFacets.put(facet, null);
|
||||
public void attachFacet(String uuid) {
|
||||
attachedFacets.put(uuid, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void attachFacet(Facet facet, RelationProperty relationProperty) {
|
||||
attachedFacets.put(facet, relationProperty);
|
||||
public void attachFacet(String uuid, RelationProperty relationProperty) {
|
||||
attachedFacets.put(uuid, relationProperty);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void detachFacet(Facet facet) {
|
||||
detachedFacets.add(facet);
|
||||
attachedFacets.remove(facet);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void attachResource(Resource resource) {
|
||||
public void attachResource(String uuid) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void attachResource(Resource resource,
|
||||
public void attachResource(String uuid,
|
||||
RelationProperty relationProperty) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void detachResource(Resource resource) {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -18,19 +18,14 @@ public interface Resource extends Entity {
|
|||
public void addFacet(Facet facet, RelationProperty relationProperty);
|
||||
|
||||
|
||||
public void attachFacet(Facet facet);
|
||||
public void attachFacet(String uuid);
|
||||
|
||||
public void attachFacet(Facet facet, RelationProperty relationProperty);
|
||||
|
||||
public void detachFacet(Facet facet);
|
||||
public void attachFacet(String uuid, RelationProperty relationProperty);
|
||||
|
||||
|
||||
public void attachResource(String uuid);
|
||||
|
||||
public void attachResource(Resource resource);
|
||||
|
||||
public void attachResource(Resource resource, RelationProperty relationProperty);
|
||||
|
||||
public void detachResource(Resource resource);
|
||||
public void attachResource(String uuid, RelationProperty relationProperty);
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue