Tabnine Logo
QualifiedParamList.get
Code IndexAdd Tabnine to your IDE (free)

How to use
get
method
in
ca.uhn.fhir.rest.api.QualifiedParamList

Best Java code snippets using ca.uhn.fhir.rest.api.QualifiedParamList.get (Showing top 17 results out of 315)

origin: jamesagnew/hapi-fhir

  @Override
  public void setValuesAsQueryTokens(FhirContext theContext, String theParamName,
      QualifiedParamList theParameters) {
    if (theParameters.isEmpty()) {
      return;
    }
    if (theParameters.size() > 1) {
      throw new IllegalArgumentException(
          "Type " + theParam.getClass().getCanonicalName() + " does not support multiple values");
    }
    theParam.setValueAsQueryToken(theContext, theParamName, theParameters.getQualifier(),
        theParameters.get(0));
  }
};
origin: jamesagnew/hapi-fhir

@Override
public T parse(FhirContext theContext, String theName, List<QualifiedParamList> theParams) throws InternalErrorException, InvalidRequestException {
  if (theParams.size() == 0 || theParams.get(0).size() == 0) {
    return null;
  }
  if (theParams.size() > 1 || theParams.get(0).size() > 1) {
    throw new InvalidRequestException("Multiple values detected for non-repeatable parameter '" + theName + "'. This server is not configured to allow multiple (AND) values for this param.");
  }

  T value = doParse(theParams.get(0).get(0));
  return value;
}
origin: jamesagnew/hapi-fhir

@Override
public IQueryParameterType parse(FhirContext theContext, String theParamName, List<QualifiedParamList> theParams) throws InternalErrorException, InvalidRequestException {
  String value = theParams.get(0).get(0);
  if (StringUtils.isBlank(value)) {
    return null;
  }
  
  IQueryParameterType dt = super.newInstance();
  if (theParams.size() == 0 || theParams.get(0).size() == 0) {
    return dt;
  }
  if (theParams.size() > 1 || theParams.get(0).size() > 1) {
    throw new InvalidRequestException("Multiple values detected for non-repeatable parameter '" + theParamName + "'. This server is not configured to allow multiple (AND/OR) values for this param.");
  }
  dt.setValueAsQueryToken(theContext, theParamName, theParams.get(0).getQualifier(), value);
  return dt;
}
origin: jamesagnew/hapi-fhir

  if (countTrailingSlashes(prev) % 2 == 1) {
    int idx = retVal.size() - 1;
    String existing = retVal.get(idx);
    prev = existing.substring(0, existing.length() - 1) + ',';
    retVal.set(idx, prev);
String existing = retVal.get(idx);
prev = existing + str;
retVal.set(idx, prev);
origin: jamesagnew/hapi-fhir

String value = nextParamList.get(0);
if (myAllow != null && !myAllow.isEmpty()) {
  if (!myAllow.contains(value)) {
origin: jamesagnew/hapi-fhir

@Override
public void  setValuesAsQueryTokens(FhirContext theContext, String theParamName, QualifiedParamList theParameters) {
  setMissing(null);
  setPrefix(null);
  setValueAsString(null);
  
  if (theParameters.size() == 1) {
    setValueAsString(theParameters.get(0));
  } else if (theParameters.size() > 1) {
    throw new InvalidRequestException("This server does not support multi-valued dates for this parameter: " + theParameters);
  }
  
}
origin: jamesagnew/hapi-fhir

String value = nextParamList.get(0);
if (myAllow != null && !myAllow.isEmpty()) {
  if (!myAllow.contains(value)) {
origin: ca.uhn.hapi.fhir/hapi-fhir-base

@Override
public T parse(FhirContext theContext, String theName, List<QualifiedParamList> theParams) throws InternalErrorException, InvalidRequestException {
  if (theParams.size() == 0 || theParams.get(0).size() == 0) {
    return null;
  }
  if (theParams.size() > 1 || theParams.get(0).size() > 1) {
    throw new InvalidRequestException("Multiple values detected for non-repeatable parameter '" + theName + "'. This server is not configured to allow multiple (AND) values for this param.");
  }

  T value = doParse(theParams.get(0).get(0));
  return value;
}
origin: jamesagnew/hapi-fhir

String intString = paramList.get(0).get(0);
try {
  paramMap.setCount(Integer.parseInt(intString));
origin: ca.uhn.hapi.fhir/hapi-fhir-base

  if (countTrailingSlashes(prev) % 2 == 1) {
    int idx = retVal.size() - 1;
    String existing = retVal.get(idx);
    prev = existing.substring(0, existing.length() - 1) + ',';
    retVal.set(idx, prev);
String existing = retVal.get(idx);
prev = existing + str;
retVal.set(idx, prev);
origin: jamesagnew/hapi-fhir

@Override
public void setValuesAsQueryTokens(FhirContext theContext, String theParamName, List<QualifiedParamList> theParameters)
  throws InvalidRequestException {
  boolean haveHadUnqualifiedParameter = false;
  for (QualifiedParamList paramList : theParameters) {
    if (paramList.size() == 0) {
      continue;
    }
    if (paramList.size() > 1) {
      throw new InvalidRequestException("DateRange parameter does not suppport OR queries");
    }
    String param = paramList.get(0);
    /*
     * Since ' ' is escaped as '+' we'll be nice to anyone might have accidentally not
     * escaped theirs
     */
    param = param.replace(' ', '+');
    DateParam parsed = new DateParam();
    parsed.setValueAsQueryToken(theContext, theParamName, paramList.getQualifier(), param);
    addParam(parsed);
    if (parsed.getPrefix() == null) {
      if (haveHadUnqualifiedParameter) {
        throw new InvalidRequestException("Multiple date parameters with the same name and no qualifier (>, <, etc.) is not supported");
      }
      haveHadUnqualifiedParameter = true;
    }
  }
}
origin: ca.uhn.hapi.fhir/hapi-fhir-base

@Override
public void  setValuesAsQueryTokens(FhirContext theContext, String theParamName, QualifiedParamList theParameters) {
  setMissing(null);
  setPrefix(null);
  setValueAsString(null);
  
  if (theParameters.size() == 1) {
    setValueAsString(theParameters.get(0));
  } else if (theParameters.size() > 1) {
    throw new InvalidRequestException("This server does not support multi-valued dates for this parameter: " + theParameters);
  }
  
}
origin: ca.uhn.hapi.fhir/hapi-fhir-base

  @Override
  public void setValuesAsQueryTokens(FhirContext theContext, String theParamName,
      QualifiedParamList theParameters) {
    if (theParameters.isEmpty()) {
      return;
    }
    if (theParameters.size() > 1) {
      throw new IllegalArgumentException(
          "Type " + theParam.getClass().getCanonicalName() + " does not support multiple values");
    }
    theParam.setValueAsQueryToken(theContext, theParamName, theParameters.getQualifier(),
        theParameters.get(0));
  }
};
origin: ca.uhn.hapi.fhir/hapi-fhir-base

@Override
public IQueryParameterType parse(FhirContext theContext, String theParamName, List<QualifiedParamList> theParams) throws InternalErrorException, InvalidRequestException {
  String value = theParams.get(0).get(0);
  if (StringUtils.isBlank(value)) {
    return null;
  }
  
  IQueryParameterType dt = super.newInstance();
  if (theParams.size() == 0 || theParams.get(0).size() == 0) {
    return dt;
  }
  if (theParams.size() > 1 || theParams.get(0).size() > 1) {
    throw new InvalidRequestException("Multiple values detected for non-repeatable parameter '" + theParamName + "'. This server is not configured to allow multiple (AND/OR) values for this param.");
  }
  dt.setValueAsQueryToken(theContext, theParamName, theParams.get(0).getQualifier(), value);
  return dt;
}
origin: ca.uhn.hapi.fhir/hapi-fhir-server

String value = nextParamList.get(0);
if (myAllow != null && !myAllow.isEmpty()) {
  if (!myAllow.contains(value)) {
origin: ca.uhn.hapi.fhir/hapi-fhir-base

@Override
public void setValuesAsQueryTokens(FhirContext theContext, String theParamName, List<QualifiedParamList> theParameters)
  throws InvalidRequestException {
  boolean haveHadUnqualifiedParameter = false;
  for (QualifiedParamList paramList : theParameters) {
    if (paramList.size() == 0) {
      continue;
    }
    if (paramList.size() > 1) {
      throw new InvalidRequestException("DateRange parameter does not suppport OR queries");
    }
    String param = paramList.get(0);
    /*
     * Since ' ' is escaped as '+' we'll be nice to anyone might have accidentally not
     * escaped theirs
     */
    param = param.replace(' ', '+');
    DateParam parsed = new DateParam();
    parsed.setValueAsQueryToken(theContext, theParamName, paramList.getQualifier(), param);
    addParam(parsed);
    if (parsed.getPrefix() == null) {
      if (haveHadUnqualifiedParameter) {
        throw new InvalidRequestException("Multiple date parameters with the same name and no qualifier (>, <, etc.) is not supported");
      }
      haveHadUnqualifiedParameter = true;
    }
  }
}
origin: ca.uhn.hapi.fhir/hapi-fhir-client

String value = nextParamList.get(0);
if (myAllow != null && !myAllow.isEmpty()) {
  if (!myAllow.contains(value)) {
ca.uhn.fhir.rest.apiQualifiedParamListget

Popular methods of QualifiedParamList

  • getQualifier
  • size
  • splitQueryStringByCommasIgnoreEscape
  • <init>
  • isEmpty
  • singleton
  • add
  • countTrailingSlashes
  • set
  • setQualifier

Popular in Java

  • Running tasks concurrently on multiple threads
  • getSystemService (Context)
  • onRequestPermissionsResult (Fragment)
  • onCreateOptionsMenu (Activity)
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • PriorityQueue (java.util)
    A PriorityQueue holds elements on a priority heap, which orders the elements according to their natu
  • SortedSet (java.util)
    SortedSet is a Set which iterates over its elements in a sorted order. The order is determined eithe
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • BoxLayout (javax.swing)
  • IsNull (org.hamcrest.core)
    Is the value null?
  • CodeWhisperer alternatives
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