Tabnine Logo
BaseResourceReferenceDt
Code IndexAdd Tabnine to your IDE (free)

How to use
BaseResourceReferenceDt
in
ca.uhn.fhir.model.base.composite

Best Java code snippets using ca.uhn.fhir.model.base.composite.BaseResourceReferenceDt (Showing top 18 results out of 315)

origin: jamesagnew/hapi-fhir

@Override
public String toString() {
  org.apache.commons.lang3.builder.ToStringBuilder b = new org.apache.commons.lang3.builder.ToStringBuilder(this, org.apache.commons.lang3.builder.ToStringStyle.SHORT_PREFIX_STYLE);
  b.append("reference", getReference().getValueAsString());
  b.append("loaded", getResource() != null);
  return b.toString();
}
origin: jamesagnew/hapi-fhir

@Override
public boolean isEmpty() {
  return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myReference,  myDisplay);
}

origin: jamesagnew/hapi-fhir

public BaseResourceReferenceDt setReference(IIdType theReference) {
  if (theReference instanceof IdDt) {
    setReference((IdDt) theReference);
  } else if (theReference != null) {
    setReference(new IdDt(theReference.getValue()));
  } else {
    setReference((IdDt) null);
  }
  return this;
}
origin: jamesagnew/hapi-fhir

List<BaseResourceReferenceDt> refs = myContext.newTerser().getAllPopulatedChildElementsOfType(theResource, BaseResourceReferenceDt.class);
for (BaseResourceReferenceDt nextRef : refs) {
  if (nextRef.getReference().isEmpty() == false) {
    if (nextRef.getReference().hasVersionIdPart()) {
      nextRef.setReference(nextRef.getReference().toUnqualifiedVersionless());
origin: jamesagnew/hapi-fhir

IResource nextRes = (IResource) nextRef.getResource();
if (nextRes != null) {
  if (nextRes.getId().hasIdPart()) {
origin: jamesagnew/hapi-fhir

/**
 * Returns the referenced resource, fetching it <b>if it has not already been loaded</b>. This method invokes the
 * HTTP client to retrieve the resource unless it has already been loaded, or was a contained resource in which case
 * it is simply returned.
 */
public IBaseResource loadResource(IRestfulClient theClient) {
  if (myResource != null) {
    return myResource;
  }
  IdDt resourceId = getReference();
  if (resourceId == null || isBlank(resourceId.getValue())) {
    throw new IllegalStateException("Reference has no resource ID defined");
  }
  if (isBlank(resourceId.getBaseUrl()) || isBlank(resourceId.getResourceType())) {
    throw new IllegalStateException("Reference is not complete (must be in the form [baseUrl]/[resource type]/[resource ID]) - Reference is: " + resourceId.getValue());
  }
  String resourceUrl = resourceId.getValue();
  ourLog.debug("Loading resource at URL: {}", resourceUrl);
  RuntimeResourceDefinition definition = theClient.getFhirContext().getResourceDefinition(resourceId.getResourceType());
  Class<? extends IBaseResource> resourceType = definition.getImplementingClass();
  myResource = theClient.fetchResourceFromUrl(resourceType, resourceUrl);
  myResource.setId(resourceUrl);
  return myResource;
}
origin: jamesagnew/hapi-fhir

IdDt nextId = nextRef.getReference();
if (!nextId.hasIdPart()) {
  continue;
  IdDt newId = theIdSubstitutions.get(nextId);
  ourLog.debug(" * Replacing resource ref {} with {}", nextId, newId);
  nextRef.setReference(newId);
} else {
  ourLog.debug(" * Reference [{}] does not exist in bundle", nextId);
origin: ca.uhn.hapi.fhir/hapi-fhir-structures-dstu

IBaseResource nextRefRes = nextRef.getResource();
if (nextRefRes != null) {
  if (nextRefRes.getIdElement().hasIdPart()) {
origin: ca.uhn.hapi.fhir/hapi-fhir-base

/**
 * Returns the referenced resource, fetching it <b>if it has not already been loaded</b>. This method invokes the
 * HTTP client to retrieve the resource unless it has already been loaded, or was a contained resource in which case
 * it is simply returned.
 */
public IBaseResource loadResource(IRestfulClient theClient) {
  if (myResource != null) {
    return myResource;
  }
  IdDt resourceId = getReference();
  if (resourceId == null || isBlank(resourceId.getValue())) {
    throw new IllegalStateException("Reference has no resource ID defined");
  }
  if (isBlank(resourceId.getBaseUrl()) || isBlank(resourceId.getResourceType())) {
    throw new IllegalStateException("Reference is not complete (must be in the form [baseUrl]/[resource type]/[resource ID]) - Reference is: " + resourceId.getValue());
  }
  String resourceUrl = resourceId.getValue();
  ourLog.debug("Loading resource at URL: {}", resourceUrl);
  RuntimeResourceDefinition definition = theClient.getFhirContext().getResourceDefinition(resourceId.getResourceType());
  Class<? extends IBaseResource> resourceType = definition.getImplementingClass();
  myResource = theClient.fetchResourceFromUrl(resourceType, resourceUrl);
  myResource.setId(resourceUrl);
  return myResource;
}
origin: ca.uhn.hapi.fhir/hapi-fhir-base

@Override
public String toString() {
  org.apache.commons.lang3.builder.ToStringBuilder b = new org.apache.commons.lang3.builder.ToStringBuilder(this, org.apache.commons.lang3.builder.ToStringStyle.SHORT_PREFIX_STYLE);
  b.append("reference", getReference().getValueAsString());
  b.append("loaded", getResource() != null);
  return b.toString();
}
origin: ca.uhn.hapi.fhir/hapi-fhir-jpaserver-base

List<BaseResourceReferenceDt> refs = myContext.newTerser().getAllPopulatedChildElementsOfType(theResource, BaseResourceReferenceDt.class);
for (BaseResourceReferenceDt nextRef : refs) {
  if (nextRef.getReference().isEmpty() == false) {
    if (nextRef.getReference().hasVersionIdPart()) {
      nextRef.setReference(nextRef.getReference().toUnqualifiedVersionless());
origin: ca.uhn.hapi.fhir/hapi-fhir-structures-dstu2

IResource nextRes = (IResource) nextRef.getResource();
if (nextRes != null) {
  if (nextRes.getId().hasIdPart()) {
origin: ca.uhn.hapi.fhir/hapi-fhir-structures-dstu2

@Override
public boolean isEmpty() {
  return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myReference,  myDisplay);
}

origin: jamesagnew/hapi-fhir

/**
 * Constructor
 * 
 * @param theResource
 *           The loaded resource itself
 */
public BaseResourceReferenceDt(IResource theResource) {
  myResource = theResource;
  setReference(theResource.getId());
}
origin: ca.uhn.hapi.fhir/hapi-fhir-jpaserver-base

IdDt nextId = nextRef.getReference();
if (!nextId.hasIdPart()) {
  continue;
  IdDt newId = theIdSubstitutions.get(nextId);
  ourLog.debug(" * Replacing resource ref {} with {}", nextId, newId);
  nextRef.setReference(newId);
} else {
  ourLog.debug(" * Reference [{}] does not exist in bundle", nextId);
origin: ca.uhn.hapi.fhir/hapi-fhir-structures-dstu

@Override
public boolean isEmpty() {
  return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myReference,  myDisplay);
}

origin: ca.uhn.hapi.fhir/hapi-fhir-base

public BaseResourceReferenceDt setReference(IIdType theReference) {
  if (theReference instanceof IdDt) {
    setReference((IdDt) theReference);
  } else if (theReference != null) {
    setReference(new IdDt(theReference.getValue()));
  } else {
    setReference((IdDt) null);
  }
  return this;
}
origin: ca.uhn.hapi.fhir/hapi-fhir-base

/**
 * Constructor
 * 
 * @param theResource
 *           The loaded resource itself
 */
public BaseResourceReferenceDt(IResource theResource) {
  myResource = theResource;
  setReference(theResource.getId());
}
ca.uhn.fhir.model.base.compositeBaseResourceReferenceDt

Most used methods

  • getResource
    Gets the actual loaded and parsed resource instance, if it is already present. This method will retu
  • isBaseEmpty
  • getReference
  • setReference

Popular in Java

  • Parsing JSON documents to java classes using gson
  • scheduleAtFixedRate (Timer)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • startActivity (Activity)
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now