Fixing bug on properties
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/information-system/resource-registry@134351 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
daf61bc522
commit
ab786c6f28
|
@ -153,7 +153,6 @@ public class EntityManagementImpl implements EntityManagement {
|
|||
SchemaManagementImpl schemaManagement = new SchemaManagementImpl();
|
||||
try {
|
||||
schemaManagement.getTypeSchema(type, Embedded.NAME);
|
||||
|
||||
} catch (SchemaNotFoundException e) {
|
||||
throw e;
|
||||
}
|
||||
|
@ -180,7 +179,7 @@ public class EntityManagementImpl implements EntityManagement {
|
|||
return null;
|
||||
}
|
||||
|
||||
public static Object getObejctFromElement(JsonNode value)
|
||||
public static Object getObjectFromElement(JsonNode value)
|
||||
throws ResourceRegistryException {
|
||||
JsonNodeType jsonNodeType = value.getNodeType();
|
||||
|
||||
|
@ -193,7 +192,7 @@ public class EntityManagementImpl implements EntityManagement {
|
|||
Iterator<JsonNode> arrayElement = value.elements();
|
||||
while (arrayElement.hasNext()) {
|
||||
JsonNode arrayNode = arrayElement.next();
|
||||
Object objectNode = getObejctFromElement(arrayNode);
|
||||
Object objectNode = getObjectFromElement(arrayNode);
|
||||
if (objectNode != null) {
|
||||
array.add(objectNode);
|
||||
}
|
||||
|
@ -265,7 +264,7 @@ public class EntityManagementImpl implements EntityManagement {
|
|||
JsonNode value = entry.getValue();
|
||||
Object object = null;
|
||||
try {
|
||||
object = getObejctFromElement(value);
|
||||
object = getObjectFromElement(value);
|
||||
if (object != null) {
|
||||
map.put(key, object);
|
||||
}
|
||||
|
|
|
@ -75,7 +75,7 @@ public class SchemaManagementImpl implements SchemaManagement {
|
|||
OClass oClass = getEntityOClass(orientGraphNoTx, type);
|
||||
|
||||
if (baseType != null) {
|
||||
if (!oClass.isSubClassOf(baseType)) {
|
||||
if(baseType.compareTo(Embedded.NAME)!=0 && !oClass.isSubClassOf(baseType)) {
|
||||
throw new SchemaException("The requested type is not a "
|
||||
+ baseType);
|
||||
}
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue