Minor fixes

This commit is contained in:
Luca Frosini 2020-12-15 20:07:16 +01:00
parent 45901f0a37
commit 714086096f
3 changed files with 12 additions and 1 deletions

View File

@ -28,6 +28,8 @@ import org.gcube.resourcemanagement.model.reference.properties.utilities.Validat
@Change(version = TypeVersion.MINIMAL_VERSION_STRING, description = TypeVersion.MINIMAL_VERSION_DESCRIPTION)
public interface EnumStringProperty extends GCubeProperty, ValidatedTypedProperty<Set<String>, String> {
public static final String NAME = "EnumStringProperty"; //EnumStringProperty.class.getSimpleName();
@Override
default Validation validate() {
return new SetStringValidator().validate(this);

View File

@ -24,5 +24,6 @@ import org.gcube.resourcemanagement.model.impl.properties.GCubePropertyImpl;
public interface GCubeProperty extends Property {
public static final String NAME = "GCubeProperty"; //GCubeProperty.class.getSimpleName();
}

View File

@ -48,6 +48,9 @@ public class ISMDiscoveryTest {
@Override
public <R extends RelationElement<? extends EntityElement, ? extends EntityElement>> void manageRelationClass(
Class<R> r) throws Exception {
if(r.isAssignableFrom(Type.class)) {
return;
}
Type type = TypeMapper.createTypeDefinition(r);
Assert.assertTrue(type.getName().compareTo(r.getSimpleName())==0);
logger.debug("{} {}", r.getSimpleName(), TypeMapper.serializeTypeDefinition(type));
@ -55,6 +58,9 @@ public class ISMDiscoveryTest {
@Override
public <P extends PropertyElement> void managePropertyClass(Class<P> p) throws Exception {
if(p.isAssignableFrom(Type.class)) {
return;
}
Type type = TypeMapper.createTypeDefinition(p);
Assert.assertTrue(type.getName().compareTo(p.getSimpleName())==0);
logger.debug("{} {}", p.getSimpleName(), TypeMapper.serializeTypeDefinition(type));
@ -62,13 +68,15 @@ public class ISMDiscoveryTest {
@Override
public <E extends EntityElement> void manageEntityClass(Class<E> e) throws Exception {
if(e.isAssignableFrom(Type.class)) {
return;
}
Type type = TypeMapper.createTypeDefinition(e);
Assert.assertTrue(type.getName().compareTo(e.getSimpleName())==0);
logger.debug("{} {}", e.getSimpleName(), TypeMapper.serializeTypeDefinition(type));
}
};
ElementSpecilizationDiscovery.manageISM(schemaAction , packages);
}
}