Examples of ISupportsUndeclaredExtensions


Examples of ca.uhn.fhir.model.api.ISupportsUndeclaredExtensions

  }

  private void encodeExtensionsIfPresent(RuntimeResourceDefinition theResDef, IResource theResource, XMLStreamWriter theWriter, IElement theElement, boolean theIncludedResource)
      throws XMLStreamException, DataFormatException {
    if (theElement instanceof ISupportsUndeclaredExtensions) {
      ISupportsUndeclaredExtensions res = (ISupportsUndeclaredExtensions) theElement;
      encodeUndeclaredExtensions(theResDef, theResource, theWriter, res.getUndeclaredExtensions(), "extension", theIncludedResource);
      encodeUndeclaredExtensions(theResDef, theResource, theWriter, res.getUndeclaredModifierExtensions(), "modifierExtension", theIncludedResource);
    }
  }
View Full Code Here

Examples of ca.uhn.fhir.model.api.ISupportsUndeclaredExtensions

     * Default implementation just handles undeclared extensions
     */
    public void enteringNewElementExtension(StartElement theElement, String theUrlAttr, boolean theIsModifier) {
      if (myPreResourceState != null && getCurrentElement() instanceof ISupportsUndeclaredExtensions) {
        ExtensionDt newExtension = new ExtensionDt(theIsModifier, theUrlAttr);
        ISupportsUndeclaredExtensions elem = (ISupportsUndeclaredExtensions) getCurrentElement();
        if (theIsModifier) {
          elem.getUndeclaredModifierExtensions().add(newExtension);
        } else {
          elem.getUndeclaredExtensions().add(newExtension);
        }
        ExtensionState newState = new ExtensionState(myPreResourceState, newExtension);
        push(newState);
      } else {
        throw new DataFormatException("Type " + getCurrentElement() + " does not support undeclared extentions, and found an extension with URL: " + theUrlAttr);
View Full Code Here

Examples of ca.uhn.fhir.model.api.ISupportsUndeclaredExtensions

    }
  }

  private <T extends IElement> void addUndeclaredExtensions(IElement theElement, Class<T> theType, ArrayList<T> theList) {
    if (theElement instanceof ISupportsUndeclaredExtensions) {
      ISupportsUndeclaredExtensions elem = (ISupportsUndeclaredExtensions) theElement;
      for (ExtensionDt nextExt : elem.getUndeclaredExtensions()) {
        addIfCorrectType(nextExt, theType, theList);
        addIfCorrectType(nextExt.getValue(), theType, theList);
        addUndeclaredExtensions(nextExt, theType, theList);
      }
    }
View Full Code Here

Examples of ca.uhn.fhir.model.api.ISupportsUndeclaredExtensions

  }

  private void encodeExtensionsIfPresent(RuntimeResourceDefinition theResDef, IResource theResource, XMLStreamWriter theWriter, IElement theElement, boolean theIncludedResource)
      throws XMLStreamException, DataFormatException {
    if (theElement instanceof ISupportsUndeclaredExtensions) {
      ISupportsUndeclaredExtensions res = (ISupportsUndeclaredExtensions) theElement;
      encodeUndeclaredExtensions(theResDef, theResource, theWriter, res.getUndeclaredExtensions(), "extension", theIncludedResource);
      encodeUndeclaredExtensions(theResDef, theResource, theWriter, res.getUndeclaredModifierExtensions(), "modifierExtension", theIncludedResource);
    }
  }
View Full Code Here

Examples of ca.uhn.fhir.model.api.ISupportsUndeclaredExtensions

     */
    @SuppressWarnings("unused")
    public void enteringNewElementExtension(StartElement theElement, String theUrlAttr, boolean theIsModifier) {
      if (myPreResourceState != null && getCurrentElement() instanceof ISupportsUndeclaredExtensions) {
        ExtensionDt newExtension = new ExtensionDt(theIsModifier, theUrlAttr);
        ISupportsUndeclaredExtensions elem = (ISupportsUndeclaredExtensions) getCurrentElement();
        elem.addUndeclaredExtension(newExtension);
        ExtensionState newState = new ExtensionState(myPreResourceState, newExtension);
        push(newState);
      } else {
        throw new DataFormatException("Type " + getCurrentElement() + " does not support undeclared extentions, and found an extension with URL: " + theUrlAttr);
      }
View Full Code Here

Examples of ca.uhn.fhir.model.api.ISupportsUndeclaredExtensions

    }
  }

  private <T extends IElement> void addUndeclaredExtensions(IElement theElement, BaseRuntimeElementDefinition<?> theDefinition, BaseRuntimeChildDefinition theChildDefinition, IModelVisitor theCallback) {
    if (theElement instanceof ISupportsUndeclaredExtensions) {
      ISupportsUndeclaredExtensions containingElement = (ISupportsUndeclaredExtensions) theElement;
      for (ExtensionDt nextExt : containingElement.getUndeclaredExtensions()) {
        theCallback.acceptUndeclaredExtension(containingElement, theChildDefinition, theDefinition, nextExt);
        addUndeclaredExtensions(nextExt, theDefinition, theChildDefinition, theCallback);
      }
    }
  }
View Full Code Here

Examples of ca.uhn.fhir.model.api.ISupportsUndeclaredExtensions

    encodeCompositeElementChildrenToStreamWriter(theResDef, theResource, theElement, theEventWriter, resDef.getChildren(), theIncludedResource);
  }

  private void encodeExtensionsIfPresent(RuntimeResourceDefinition theResDef, IResource theResource, XMLStreamWriter theWriter, IElement theElement, boolean theIncludedResource) throws XMLStreamException, DataFormatException {
    if (theElement instanceof ISupportsUndeclaredExtensions) {
      ISupportsUndeclaredExtensions res = (ISupportsUndeclaredExtensions) theElement;
      encodeUndeclaredExtensions(theResDef, theResource, theWriter, res.getUndeclaredExtensions(), "extension", theIncludedResource);
      encodeUndeclaredExtensions(theResDef, theResource, theWriter, res.getUndeclaredModifierExtensions(), "modifierExtension", theIncludedResource);
    }
  }
View Full Code Here

Examples of ca.uhn.fhir.model.api.ISupportsUndeclaredExtensions

     * Default implementation just handles undeclared extensions
     */
    public void enteringNewElementExtension(@SuppressWarnings("unused") StartElement theElement, String theUrlAttr, boolean theIsModifier) {
      if (myPreResourceState != null && getCurrentElement() instanceof ISupportsUndeclaredExtensions) {
        ExtensionDt newExtension = new ExtensionDt(theIsModifier, theUrlAttr);
        ISupportsUndeclaredExtensions elem = (ISupportsUndeclaredExtensions) getCurrentElement();
        if (theIsModifier) {
          elem.getUndeclaredModifierExtensions().add(newExtension);
        } else {
          elem.getUndeclaredExtensions().add(newExtension);
        }
        ExtensionState newState = new ExtensionState(myPreResourceState, newExtension);
        push(newState);
      } else {
        throw new DataFormatException("Type " + getCurrentElement() + " does not support undeclared extentions, and found an extension with URL: " + theUrlAttr);
View Full Code Here

Examples of ca.uhn.fhir.model.api.ISupportsUndeclaredExtensions

     * Default implementation just handles undeclared extensions
     */
    public void enteringNewElementExtension(@SuppressWarnings("unused") StartElement theElement, String theUrlAttr, boolean theIsModifier) {
      if (myPreResourceState != null && getCurrentElement() instanceof ISupportsUndeclaredExtensions) {
        ExtensionDt newExtension = new ExtensionDt(theIsModifier, theUrlAttr);
        ISupportsUndeclaredExtensions elem = (ISupportsUndeclaredExtensions) getCurrentElement();
        if (theIsModifier) {
          elem.getUndeclaredModifierExtensions().add(newExtension);
        } else {
          elem.getUndeclaredExtensions().add(newExtension);
        }
        ExtensionState newState = new ExtensionState(myPreResourceState, newExtension);
        push(newState);
      } else {
        throw new DataFormatException("Type " + getCurrentElement() + " does not support undeclared extentions, and found an extension with URL: " + theUrlAttr);
View Full Code Here

Examples of ca.uhn.fhir.model.api.ISupportsUndeclaredExtensions

    encodeCompositeElementChildrenToStreamWriter(theResDef, theResource, theElement, theEventWriter, resDef.getChildren(), theIncludedResource);
  }

  private void encodeExtensionsIfPresent(RuntimeResourceDefinition theResDef, IResource theResource, XMLStreamWriter theWriter, IElement theElement, boolean theIncludedResource) throws XMLStreamException, DataFormatException {
    if (theElement instanceof ISupportsUndeclaredExtensions) {
      ISupportsUndeclaredExtensions res = (ISupportsUndeclaredExtensions) theElement;
      encodeUndeclaredExtensions(theResDef, theResource, theWriter, res.getUndeclaredExtensions(), "extension", theIncludedResource);
      encodeUndeclaredExtensions(theResDef, theResource, theWriter, res.getUndeclaredModifierExtensions(), "modifierExtension", theIncludedResource);
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.