private void parseFragmentInner(Fragment fragment) throws EGraphQLException, IOException { while (hasPunctuation("@")) fragment.getDirectives().add(parseDirective()); consumePunctuation("{"); do fragment.getSelectionSet().add(parseSelection()); while (!hasPunctuation("}")); consumePunctuation("}"); }
private Fragment parseFragment() throws EGraphQLException, IOException { Fragment result = new Fragment(); result.setName(consumeName()); consumeName("on"); result.setTypeCondition(consumeName()); parseFragmentInner(result); return result; }
private Fragment parseInlineFragment() throws EGraphQLException, IOException { Fragment result = new Fragment(); if (hasName("on")) { consumeName("on"); result.setTypeCondition(consumeName()); } parseFragmentInner(result); return result; }
if (checkDirectives(sel.getInlineFragment().getDirectives())) { if (Utilities.noString(sel.getInlineFragment().getTypeCondition())) throw new EGraphQLException("Not done yet - inline fragment with no type condition"); // cause why? why instanceof it even valid? if (source.fhirType().equals(sel.getInlineFragment().getTypeCondition())) processObject(context, source, target, sel.getInlineFragment().getSelectionSet(), inheritedList, suffix); throw new EGraphQLException("Unable to resolve fragment "+sel.getFragmentSpread().getName()); if (Utilities.noString(fragment.getTypeCondition())) throw new EGraphQLException("Not done yet - inline fragment with no type condition"); // cause why? why instanceof it even valid? if (source.fhirType().equals(fragment.getTypeCondition())) processObject(context, source, target, fragment.getSelectionSet(), inheritedList, suffix);
if (checkDirectives(sel.getInlineFragment().getDirectives())) { if (Utilities.noString(sel.getInlineFragment().getTypeCondition())) throw new EGraphQLException("Not done yet - inline fragment with no type condition"); // cause why? why instanceof it even valid? if (source.fhirType().equals(sel.getInlineFragment().getTypeCondition())) processObject(context, source, target, sel.getInlineFragment().getSelectionSet(), inheritedList, suffix); throw new EGraphQLException("Unable to resolve fragment "+sel.getFragmentSpread().getName()); if (Utilities.noString(fragment.getTypeCondition())) throw new EGraphQLException("Not done yet - inline fragment with no type condition"); // cause why? why instanceof it even valid? if (source.fhirType().equals(fragment.getTypeCondition())) processObject(context, source, target, fragment.getSelectionSet(), inheritedList, suffix);
private Fragment parseInlineFragment() throws EGraphQLException, IOException { Fragment result = new Fragment(); if (hasName("on")) { consumeName("on"); result.setTypeCondition(consumeName()); } parseFragmentInner(result); return result; }
private void parseFragmentInner(Fragment fragment) throws EGraphQLException, IOException { while (hasPunctuation("@")) fragment.getDirectives().add(parseDirective()); consumePunctuation("{"); do fragment.getSelectionSet().add(parseSelection()); while (!hasPunctuation("}")); consumePunctuation("}"); }
private Fragment parseFragment() throws EGraphQLException, IOException { Fragment result = new Fragment(); result.setName(consumeName()); consumeName("on"); result.setTypeCondition(consumeName()); parseFragmentInner(result); return result; }