Package ca.uhn.fhir.context

Examples of ca.uhn.fhir.context.RuntimeChildDeclaredExtensionDefinition


        if (childDef == null) {
          super.throwExceptionForUnknownChildType(nextChild, type);
        }

        if (nextChild instanceof RuntimeChildDeclaredExtensionDefinition) {
          RuntimeChildDeclaredExtensionDefinition extDef = (RuntimeChildDeclaredExtensionDefinition) nextChild;
          if (extDef.isModifier()) {
            addToHeldExtensions(valueIdx, modifierExtensions, extDef, nextValue);
          } else {
            addToHeldExtensions(valueIdx, extensions, extDef, nextValue);
          }
        } else {
View Full Code Here


          extensionUrl = ((ExtensionDt) nextValue).getUrlAsString();
          encodeChildElementToStreamWriter(theResDef, theResource, theEventWriter, nextValue, childName, childDef, extensionUrl, theIncludedResource);

        } else if (extensionUrl != null && childName.equals("extension") == false) {
          RuntimeChildDeclaredExtensionDefinition extDef = (RuntimeChildDeclaredExtensionDefinition) nextChild;
          if (extDef.isModifier()) {
            theEventWriter.writeStartElement("modifierExtension");
          } else {
            theEventWriter.writeStartElement("extension");
          }
View Full Code Here

      }
    }

    @Override
    public void enteringNewElementExtension(StartElement theElement, String theUrlAttr, boolean theIsModifier) {
      RuntimeChildDeclaredExtensionDefinition declaredExtension = myDefinition.getChildExtensionForUrl(theUrlAttr);
      if (declaredExtension != null) {
        if (myChildInstance == null) {
          myChildInstance = myDefinition.newInstance();
          myDefinition.getMutator().addValue(myParentInstance, myChildInstance);
        }
View Full Code Here

      throw new DataFormatException("Illegal resource position: " + target.getChildType());
    }

    @Override
    public void enteringNewElementExtension(StartElement theElement, String theUrlAttr, boolean theIsModifier) {
      RuntimeChildDeclaredExtensionDefinition declaredExtension = myDefinition.getDeclaredExtension(theUrlAttr);
      if (declaredExtension != null) {
        BaseState newState = new DeclaredExtensionState(getPreResourceState(), declaredExtension, myInstance);
        push(newState);
      } else {
        super.enteringNewElementExtension(theElement, theUrlAttr, theIsModifier);
View Full Code Here

      throw new DataFormatException("Illegal resource position: " + target.getChildType());
    }

    @Override
    public void enteringNewElementExtension(StartElement theElement, String theUrlAttr, boolean theIsModifier) {
      RuntimeChildDeclaredExtensionDefinition declaredExtension = myDefinition.getDeclaredExtension(theUrlAttr);
      if (declaredExtension != null) {
        BaseState newState = new DeclaredExtensionState(getPreResourceState(), declaredExtension, myInstance);
        push(newState);
      } else {
        super.enteringNewElementExtension(theElement, theUrlAttr, theIsModifier);
View Full Code Here

          extensionUrl = ((ExtensionDt) nextValue).getUrlAsString();
          encodeChildElementToStreamWriter(theResDef, theResource, theEventWriter, nextValue, childName, childDef, extensionUrl, theIncludedResource);

        } else if (extensionUrl != null && childName.equals("extension") == false) {
          RuntimeChildDeclaredExtensionDefinition extDef = (RuntimeChildDeclaredExtensionDefinition) nextChild;
          if (extDef.isModifier()) {
            theEventWriter.writeStartElement("modifierExtension");
          } else {
            theEventWriter.writeStartElement("extension");
          }
View Full Code Here

      }
    }

    @Override
    public void enteringNewElementExtension(StartElement theElement, String theUrlAttr, boolean theIsModifier) {
      RuntimeChildDeclaredExtensionDefinition declaredExtension = myDefinition.getChildExtensionForUrl(theUrlAttr);
      if (declaredExtension != null) {
        if (myChildInstance == null) {
          myChildInstance = myDefinition.newInstance();
          myDefinition.getMutator().addValue(myParentInstance, myChildInstance);
        }
View Full Code Here

     
      List<RuntimeChildDeclaredExtensionDefinition> targetExts = theTargetDef.getExtensions();
      for (RuntimeChildDeclaredExtensionDefinition nextExt : targetExts) {
        String url = nextExt.getExtensionUrl();
       
        RuntimeChildDeclaredExtensionDefinition sourceDeclaredExt = theSourceDef.getDeclaredExtension(url);
        if (sourceDeclaredExt == null) {
         
          for (ExtensionDt next : theSource.getAllUndeclaredExtensions()) {
            if (next.getUrlAsString().equals(url)) {
              nextExt.getMutator().addValue(theTarget, next.getValue());
            }
          }
         
        } else {
         
          List<? extends IElement> values = sourceDeclaredExt.getAccessor().getValues(theSource);
          for (IElement nextElement : values) {
            nextExt.getMutator().addValue(theTarget, nextElement);
          }
         
        }
View Full Code Here

        if (childDef == null) {
          super.throwExceptionForUnknownChildType(nextChild, type);
        }

        if (extensionUrl != null && childName.equals("extension") == false) {
          RuntimeChildDeclaredExtensionDefinition extDef = (RuntimeChildDeclaredExtensionDefinition) nextChild;
          if (extDef.isModifier()) {
            theEventWriter.writeStartElement("modifierExtension");
          } else {
            theEventWriter.writeStartElement("extension");
          }
View Full Code Here

      }
    }

    @Override
    public void enteringNewElementExtension(StartElement theElement, String theUrlAttr, boolean theIsModifier) {
      RuntimeChildDeclaredExtensionDefinition declaredExtension = myDefinition.getChildExtensionForUrl(theUrlAttr);
      if (declaredExtension != null) {
        if (myChildInstance == null) {
          myChildInstance = myDefinition.newInstance();
          myDefinition.getMutator().addValue(myParentInstance, myChildInstance);
        }
View Full Code Here

TOP

Related Classes of ca.uhn.fhir.context.RuntimeChildDeclaredExtensionDefinition

Copyright © 2018 www.massapicom. 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.