Codota Logo
IParser.setEncodeForceResourceId
Code IndexAdd Codota to your IDE (free)

How to use
setEncodeForceResourceId
method
in
ca.uhn.fhir.parser.IParser

Best Java code snippets using ca.uhn.fhir.parser.IParser.setEncodeForceResourceId (Showing top 3 results out of 315)

  • Common ways to obtain IParser
private void myMethod () {
IParser i =
  • Codota IconFhirContext fhirContext;fhirContext.newJsonParser()
  • Codota IconFhirContext fhirContext;fhirContext.newXmlParser()
  • Smart code suggestions by Codota
}
origin: jamesagnew/hapi-fhir

private String encodeContents(Boolean thePrettyPrint, EncodingEnum encoding) {
  IParser parser;
  if (encoding == EncodingEnum.JSON) {
    parser = getContext().newJsonParser();
  } else {
    parser = getContext().newXmlParser();
  }
  if (thePrettyPrint != null) {
    parser.setPrettyPrint(thePrettyPrint);
  }
  if (myForceResourceId != null) {
    parser.setEncodeForceResourceId(myForceResourceId);
  }
  
  parser.setOmitResourceId(myOmitResourceId);
  if (myResources != null) {
    IVersionSpecificBundleFactory bundleFactory = getContext().newBundleFactory();
    bundleFactory.initializeBundleFromResourceList("", myResources, "", "", myResources.size(), myBundleType);
    IBaseResource bundle = bundleFactory.getResourceBundle();
    if (bundle != null) {
      return parser.encodeResourceToString(bundle);
    }
    IBaseResource bundleRes = bundleFactory.getResourceBundle();
    return parser.encodeResourceToString(bundleRes);
  } else if (myContents != null) {
    return myContents;
  } else {
    return parser.encodeResourceToString(myResource);
  }
}
origin: org.apache.camel/camel-fhir

parser.setEncodeForceResourceId(getForceResourceId());
origin: ca.uhn.hapi.fhir/hapi-fhir-client

private String encodeContents(Boolean thePrettyPrint, EncodingEnum encoding) {
  IParser parser;
  if (encoding == EncodingEnum.JSON) {
    parser = getContext().newJsonParser();
  } else {
    parser = getContext().newXmlParser();
  }
  if (thePrettyPrint != null) {
    parser.setPrettyPrint(thePrettyPrint);
  }
  if (myForceResourceId != null) {
    parser.setEncodeForceResourceId(myForceResourceId);
  }
  
  parser.setOmitResourceId(myOmitResourceId);
  if (myResources != null) {
    IVersionSpecificBundleFactory bundleFactory = getContext().newBundleFactory();
    bundleFactory.initializeBundleFromResourceList("", myResources, "", "", myResources.size(), myBundleType);
    IBaseResource bundle = bundleFactory.getResourceBundle();
    if (bundle != null) {
      return parser.encodeResourceToString(bundle);
    }
    IBaseResource bundleRes = bundleFactory.getResourceBundle();
    return parser.encodeResourceToString(bundleRes);
  } else if (myContents != null) {
    return myContents;
  } else {
    return parser.encodeResourceToString(myResource);
  }
}
ca.uhn.fhir.parserIParsersetEncodeForceResourceId

Javadoc

When encoding, force this resource ID to be encoded as the resource ID

Popular methods of IParser

  • encodeResourceToString
  • parseResource
    Parses a resource
  • setPrettyPrint
    Sets the "pretty print" flag, meaning that the parser will encode resources with human-readable spac
  • setParserErrorHandler
    Registers an error handler which will be invoked when any parse errors are found
  • encodeResourceToWriter
  • setDontEncodeElements
    If provided, specifies the elements which should NOT be encoded. Valid values for this field would i
  • setPreferTypes
    If set, when parsing resources the parser will try to use the given types when possible, in the orde
  • setServerBaseUrl
    Sets the server's base URL used by this parser. If a value is set, resource references will be turne
  • getEncoding
    Which encoding does this parser instance produce?
  • setDontStripVersionsFromReferencesAtPaths
    If supplied value(s), any resource references at the specified paths will have their resource versio
  • setEncodeElements
    If provided, specifies the elements which should be encoded, to the exclusion of all others. Valid v
  • setEncodeElementsAppliesToChildResourcesOnly
    If set to true (default is false), the values supplied to #setEncodeElements(Set) will not be applie
  • setEncodeElements,
  • setEncodeElementsAppliesToChildResourcesOnly,
  • setEncodeElementsAppliesToResourceTypes,
  • setOmitResourceId,
  • setStripVersionsFromReferences,
  • setSummaryMode,
  • setOverrideResourceIdWithBundleEntryFullUrl,
  • setSuppressNarratives

Popular in Java

  • Start an intent from android
  • putExtra (Intent)
  • getSupportFragmentManager (FragmentActivity)
    Return the FragmentManager for interacting with fragments associated with this activity.
  • onRequestPermissionsResult (Fragment)
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
  • IsNull (org.hamcrest.core)
    Is the value null?
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now