IsIdentifiedBy has been moved in gCube Model
This commit is contained in:
parent
aefa8342f5
commit
1a641cc953
|
@ -11,7 +11,6 @@ import org.gcube.informationsystem.model.impl.relations.ConsistsOfImpl;
|
||||||
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.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.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
@ -199,17 +198,6 @@ public abstract class ResourceImpl extends EntityImpl implements Resource {
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<? extends Facet> getIdentificationFacets() {
|
|
||||||
List<Facet> identificationFacets = new ArrayList<>();
|
|
||||||
for(ConsistsOf<? extends Resource, ? extends Facet> consistsOfInstance : consistsOfList){
|
|
||||||
if (IsIdentifiedBy.class.isAssignableFrom(consistsOfInstance.getClass())) {
|
|
||||||
identificationFacets.add(consistsOfInstance.getTarget());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return identificationFacets;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ConsistsOf<? extends Resource, ? extends Facet>> getConsistsOf() {
|
public List<ConsistsOf<? extends Resource, ? extends Facet>> getConsistsOf() {
|
||||||
return consistsOfList;
|
return consistsOfList;
|
||||||
|
|
|
@ -1,34 +0,0 @@
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
package org.gcube.informationsystem.model.impl.relations;
|
|
||||||
|
|
||||||
import org.gcube.informationsystem.model.reference.entities.Facet;
|
|
||||||
import org.gcube.informationsystem.model.reference.entities.Resource;
|
|
||||||
import org.gcube.informationsystem.model.reference.properties.PropagationConstraint;
|
|
||||||
import org.gcube.informationsystem.model.reference.relations.IsIdentifiedBy;
|
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonTypeName;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author Luca Frosini (ISTI - CNR)
|
|
||||||
*/
|
|
||||||
@JsonTypeName(value=IsIdentifiedBy.NAME)
|
|
||||||
public class IsIdentifiedByImpl<S extends Resource, T extends Facet> extends
|
|
||||||
ConsistsOfImpl<S, T> implements IsIdentifiedBy<S, T> {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Generated Serial Version UID
|
|
||||||
*/
|
|
||||||
private static final long serialVersionUID = 8043666054054911145L;
|
|
||||||
|
|
||||||
protected IsIdentifiedByImpl(){
|
|
||||||
super();
|
|
||||||
}
|
|
||||||
|
|
||||||
public IsIdentifiedByImpl(S source, T target,
|
|
||||||
PropagationConstraint propagationConstraint) {
|
|
||||||
super(source, target, propagationConstraint);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -27,9 +27,6 @@ public interface Resource extends Entity {
|
||||||
public static final String CONSISTS_OF_PROPERTY = "consistsOf";
|
public static final String CONSISTS_OF_PROPERTY = "consistsOf";
|
||||||
public static final String IS_RELATED_TO_PROPERTY = "isRelatedTo";
|
public static final String IS_RELATED_TO_PROPERTY = "isRelatedTo";
|
||||||
|
|
||||||
@JsonIgnore
|
|
||||||
public List<? extends Facet> getIdentificationFacets();
|
|
||||||
|
|
||||||
// @JsonManagedReference
|
// @JsonManagedReference
|
||||||
public List<ConsistsOf<? extends Resource, ? extends Facet>> getConsistsOf();
|
public List<ConsistsOf<? extends Resource, ? extends Facet>> getConsistsOf();
|
||||||
|
|
||||||
|
|
|
@ -1,22 +0,0 @@
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
package org.gcube.informationsystem.model.reference.relations;
|
|
||||||
|
|
||||||
import org.gcube.informationsystem.model.impl.relations.IsIdentifiedByImpl;
|
|
||||||
import org.gcube.informationsystem.model.reference.entities.Facet;
|
|
||||||
import org.gcube.informationsystem.model.reference.entities.Resource;
|
|
||||||
|
|
||||||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author Luca Frosini (ISTI - CNR)
|
|
||||||
* https://wiki.gcube-system.org/gcube/Facet_Based_Resource_Model#isIdentifiedBy
|
|
||||||
*/
|
|
||||||
@JsonDeserialize(as=IsIdentifiedByImpl.class)
|
|
||||||
public interface IsIdentifiedBy<S extends Resource, T extends Facet>
|
|
||||||
extends ConsistsOf<S, T> {
|
|
||||||
|
|
||||||
public static final String NAME = "IsIdentifiedBy"; //IsIdentifiedBy.class.getSimpleName();
|
|
||||||
|
|
||||||
}
|
|
Loading…
Reference in New Issue