Refs #11288: Made resource-registry more RESTful

Task-Url: https://support.d4science.org/issues/11288

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/information-system/resource-registry@168999 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Luca Frosini 2018-06-11 10:03:46 +00:00
parent d5d79c14cc
commit 32b5499b2e
1 changed files with 3 additions and 0 deletions

View File

@ -32,6 +32,7 @@ public class SchemaActionImpl implements SchemaAction {
public <R extends Relation<? extends Entity,? extends Entity>> void manageRelationClass(Class<R> r) public <R extends Relation<? extends Entity,? extends Entity>> void manageRelationClass(Class<R> r)
throws Exception { throws Exception {
try { try {
((SchemaManagementImpl) schemaManagement).setTypeName(TypeBinder.getType(r));
String json = TypeBinder.serializeType(r); String json = TypeBinder.serializeType(r);
logger.trace(json); logger.trace(json);
if(ConsistsOf.class.isAssignableFrom(r)) { if(ConsistsOf.class.isAssignableFrom(r)) {
@ -51,6 +52,7 @@ public class SchemaActionImpl implements SchemaAction {
@Override @Override
public <E extends Entity> void manageEntityClass(Class<E> e) throws Exception { public <E extends Entity> void manageEntityClass(Class<E> e) throws Exception {
try { try {
((SchemaManagementImpl) schemaManagement).setTypeName(TypeBinder.getType(e));
String json = TypeBinder.serializeType(e); String json = TypeBinder.serializeType(e);
logger.trace(json); logger.trace(json);
if(Facet.class.isAssignableFrom(e)) { if(Facet.class.isAssignableFrom(e)) {
@ -69,6 +71,7 @@ public class SchemaActionImpl implements SchemaAction {
@Override @Override
public <E extends Embedded> void manageEmbeddedClass(Class<E> e) throws Exception { public <E extends Embedded> void manageEmbeddedClass(Class<E> e) throws Exception {
try { try {
((SchemaManagementImpl) schemaManagement).setTypeName(TypeBinder.getType(e));
String json = TypeBinder.serializeType(e); String json = TypeBinder.serializeType(e);
logger.trace(json); logger.trace(json);
schemaManagement.create(json, AccessType.EMBEDDED); schemaManagement.create(json, AccessType.EMBEDDED);