Tabnine Logo
ResultSeverityEnum.getCode
Code IndexAdd Tabnine to your IDE (free)

How to use
getCode
method
in
ca.uhn.fhir.validation.ResultSeverityEnum

Best Java code snippets using ca.uhn.fhir.validation.ResultSeverityEnum.getCode (Showing top 6 results out of 315)

origin: jamesagnew/hapi-fhir

public static ResultSeverityEnum fromCode(String theCode) {
  if (ourValues == null) {
    HashMap<String, ResultSeverityEnum> values = new HashMap<String, ResultSeverityEnum>();
    for (ResultSeverityEnum next : values()) {
      values.put(next.getCode(), next);
    }
    ourValues = Collections.unmodifiableMap(values);
  }
  return ourValues.get(theCode);
}
origin: jamesagnew/hapi-fhir

@Override
public String toString() {
  ToStringBuilder b = new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE);
  if (myLocationCol != null || myLocationLine != null) {
    b.append("col", myLocationCol);
    b.append("row", myLocationLine);
  }
  if (myLocationString != null) {
    b.append("locationString", myLocationString);
  }
  b.append("message", myMessage);
  if (mySeverity != null) {
    b.append("severity", mySeverity.getCode());
  }
  return b.toString();
}
origin: jamesagnew/hapi-fhir

/**
 * Populate an operation outcome with the results of the validation 
 */
public void populateOperationOutcome(IBaseOperationOutcome theOperationOutcome) {
  for (SingleValidationMessage next : myMessages) {
    String location;
    if (isNotBlank(next.getLocationString())) {
      location = next.getLocationString();
    } else if (next.getLocationLine() != null || next.getLocationCol() != null) {
      location = "Line[" + next.getLocationLine() + "] Col[" + next.getLocationCol() + "]";
    } else {
      location = null;
    }
    String severity = next.getSeverity() != null ? next.getSeverity().getCode() : null;
    OperationOutcomeUtil.addIssue(myCtx, theOperationOutcome, severity, next.getMessage(), location, Constants.OO_INFOSTATUS_PROCESSING);
  }
  if (myMessages.isEmpty()) {
    String message = myCtx.getLocalizer().getMessage(ValidationResult.class, "noIssuesDetected");
    OperationOutcomeUtil.addIssue(myCtx, theOperationOutcome, "information", message, null, "informational");
  }
}
origin: ca.uhn.hapi.fhir/hapi-fhir-base

@Override
public String toString() {
  ToStringBuilder b = new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE);
  if (myLocationCol != null || myLocationLine != null) {
    b.append("col", myLocationCol);
    b.append("row", myLocationLine);
  }
  if (myLocationString != null) {
    b.append("locationString", myLocationString);
  }
  b.append("message", myMessage);
  if (mySeverity != null) {
    b.append("severity", mySeverity.getCode());
  }
  return b.toString();
}
origin: ca.uhn.hapi.fhir/hapi-fhir-base

public static ResultSeverityEnum fromCode(String theCode) {
  if (ourValues == null) {
    HashMap<String, ResultSeverityEnum> values = new HashMap<String, ResultSeverityEnum>();
    for (ResultSeverityEnum next : values()) {
      values.put(next.getCode(), next);
    }
    ourValues = Collections.unmodifiableMap(values);
  }
  return ourValues.get(theCode);
}
origin: ca.uhn.hapi.fhir/hapi-fhir-base

/**
 * Populate an operation outcome with the results of the validation 
 */
public void populateOperationOutcome(IBaseOperationOutcome theOperationOutcome) {
  for (SingleValidationMessage next : myMessages) {
    String location;
    if (isNotBlank(next.getLocationString())) {
      location = next.getLocationString();
    } else if (next.getLocationLine() != null || next.getLocationCol() != null) {
      location = "Line[" + next.getLocationLine() + "] Col[" + next.getLocationCol() + "]";
    } else {
      location = null;
    }
    String severity = next.getSeverity() != null ? next.getSeverity().getCode() : null;
    OperationOutcomeUtil.addIssue(myCtx, theOperationOutcome, severity, next.getMessage(), location, Constants.OO_INFOSTATUS_PROCESSING);
  }
  if (myMessages.isEmpty()) {
    String message = myCtx.getLocalizer().getMessage(ValidationResult.class, "noIssuesDetected");
    OperationOutcomeUtil.addIssue(myCtx, theOperationOutcome, "information", message, null, "informational");
  }
}
ca.uhn.fhir.validationResultSeverityEnumgetCode

Popular methods of ResultSeverityEnum

  • fromCode
  • name
  • ordinal
  • values
  • toString

Popular in Java

  • Reactive rest calls using spring rest template
  • notifyDataSetChanged (ArrayAdapter)
  • getSystemService (Context)
  • scheduleAtFixedRate (Timer)
  • PrintWriter (java.io)
    Wraps either an existing OutputStream or an existing Writerand provides convenience methods for prin
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • MessageFormat (java.text)
    Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
  • NoSuchElementException (java.util)
    Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
  • Join (org.hibernate.mapping)
  • From CI to AI: The AI layer in your organization
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