Adding support for Resource schema definition
This commit is contained in:
parent
6e73f54de5
commit
1e84cd6607
|
@ -87,7 +87,7 @@ public final class ResourceEntryDefinitionImpl extends BasePropertyImpl implemen
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setMax(Integer max) {
|
public void setMax(Integer max) {
|
||||||
if(max<=0) {
|
if(max==null || max<=0) {
|
||||||
this.max = null;
|
this.max = null;
|
||||||
}else {
|
}else {
|
||||||
this.max = max;
|
this.max = max;
|
||||||
|
|
|
@ -2,6 +2,7 @@ package org.gcube.informationsystem.types.reference.entities;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.gcube.informationsystem.types.annotations.ISProperty;
|
||||||
import org.gcube.informationsystem.types.impl.entities.ResourceTypeDefinitionImpl;
|
import org.gcube.informationsystem.types.impl.entities.ResourceTypeDefinitionImpl;
|
||||||
import org.gcube.informationsystem.types.reference.properties.ResourceEntryDefinition;
|
import org.gcube.informationsystem.types.reference.properties.ResourceEntryDefinition;
|
||||||
|
|
||||||
|
@ -14,7 +15,13 @@ public interface ResourceTypeDefinition extends EntityTypeDefinition {
|
||||||
public static final String DESCRIPTION = "Used to define a Resource Type";
|
public static final String DESCRIPTION = "Used to define a Resource Type";
|
||||||
public static final String VERSION = "1.0.0";
|
public static final String VERSION = "1.0.0";
|
||||||
|
|
||||||
|
public static final String FACETS_PROPERTY = "facets";
|
||||||
|
public static final String RESOURCES_PROPERTY = "resources";
|
||||||
|
|
||||||
|
@ISProperty(name = FACETS_PROPERTY, readonly = false, mandatory = true, nullable = false)
|
||||||
public List<ResourceEntryDefinition> getFacets();
|
public List<ResourceEntryDefinition> getFacets();
|
||||||
|
|
||||||
|
@ISProperty(name = RESOURCES_PROPERTY, readonly = false, mandatory = true, nullable = false)
|
||||||
public List<ResourceEntryDefinition> getResources();
|
public List<ResourceEntryDefinition> getResources();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,12 +38,12 @@ public interface ResourceEntryDefinition extends BaseProperty {
|
||||||
|
|
||||||
public void setDescription(String description);
|
public void setDescription(String description);
|
||||||
|
|
||||||
@ISProperty(name = MIN_PROPERTY, readonly = false, mandatory = true, nullable = false)
|
@ISProperty(name = MIN_PROPERTY, readonly = true, mandatory = true, nullable = false)
|
||||||
public Integer getMin();
|
public Integer getMin();
|
||||||
|
|
||||||
public void setMin(Integer min);
|
public void setMin(Integer min);
|
||||||
|
|
||||||
@ISProperty(name = MAX_PROPERTY, readonly = false, mandatory = true, nullable = true)
|
@ISProperty(name = MAX_PROPERTY, readonly = true, mandatory = true, nullable = true)
|
||||||
public Integer getMax();
|
public Integer getMax();
|
||||||
|
|
||||||
public void setMax(Integer max);
|
public void setMax(Integer max);
|
||||||
|
|
Loading…
Reference in New Issue