Removed commented code
This commit is contained in:
parent
3c692f7edd
commit
d25a01973b
|
@ -133,45 +133,6 @@ public class TypeManagement {
|
|||
return type;
|
||||
}
|
||||
|
||||
/*
|
||||
private static TypeDefinition getOClassTypeDefinition(OClass oClass) throws SchemaException {
|
||||
try {
|
||||
ODocument oDocument = ((OClassImpl) oClass).toStream();
|
||||
String json = oDocument.toJSON();
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
ObjectNode node = (ObjectNode) mapper.readTree(json);
|
||||
|
||||
if(oClass.isSubClassOf(Property.NAME)) {
|
||||
node.put(ISManageable.CLASS_PROPERTY, PropertyTypeDefinition.NAME);
|
||||
} else if(oClass.isSubClassOf(Resource.NAME)) {
|
||||
node.put(ISManageable.CLASS_PROPERTY, ResourceTypeDefinition.NAME);
|
||||
} else if(oClass.isSubClassOf(Facet.NAME)) {
|
||||
node.put(ISManageable.CLASS_PROPERTY, FacetTypeDefinition.NAME);
|
||||
} else if(oClass.isSubClassOf(IsRelatedTo.NAME)) {
|
||||
node.put(ISManageable.CLASS_PROPERTY, IsRelatedToTypeDefinition.NAME);
|
||||
} else if(oClass.isSubClassOf(ConsistsOf.NAME)) {
|
||||
node.put(ISManageable.CLASS_PROPERTY, ConsistsOfTypeDefinition.NAME);
|
||||
}
|
||||
|
||||
if(!oClass.isSubClassOf(Resource.NAME)) {
|
||||
ArrayNode arrayNode = (ArrayNode) node.get(EntityTypeDefinition.PROPERTIES_PROPERTY);
|
||||
Iterator<JsonNode> iterator = arrayNode.iterator();
|
||||
while(iterator.hasNext()) {
|
||||
ObjectNode propertyNode = (ObjectNode) iterator.next();
|
||||
propertyNode.put(ISManageable.CLASS_PROPERTY, PropertyDefinition.NAME);
|
||||
}
|
||||
}
|
||||
|
||||
String managedJson = mapper.writeValueAsString(node);
|
||||
logger.trace("{} -> {}", json, managedJson);
|
||||
|
||||
return TypeBinder.deserializeTypeDefinition(managedJson);
|
||||
} catch(Exception e) {
|
||||
throw new SchemaException(e);
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
private static ElementManagement<?,?> getTypeManagement(AccessType accessType, String name) {
|
||||
ElementManagement<? extends OElement,?> erManagement = null;
|
||||
|
||||
|
@ -254,27 +215,6 @@ public class TypeManagement {
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
private String getTypeAsString(AccessType accessType, String name) throws SchemaException {
|
||||
try {
|
||||
ElementManagement<? extends OElement> erManagement = getTypeManagement(accessType, name);
|
||||
return getTypeAsString(erManagement);
|
||||
} catch(Exception e) {
|
||||
throw new SchemaException(e);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
private Type getType(AccessType accessType, String name) throws SchemaException {
|
||||
try {
|
||||
String typeString = getTypeAsString(accessType, name);
|
||||
return TypeMapper.deserializeTypeDefinition(typeString);
|
||||
} catch(Exception e) {
|
||||
throw new SchemaException(e);
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
private Type getType(OClass oClass) throws SchemaException {
|
||||
try {
|
||||
String typeString = getTypeAsString(oClass);
|
||||
|
|
Loading…
Reference in New Issue