implementing relation management
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/private/luca.frosini/information-system-model@130165 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
87e5f34eaa
commit
8f1171efec
|
@ -3,6 +3,7 @@
|
|||
*/
|
||||
package org.gcube.informationsystem.impl.relation;
|
||||
|
||||
import org.gcube.informationsystem.model.embedded.Header;
|
||||
import org.gcube.informationsystem.model.embedded.RelationProperty;
|
||||
import org.gcube.informationsystem.model.entity.Entity;
|
||||
import org.gcube.informationsystem.model.relation.Relation;
|
||||
|
@ -10,8 +11,10 @@ import org.gcube.informationsystem.model.relation.Relation;
|
|||
/**
|
||||
* @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
|
||||
*/
|
||||
public abstract class RelationImpl<Out extends Entity, In extends Entity> implements Relation<Out, In> {
|
||||
public class RelationImpl<Out extends Entity, In extends Entity> implements Relation<Out, In> {
|
||||
|
||||
protected Header header;
|
||||
|
||||
protected Out source;
|
||||
protected In target;
|
||||
|
||||
|
@ -23,6 +26,11 @@ public abstract class RelationImpl<Out extends Entity, In extends Entity> implem
|
|||
this.relationProperty = relationProperty;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Header getHeader() {
|
||||
return header;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Out getSource() {
|
||||
return null;
|
||||
|
@ -38,4 +46,5 @@ public abstract class RelationImpl<Out extends Entity, In extends Entity> implem
|
|||
return this.relationProperty;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
package org.gcube.informationsystem.model.relation;
|
||||
|
||||
import org.gcube.informationsystem.model.annotations.ISProperty;
|
||||
import org.gcube.informationsystem.model.embedded.Header;
|
||||
import org.gcube.informationsystem.model.embedded.RelationProperty;
|
||||
import org.gcube.informationsystem.model.entity.Entity;
|
||||
|
||||
|
@ -14,6 +15,11 @@ public interface Relation<Out extends Entity, In extends Entity> {
|
|||
|
||||
public static final String RELATION_PROPERTY = "relationProperty";
|
||||
|
||||
public static final String HEADER_PROPERTY = Entity.HEADER_PROPERTY;
|
||||
|
||||
@ISProperty(name=HEADER_PROPERTY, mandatory=true, nullable=false)
|
||||
public Header getHeader();
|
||||
|
||||
public Out getSource();
|
||||
|
||||
public In getTarget();
|
||||
|
|
Loading…
Reference in New Issue