Implementing feature
This commit is contained in:
parent
d2b797c19a
commit
24f2ec53c1
|
@ -122,6 +122,14 @@ public class JsonQueryResource extends JsonQueryEntity {
|
|||
|
||||
StringBuffer buffer = new StringBuffer();
|
||||
|
||||
if(!entryPoint) {
|
||||
buffer.append("\n\t");
|
||||
buffer.append(direction.name().toLowerCase());
|
||||
buffer.append("V('");
|
||||
buffer.append(type);
|
||||
buffer.append("'");
|
||||
}
|
||||
|
||||
int isRelatedToSize = 0;
|
||||
|
||||
ArrayNode consistsOfArray = (ArrayNode) jsonNode.get(Resource.CONSISTS_OF_PROPERTY);
|
||||
|
|
|
@ -141,8 +141,42 @@ public class JsonQueryConsistsOf extends JsonQueryRelation {
|
|||
@Override
|
||||
protected StringBuffer getSpecificMatchQuery(List<JsonQueryERElement> childrenBreadcrumb)
|
||||
throws SchemaException, ResourceRegistryException {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
StringBuffer buffer = new StringBuffer();
|
||||
|
||||
if(!entryPoint) {
|
||||
buffer.append("\n\t");
|
||||
buffer.append(direction.name().toLowerCase());
|
||||
buffer.append("E('");
|
||||
buffer.append(type);
|
||||
buffer.append("'");
|
||||
|
||||
}
|
||||
|
||||
if(jsonNode.has(ConsistsOf.TARGET_PROPERTY)) {
|
||||
--size;
|
||||
JsonNode facetJsonNode = jsonNode.get(ConsistsOf.TARGET_PROPERTY);
|
||||
JsonQueryFacet jsonQueryFacet = new JsonQueryFacet(facetJsonNode);
|
||||
jsonQueryFacet.setTraverseBack(true);
|
||||
buffer = jsonQueryFacet.createMatchQuery(buffer);
|
||||
}
|
||||
|
||||
if(jsonNode.has(ConsistsOf.SOURCE_PROPERTY)) {
|
||||
--size;
|
||||
JsonNode resourceJsonNode = jsonNode.get(ConsistsOf.SOURCE_PROPERTY);
|
||||
JsonQueryResource jsonQueryResource = new JsonQueryResource(resourceJsonNode);
|
||||
jsonQueryResource.setTraverseBack(true);
|
||||
buffer = jsonQueryResource.createMatchQuery(buffer);
|
||||
}
|
||||
|
||||
if(traverseBack) {
|
||||
buffer.append("\n\t");
|
||||
buffer.append(direction.opposite().name().toLowerCase());
|
||||
buffer.append("E('");
|
||||
buffer.append(type);
|
||||
buffer.append("'");
|
||||
}
|
||||
|
||||
return buffer;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue