private Field parseField() throws EGraphQLException, IOException { Field result = new Field(); result.setName(consumeName()); result.setAlias(result.getName()); if (hasPunctuation(":")) { consumePunctuation(":"); result.setName(consumeName()); } if (hasPunctuation("(")) { consumePunctuation("("); while (!hasPunctuation(")")) result.getArguments().add(parseArgument()); consumePunctuation(")"); } while (hasPunctuation("@")) result.getDirectives().add(parseDirective()); if (hasPunctuation("{")) { consumePunctuation("{"); do { result.getSelectionSet().add(parseSelection()); } while (!hasPunctuation("}")); consumePunctuation("}"); } return result; }
private void processSearch(ObjectValue target, List<Selection> selection, boolean inheritedList, String suffix) throws EGraphQLException, FHIRException { for (Selection sel : selection) { if ((sel.getField() == null)) throw new EGraphQLException("Only field selections are allowed in this context"); checkNoDirectives(sel.getField().getDirectives()); if ((isResourceName(sel.getField().getName(), ""))) processSearchSingle(target, sel.getField(), inheritedList, suffix); else if ((isResourceName(sel.getField().getName(), "List"))) processSearchSimple(target, sel.getField(), inheritedList, suffix); else if ((isResourceName(sel.getField().getName(), "Connection"))) processSearchFull(target, sel.getField(), inheritedList, suffix); } }
private void processObject(Resource context, Base source, ObjectValue target, List<Selection> selection, boolean inheritedList, String suffix) throws EGraphQLException, FHIRException { for (Selection sel : selection) { if (sel.getField() != null) { if (checkDirectives(sel.getField().getDirectives())) { Property prop = source.getNamedProperty(sel.getField().getName()); if ((prop == null) && sel.getField().getName().startsWith("_"))
private Field parseField() throws EGraphQLException, IOException { Field result = new Field(); result.setName(consumeName()); result.setAlias(result.getName()); if (hasPunctuation(":")) { consumePunctuation(":"); result.setName(consumeName()); } if (hasPunctuation("(")) { consumePunctuation("("); while (!hasPunctuation(")")) result.getArguments().add(parseArgument()); consumePunctuation(")"); } while (hasPunctuation("@")) result.getDirectives().add(parseDirective()); if (hasPunctuation("{")) { consumePunctuation("{"); do { result.getSelectionSet().add(parseSelection()); } while (!hasPunctuation("}")); consumePunctuation("}"); } return result; }
private void processSearch(ObjectValue target, List<Selection> selection, boolean inheritedList, String suffix) throws EGraphQLException, FHIRException { for (Selection sel : selection) { if ((sel.getField() == null)) throw new EGraphQLException("Only field selections are allowed in this context"); checkNoDirectives(sel.getField().getDirectives()); if ((isResourceName(sel.getField().getName(), ""))) processSearchSingle(target, sel.getField(), inheritedList, suffix); else if ((isResourceName(sel.getField().getName(), "List"))) processSearchSimple(target, sel.getField(), inheritedList, suffix); else if ((isResourceName(sel.getField().getName(), "Connection"))) processSearchFull(target, sel.getField(), inheritedList, suffix); } }
private void processObject(Resource context, Base source, ObjectValue target, List<Selection> selection, boolean inheritedList, String suffix) throws EGraphQLException, FHIRException { for (Selection sel : selection) { if (sel.getField() != null) { if (checkDirectives(sel.getField().getDirectives())) { Property prop = source.getNamedProperty(sel.getField().getName()); if ((prop == null) && sel.getField().getName().startsWith("_"))