Tabnine Logo
Bundle.getLink
Code IndexAdd Tabnine to your IDE (free)

How to use
getLink
method
in
org.hl7.fhir.dstu3.model.Bundle

Best Java code snippets using org.hl7.fhir.dstu3.model.Bundle.getLink (Showing top 11 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
List l =
  • Codota Iconnew ArrayList()
  • Codota Iconnew LinkedList()
  • Smart code suggestions by Tabnine
}
origin: jamesagnew/hapi-fhir

private static void copy(FhirContext theCtx, IGenericClient theSource, IGenericClient theTarget, String theResType, List<IBaseResource> theQueued, Set<String> theSent) {
  Bundle received = theSource
    .search()
    .forResource(theResType)
    .returnBundle(Bundle.class)
    .execute();
  copy(theCtx, theTarget, theResType, theQueued, theSent, received);
  while (received.getLink("next") != null) {
    ourLog.info("Fetching next page...");
    received = theSource.loadPage().next(received).execute();
    copy(theCtx, theTarget, theResType, theQueued, theSent, received);
  }
}
origin: ca.uhn.hapi.fhir/hapi-fhir-structures-dstu3

/**
 * @return The first repetition of repeating field {@link #link}, creating it if it does not already exist
 */
public BundleLinkComponent getLinkFirstRep() { 
 if (getLink().isEmpty()) {
  addLink();
 }
 return getLink().get(0);
}
origin: jamesagnew/hapi-fhir

public static org.hl7.fhir.dstu2016may.model.Bundle convertBundle(org.hl7.fhir.dstu3.model.Bundle src) throws FHIRException {
 if (src == null || src.isEmpty())
  return null;
 org.hl7.fhir.dstu2016may.model.Bundle tgt = new org.hl7.fhir.dstu2016may.model.Bundle();
 copyResource(src, tgt);
 tgt.setType(convertBundleType(src.getType()));
 if (src.hasTotal())
  tgt.setTotal(src.getTotal());
 for (org.hl7.fhir.dstu3.model.Bundle.BundleLinkComponent t : src.getLink())
  tgt.addLink(convertBundleLinkComponent(t));
 for (org.hl7.fhir.dstu3.model.Bundle.BundleEntryComponent t : src.getEntry())
  tgt.addEntry(convertBundleEntryComponent(t));
 tgt.setSignature(convertSignature(src.getSignature()));
 return tgt;
}
origin: ca.uhn.hapi.fhir/hapi-fhir-structures-dstu3

private boolean hasLink(String theLinkType, Bundle theBundle) {
 for (BundleLinkComponent next : theBundle.getLink()) {
  if (theLinkType.equals(next.getRelation())) {
   return true;
  }
 }
 return false;
}
origin: jamesagnew/hapi-fhir

public org.hl7.fhir.instance.model.Bundle convertBundle(org.hl7.fhir.dstu3.model.Bundle src) throws FHIRException {
 if (src == null || src.isEmpty())
  return null;
 org.hl7.fhir.instance.model.Bundle tgt = new org.hl7.fhir.instance.model.Bundle();
 copyResource(src, tgt);
 tgt.setType(convertBundleType(src.getType()));
 if (src.hasTotal())
  tgt.setTotal(src.getTotal());
 for (org.hl7.fhir.dstu3.model.Bundle.BundleLinkComponent t : src.getLink())
  tgt.addLink(convertBundleLinkComponent(t));
 for (org.hl7.fhir.dstu3.model.Bundle.BundleEntryComponent t : src.getEntry())
  tgt.addEntry(convertBundleEntryComponent(t));
 if (src.hasSignature())
  tgt.setSignature(convertSignature(src.getSignature()));
 return tgt;
}
origin: ca.uhn.hapi.fhir/hapi-fhir-structures-dstu3

/**
 * Returns the {@link #getLink() link} which matches a given {@link BundleLinkComponent#getRelation() relation}. 
 * If no link is found which matches the given relation, returns <code>null</code>. If more than one
 * link is found which matches the given relation, returns the first matching BundleLinkComponent.
 * 
 * @param theRelation
 *            The relation, such as "next", or "self. See the constants such as {@link IBaseBundle#LINK_SELF} and {@link IBaseBundle#LINK_NEXT}.
 * @return Returns a matching BundleLinkComponent, or <code>null</code>
 * @see IBaseBundle#LINK_NEXT
 * @see IBaseBundle#LINK_PREV
 * @see IBaseBundle#LINK_SELF
 */
public BundleLinkComponent getLink(String theRelation) {
 org.apache.commons.lang3.Validate.notBlank(theRelation, "theRelation may not be null or empty");
 for (BundleLinkComponent next : getLink()) {
  if (theRelation.equals(next.getRelation())) {
   return next;
  }
 }
 return null;
}
origin: ca.uhn.hapi.fhir/hapi-fhir-structures-dstu3

/**
 * Returns the {@link #getLink() link} which matches a given {@link BundleLinkComponent#getRelation() relation}. 
 * If no link is found which matches the given relation, creates a new BundleLinkComponent with the
 * given relation and adds it to this Bundle. If more than one
 * link is found which matches the given relation, returns the first matching BundleLinkComponent.
 * 
 * @param theRelation
 *            The relation, such as "next", or "self. See the constants such as {@link IBaseBundle#LINK_SELF} and {@link IBaseBundle#LINK_NEXT}.
 * @return Returns a matching BundleLinkComponent, or <code>null</code>
 * @see IBaseBundle#LINK_NEXT
 * @see IBaseBundle#LINK_PREV
 * @see IBaseBundle#LINK_SELF
 */
public BundleLinkComponent getLinkOrCreate(String theRelation) {
 org.apache.commons.lang3.Validate.notBlank(theRelation, "theRelation may not be null or empty");
 for (BundleLinkComponent next : getLink()) {
  if (theRelation.equals(next.getRelation())) {
   return next;
  }
 }
 BundleLinkComponent retVal = new BundleLinkComponent();
 retVal.setRelation(theRelation);
 getLink().add(retVal);
 return retVal;
}
  protected void listChildren(List<Property> children) {
origin: ca.uhn.hapi.fhir/hapi-fhir-structures-dstu3

@Override
public Base setProperty(String name, Base value) throws FHIRException {
 if (name.equals("identifier")) {
  this.identifier = castToIdentifier(value); // Identifier
 } else if (name.equals("type")) {
  value = new BundleTypeEnumFactory().fromType(castToCode(value));
  this.type = (Enumeration) value; // Enumeration<BundleType>
 } else if (name.equals("total")) {
  this.total = castToUnsignedInt(value); // UnsignedIntType
 } else if (name.equals("link")) {
  this.getLink().add((BundleLinkComponent) value);
 } else if (name.equals("entry")) {
  this.getEntry().add((BundleEntryComponent) value);
 } else if (name.equals("signature")) {
  this.signature = castToSignature(value); // Signature
 } else
  return super.setProperty(name, value);
 return value;
}
origin: ca.uhn.hapi.fhir/hapi-fhir-structures-dstu3

@Override
public Base setProperty(int hash, String name, Base value) throws FHIRException {
 switch (hash) {
 case -1618432855: // identifier
  this.identifier = castToIdentifier(value); // Identifier
  return value;
 case 3575610: // type
  value = new BundleTypeEnumFactory().fromType(castToCode(value));
  this.type = (Enumeration) value; // Enumeration<BundleType>
  return value;
 case 110549828: // total
  this.total = castToUnsignedInt(value); // UnsignedIntType
  return value;
 case 3321850: // link
  this.getLink().add((BundleLinkComponent) value); // BundleLinkComponent
  return value;
 case 96667762: // entry
  this.getEntry().add((BundleEntryComponent) value); // BundleEntryComponent
  return value;
 case 1073584312: // signature
  this.signature = castToSignature(value); // Signature
  return value;
 default: return super.setProperty(hash, name, value);
 }
}
origin: ca.uhn.hapi.fhir/hapi-fhir-converter

public static org.hl7.fhir.dstu2016may.model.Bundle convertBundle(org.hl7.fhir.dstu3.model.Bundle src) throws FHIRException {
 if (src == null || src.isEmpty())
  return null;
 org.hl7.fhir.dstu2016may.model.Bundle tgt = new org.hl7.fhir.dstu2016may.model.Bundle();
 copyResource(src, tgt);
 tgt.setType(convertBundleType(src.getType()));
 if (src.hasTotal())
  tgt.setTotal(src.getTotal());
 for (org.hl7.fhir.dstu3.model.Bundle.BundleLinkComponent t : src.getLink())
  tgt.addLink(convertBundleLinkComponent(t));
 for (org.hl7.fhir.dstu3.model.Bundle.BundleEntryComponent t : src.getEntry())
  tgt.addEntry(convertBundleEntryComponent(t));
 tgt.setSignature(convertSignature(src.getSignature()));
 return tgt;
}
origin: ca.uhn.hapi.fhir/hapi-fhir-converter

public org.hl7.fhir.instance.model.Bundle convertBundle(org.hl7.fhir.dstu3.model.Bundle src) throws FHIRException {
 if (src == null || src.isEmpty())
  return null;
 org.hl7.fhir.instance.model.Bundle tgt = new org.hl7.fhir.instance.model.Bundle();
 copyResource(src, tgt);
 tgt.setType(convertBundleType(src.getType()));
 if (src.hasTotal())
  tgt.setTotal(src.getTotal());
 for (org.hl7.fhir.dstu3.model.Bundle.BundleLinkComponent t : src.getLink())
  tgt.addLink(convertBundleLinkComponent(t));
 for (org.hl7.fhir.dstu3.model.Bundle.BundleEntryComponent t : src.getEntry())
  tgt.addEntry(convertBundleEntryComponent(t));
 if (src.hasSignature())
  tgt.setSignature(convertSignature(src.getSignature()));
 return tgt;
}
org.hl7.fhir.dstu3.modelBundlegetLink

Popular methods of Bundle

  • getEntry
  • <init>
    Constructor
  • addEntry
  • getMeta
  • getType
  • setType
  • getTotal
  • setId
  • addLink
  • getEntryFirstRep
  • getResourceType
  • getSignature
  • getResourceType,
  • getSignature,
  • getTypeElement,
  • hasEntry,
  • setTotal,
  • castToCode,
  • castToIdentifier,
  • castToSignature,
  • castToUnsignedInt

Popular in Java

  • Reactive rest calls using spring rest template
  • scheduleAtFixedRate (Timer)
  • startActivity (Activity)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • InputStreamReader (java.io)
    A class for turning a byte stream into a character stream. Data read from the source input stream is
  • Socket (java.net)
    Provides a client-side TCP socket.
  • Callable (java.util.concurrent)
    A task that returns a result and may throw an exception. Implementors define a single method with no
  • JFrame (javax.swing)
  • 14 Best Plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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