Redesigning E/R instance definition
This commit is contained in:
parent
a977dc0faf
commit
60ef7ae655
|
@ -1,14 +1,10 @@
|
|||
package org.gcube.informationsystem.types.reference.entities;
|
||||
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
|
||||
import org.gcube.com.fasterxml.jackson.annotation.JsonGetter;
|
||||
import org.gcube.com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import org.gcube.com.fasterxml.jackson.annotation.JsonSetter;
|
||||
import org.gcube.com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
||||
import org.gcube.informationsystem.base.reference.entities.EntityElement;
|
||||
import org.gcube.informationsystem.model.reference.properties.Metadata;
|
||||
import org.gcube.informationsystem.types.annotations.ISProperty;
|
||||
import org.gcube.informationsystem.types.impl.entities.EntityTypeImpl;
|
||||
import org.gcube.informationsystem.types.reference.Change;
|
||||
|
@ -29,24 +25,6 @@ public interface EntityType extends Type, EntityElement {
|
|||
|
||||
/* Type is just a Java useful class. The type is not created in the IS. Hence the fields must be redefined */
|
||||
|
||||
@JsonGetter(value = UUID_PROPERTY)
|
||||
@ISProperty(name = UUID_PROPERTY, description = "This UUID is be used to identify the instance univocally.", readonly = true, mandatory = true, nullable = false)
|
||||
@Override
|
||||
public UUID getUUID();
|
||||
|
||||
@JsonSetter(value = UUID_PROPERTY)
|
||||
@Override
|
||||
public void setUUID(UUID uuid);
|
||||
|
||||
@JsonGetter(value = METADATA_PROPERTY)
|
||||
@ISProperty(name=METADATA_PROPERTY, mandatory=true, nullable=false, description="Metadata associated with the instance that is automatically created/updated by the system.")
|
||||
@Override
|
||||
public Metadata getMetadata();
|
||||
|
||||
@JsonSetter(value = METADATA_PROPERTY)
|
||||
@Override
|
||||
public void setMetadata(Metadata metadata);
|
||||
|
||||
@Override
|
||||
@ISProperty(name = Type.NAME_PROPERTY, readonly = true, mandatory = true, nullable = false)
|
||||
public String getName();
|
||||
|
|
|
@ -29,8 +29,6 @@ public interface PropertyType<P extends PropertyElement> extends PropertyElement
|
|||
|
||||
public static final String NAME = "PropertyType"; // PropertyType.class.getSimpleName();
|
||||
|
||||
/* Type is just a Java useful class. The type is not created in the IS. Hence the fields must be redefined */
|
||||
|
||||
@JsonGetter(value = UUID_PROPERTY)
|
||||
@ISProperty(name = UUID_PROPERTY, description = "This UUID is be used to identify the instance univocally.", readonly = true, mandatory = true, nullable = false)
|
||||
@Override
|
||||
|
@ -49,6 +47,8 @@ public interface PropertyType<P extends PropertyElement> extends PropertyElement
|
|||
@Override
|
||||
public void setMetadata(Metadata metadata);
|
||||
|
||||
/* Type is just a Java useful class. The type is not created in the IS. Hence the fields must be redefined */
|
||||
|
||||
@Override
|
||||
@ISProperty(name = Type.NAME_PROPERTY, readonly = true, mandatory = true, nullable = false)
|
||||
public String getName();
|
||||
|
|
|
@ -1,14 +1,10 @@
|
|||
package org.gcube.informationsystem.types.reference.relations;
|
||||
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
|
||||
import org.gcube.com.fasterxml.jackson.annotation.JsonGetter;
|
||||
import org.gcube.com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import org.gcube.com.fasterxml.jackson.annotation.JsonSetter;
|
||||
import org.gcube.com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
||||
import org.gcube.informationsystem.base.reference.relations.RelationElement;
|
||||
import org.gcube.informationsystem.model.reference.properties.Metadata;
|
||||
import org.gcube.informationsystem.types.annotations.ISProperty;
|
||||
import org.gcube.informationsystem.types.impl.relations.RelationTypeImpl;
|
||||
import org.gcube.informationsystem.types.reference.Change;
|
||||
|
@ -32,24 +28,6 @@ public interface RelationType<S extends EntityType, T extends EntityType>
|
|||
|
||||
/* Type is just a Java useful class. The type is not created in the IS. Hence the fields must be redefined */
|
||||
|
||||
@JsonGetter(value = UUID_PROPERTY)
|
||||
@ISProperty(name = UUID_PROPERTY, description = "This UUID is be used to identify the instance univocally.", readonly = true, mandatory = true, nullable = false)
|
||||
@Override
|
||||
public UUID getUUID();
|
||||
|
||||
@JsonSetter(value = UUID_PROPERTY)
|
||||
@Override
|
||||
public void setUUID(UUID uuid);
|
||||
|
||||
@JsonGetter(value = METADATA_PROPERTY)
|
||||
@ISProperty(name=METADATA_PROPERTY, mandatory=true, nullable=false, description="Metadata associated with the instance that is automatically created/updated by the system.")
|
||||
@Override
|
||||
public Metadata getMetadata();
|
||||
|
||||
@JsonSetter(value = METADATA_PROPERTY)
|
||||
@Override
|
||||
public void setMetadata(Metadata metadata);
|
||||
|
||||
@Override
|
||||
@ISProperty(name = Type.NAME_PROPERTY, readonly = true, mandatory = true, nullable = false)
|
||||
public String getName();
|
||||
|
|
Loading…
Reference in New Issue