TypeBinder has been renamed to TypeMapper

This commit is contained in:
Luca Frosini 2020-02-04 09:31:19 +01:00
parent 4998a3768e
commit 2b0289fb5b
1 changed files with 11 additions and 11 deletions

View File

@ -9,7 +9,7 @@ import org.gcube.informationsystem.base.reference.Element;
import org.gcube.informationsystem.base.reference.entities.EntityElement;
import org.gcube.informationsystem.base.reference.properties.PropertyElement;
import org.gcube.informationsystem.base.reference.relations.RelationElement;
import org.gcube.informationsystem.types.TypeBinder;
import org.gcube.informationsystem.types.TypeMapper;
import org.gcube.informationsystem.types.reference.Type;
import org.gcube.informationsystem.types.reference.entities.EntityType;
import org.gcube.informationsystem.types.reference.properties.PropertyDefinition;
@ -87,25 +87,25 @@ public class EntityDiscoveryTest {
propertyDiscovery.discover();
for(Class<? extends PropertyElement> propertyClass : propertyDiscovery.getDiscovered()) {
String json = TypeBinder.serializeType(propertyClass);
String json = TypeMapper.serializeType(propertyClass);
logger.info("{}", json);
Type typeDefinition = TypeBinder.deserializeTypeDefinition(json);
Type typeDefinition = TypeMapper.deserializeTypeDefinition(json);
logger.info("{}", ElementMapper.marshal(typeDefinition));
}
}
@Test
public void testEntityTypeDefinitionSerialization() throws Exception {
logger.info("{}", TypeBinder.serializeType(EntityType.class));
logger.info("{}", TypeMapper.serializeType(EntityType.class));
}
@Test
public void testDefinitionSerialization() throws Exception {
logger.info("{}", TypeBinder.serializeType(Type.class));
logger.info("{}", TypeBinder.serializeType(EntityType.class));
logger.info("{}", TypeBinder.serializeType(RelationType.class));
logger.info("{}", TypeBinder.serializeType(PropertyType.class));
logger.info("{}", TypeBinder.serializeType(PropertyDefinition.class));
logger.info("{}", TypeMapper.serializeType(Type.class));
logger.info("{}", TypeMapper.serializeType(EntityType.class));
logger.info("{}", TypeMapper.serializeType(RelationType.class));
logger.info("{}", TypeMapper.serializeType(PropertyType.class));
logger.info("{}", TypeMapper.serializeType(PropertyDefinition.class));
}
@Test
@ -115,7 +115,7 @@ public class EntityDiscoveryTest {
entityDiscovery.discover();
for(Class<? extends EntityElement> entity : entityDiscovery.getDiscovered()) {
logger.info("{}", TypeBinder.serializeType(entity));
logger.info("{}", TypeMapper.serializeType(entity));
}
}
@ -127,7 +127,7 @@ public class EntityDiscoveryTest {
relationDiscovery.discover();
for(@SuppressWarnings("rawtypes") Class<? extends RelationElement> relation : relationDiscovery.getDiscovered()) {
logger.info("{}", TypeBinder.serializeType(relation));
logger.info("{}", TypeMapper.serializeType(relation));
}
}