Package ca.uhn.fhir.model.primitive

Examples of ca.uhn.fhir.model.primitive.IdDt


     * The version of the FHIR specification on which this conformance statement is based
     * </p>
   */
  public IdDt getFhirVersion() { 
    if (myFhirVersion == null) {
      myFhirVersion = new IdDt();
    }
    return myFhirVersion;
  }
View Full Code Here


     * <b>Definition:</b>
     * The version of the FHIR specification on which this conformance statement is based
     * </p>
   */
  public Conformance setFhirVersion( String theId) {
    myFhirVersion = new IdDt(theId);
    return this;
  }
View Full Code Here

    /*
     * We are being a bit lenient here, since technically the client is supposed to include the version in the
     * Content-Location header, but we allow it in the PUT URL as well..
     */
    String locationHeader = theRequest.getServletRequest().getHeader(Constants.HEADER_CONTENT_LOCATION);
    IdDt id = new IdDt(locationHeader);
    if (isNotBlank(id.getResourceType())) {
      if (!getResourceName().equals(id.getResourceType())) {
        throw new InvalidRequestException("Attempting to update '" + getResourceName() + "' but content-location header specifies different resource type '" + id.getResourceType() + "' - header value: " + locationHeader);
      }
    }

    if (theRequest.getId() != null && theRequest.getId().hasVersionIdPart() == false) {
      if (id != null && id.hasVersionIdPart()) {
        theRequest.setId(id);
      }
    }
   
    if (isNotBlank(locationHeader)) {
View Full Code Here

    }
  }

  @Override
  protected BaseHttpClientInvocation createClientInvocation(Object[] theArgs, IResource theResource) {
    IdDt idDt = (IdDt) theArgs[myIdParameterIndex];
    if (idDt == null) {
      throw new NullPointerException("ID can not be null");
    }

    if (myVersionIdParameterIndex != null) {
      IdDt versionIdDt = (IdDt) theArgs[myVersionIdParameterIndex];
      if (idDt.hasVersionIdPart() == false) {
        idDt = idDt.withVersion(versionIdDt.getIdPart());
      }
    }
    FhirContext context = getContext();

    HttpPutClientInvocation retVal = MethodUtil.createUpdateInvocation(theResource, null,idDt, context);
View Full Code Here

    if (myQueryName != null) {
      queryStringArgs.put(Constants.PARAM_QUERY, Collections.singletonList(myQueryName));
    }

    IdDt id = (IdDt) (myIdParamIndex != null ? theArgs[myIdParamIndex] : null);

    String resourceName = getResourceName();
    BaseHttpClientInvocation retVal = createSearchInvocation(getContext(), resourceName, queryStringArgs, id, myCompartmentName, null);

    if (theArgs != null) {
View Full Code Here

     * An Internal id that is used to identify this mapping set when specific mappings are made
     * </p>
   */
  public IdDt getIdentity() { 
    if (myIdentity == null) {
      myIdentity = new IdDt();
    }
    return myIdentity;
  }
View Full Code Here

     * <b>Definition:</b>
     * An Internal id that is used to identify this mapping set when specific mappings are made
     * </p>
   */
  public Mapping setIdentity( String theId) {
    myIdentity = new IdDt(theId);
    return this;
  }
View Full Code Here

     * Designates which child element is used to discriminate between the slices when processing an instance. The value of the child element in the instance SHALL completely distinguish which slice the element in the resource matches based on the allowed values for that element in each of the slices
     * </p>
   */
  public IdDt getDiscriminator() { 
    if (myDiscriminator == null) {
      myDiscriminator = new IdDt();
    }
    return myDiscriminator;
  }
View Full Code Here

     * <b>Definition:</b>
     * Designates which child element is used to discriminate between the slices when processing an instance. The value of the child element in the instance SHALL completely distinguish which slice the element in the resource matches based on the allowed values for that element in each of the slices
     * </p>
   */
  public StructureElementSlicing setDiscriminator( String theId) {
    myDiscriminator = new IdDt(theId);
    return this;
  }
View Full Code Here

      theWriter.writeEnd();
      break;
    }
    case RESOURCE_REF: {
      ResourceReferenceDt referenceDt = (ResourceReferenceDt) theValue;
      IdDt value = referenceDt.getReference();
      if (theChildName != null) {
        theWriter.writeStartObject(theChildName);
      } else {
        theWriter.writeStartObject();
      }

      String reference = value.getValue();
      if (StringUtils.isBlank(reference)) {
        if (value.getResourceType() != null && StringUtils.isNotBlank(value.getIdPart())) {
          reference = myContext.getResourceDefinition(value.getResourceType()).getName() + '/' + value.getIdPart();
        }
      }

      if (StringUtils.isNotBlank(reference)) {
        theWriter.write(XmlParser.RESREF_REFERENCE, reference);
      }
      if (referenceDt.getDisplay().isEmpty() == false) {
        theWriter.write(XmlParser.RESREF_DISPLAY, referenceDt.getDisplay().getValueAsString());
      }
      theWriter.writeEnd();
      break;
    }
    case CONTAINED_RESOURCES: {
      theWriter.writeStartArray(theChildName);
      ContainedDt value = (ContainedDt) theValue;
      for (IResource next : value.getContainedResources()) {
        encodeResourceToJsonStreamWriter(theResDef, next, theWriter, null, true);
      }
      theWriter.writeEnd();
      break;
    }
View Full Code Here

TOP

Related Classes of ca.uhn.fhir.model.primitive.IdDt

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.