Examples of FhirContext


Examples of ca.uhn.fhir.context.FhirContext

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

Examples of ca.uhn.fhir.context.FhirContext

    myStaticResources.put("shBrushXml.js", "text/javascript");
    myStaticResources.put("shBrushPlain.js", "text/javascript");
    myStaticResources.put("shCore.css", "text/css");
    myStaticResources.put("shThemeDefault.css", "text/css");

    myCtx = new FhirContext();
  }
View Full Code Here

Examples of ca.uhn.fhir.context.FhirContext

    return Collections.singleton(RequestType.POST);
  }

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

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

Examples of ca.uhn.fhir.context.FhirContext

    }
  }

  @Override
  protected BaseClientInvocation 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();

    PutClientInvocation 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

    }

    ourLog.debug("Loading resource at URL: {}", getResourceUrl());

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

    String resourceUrl = getResourceUrl();
    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

  private BaseMethodBinding myServerConformanceMethod;
  private String myServerName = "HAPI FHIR Server";
  private String myServerVersion = VersionUtil.getVersion();

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

Examples of ca.uhn.fhir.context.FhirContext

    }

    ourLog.debug("Loading resource at URL: {}", getResourceUrl());

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

    String resourceUrl = getResourceUrl();
    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 = ClientInvocationHandler.createReaderFromResponse(response);
      myResource = parser.parseResource(responseReader);

    } finally {
View Full Code Here

Examples of ca.uhn.fhir.context.FhirContext

  private FhirContext myPrivateContext;
  private FhirContext myPublicContext;

  private ClientCache(FhirContext theContext) {
    myPublicContext = theContext;
    myPrivateContext = new FhirContext(CacheEntry.class);
  }
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
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.