Examples of FhirContext


Examples of ca.uhn.fhir.context.FhirContext

  private String myServerVersion = VersionUtil.getVersion(); // defaults to
                                // HAPI version
  private boolean myUseBrowserFriendlyContentTypes;

  public RestfulServer() {
    myFhirContext = new FhirContext();
    myServerConformanceProvider = new ServerConformanceProvider(this);
  }
View Full Code Here

Examples of ca.uhn.fhir.context.FhirContext

  /**
   * Constructor
   */
  public RestfulServer() {
    this(new FhirContext());
  }
View Full Code Here

Examples of ca.uhn.fhir.context.FhirContext

  @Override
  public BaseHttpClientInvocation invokeClient(Object[] theArgs) throws InternalErrorException {
    @SuppressWarnings("unchecked")
    List<IResource> resources = (List<IResource>) theArgs[myTransactionParamIndex];
    FhirContext context = getContext();
   
    return createTransactionInvocation(resources, context);
  }
View Full Code Here

Examples of ca.uhn.fhir.context.FhirContext

    }
  }

  @Override
  protected BaseHttpClientInvocation createClientInvocation(Object[] theArgs, IResource theResource) {
    FhirContext context = getContext();
   
    IdDt idDt=null;
    if (myIdParameterIndex != null) {
      idDt = (IdDt) theArgs[myIdParameterIndex];
    }
View Full Code Here

Examples of ca.uhn.fhir.context.FhirContext

    IdDt versionIdDt = null;
    if (myVersionIdParameterIndex != null) {
      versionIdDt = (IdDt) theArgs[myVersionIdParameterIndex];
    }
    FhirContext context = getContext();

    HttpPutClientInvocation retVal = createUpdateInvocation(theResource, idDt, versionIdDt, context);

    for (int idx = 0; idx < theArgs.length; idx++) {
      IParameter nextParam = getParameters().get(idx);
View Full Code Here

Examples of ca.uhn.fhir.context.FhirContext

    return Collections.singleton(RequestType.POST);
  }

  @Override
  protected BaseHttpClientInvocation createClientInvocation(Object[] theArgs, IResource theResource) {
    FhirContext context = getContext();

    BaseHttpClientInvocation retVal = createCreateInvocation(theResource, context);
   
    if (theArgs != null) {
      for (int idx = 0; idx < theArgs.length; idx++) {
View Full Code Here

Examples of ca.uhn.fhir.context.FhirContext

    String resourceUrl = resourceId.getValue();
   
    ourLog.debug("Loading resource at URL: {}", resourceUrl);

    HttpClient httpClient = theClient.getHttpClient();
    FhirContext context = theClient.getFhirContext();

    if (!resourceUrl.startsWith("http")) {
      resourceUrl = theClient.getServerBase() + resourceUrl;
    }
   
    HttpGet get = new HttpGet(resourceUrl);
    HttpResponse response = httpClient.execute(get);
    try {
      // TODO: choose appropriate parser based on response CT
      IParser parser = context.newXmlParser();

      Reader responseReader = BaseClient.createReaderFromResponse(response);
      myResource = parser.parseResource(responseReader);

    } finally {
View Full Code Here

Examples of ca.uhn.fhir.context.FhirContext

      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);

    for (int idx = 0; idx < theArgs.length; idx++) {
      IParameter nextParam = getParameters().get(idx);
View Full Code Here

Examples of ca.uhn.fhir.context.FhirContext

  /**
   * Constructor
   */
  public RestfulServer() {
    this(new FhirContext());
  }
View Full Code Here

Examples of ca.uhn.fhir.context.FhirContext

    return null;
  }

  @Override
  public BaseHttpClientInvocation invokeClient(Object[] theArgs) throws InternalErrorException {
    FhirContext context = getContext();
    if (theArgs[myTransactionParamIndex] instanceof Bundle) {
      Bundle bundle = (Bundle) theArgs[myTransactionParamIndex];
      return createTransactionInvocation(bundle, context);
    } else {
      @SuppressWarnings("unchecked")
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.