return TWIG_PROPERTY;
}
@Override
TwigQueryNode parse() throws ParseException {
final TwigQueryNode twigNode = new TwigQueryNode();
twigNode.setField(field);
final JsonNode objectNode = node.path(this.getProperty());
final RootPropertyParser rootParser = new RootPropertyParser(objectNode, field);
rootParser.setOptional(true);
if (rootParser.isPropertyDefined()) {
twigNode.setRoot(rootParser.parse());
}
final LevelPropertyParser levelParser = new LevelPropertyParser(objectNode, field);
levelParser.setOptional(true);
if (levelParser.isPropertyDefined()) {
twigNode.setTag(levelParser.getProperty(), levelParser.parse());
}
final RangePropertyParser rangeParser = new RangePropertyParser(objectNode, field);
rangeParser.setOptional(true);
if (rangeParser.isPropertyDefined()) {
twigNode.setTag(rangeParser.getProperty(), rangeParser.parse());
}
final ChildPropertyParser childParser = new ChildPropertyParser(objectNode, field);
childParser.setOptional(true);
if (childParser.isPropertyDefined()) {
final ArrayQueryNode arrayNode = childParser.parse();
twigNode.add(arrayNode.getChildren());
}
final DescendantPropertyParser descendantParser = new DescendantPropertyParser(objectNode, field);
descendantParser.setOptional(true);
if (descendantParser.isPropertyDefined()) {
final ArrayQueryNode arrayNode = descendantParser.parse();
twigNode.add(arrayNode.getChildren());
}
return twigNode;
}