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

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

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

origin: jamesagnew/hapi-fhir

@Override
public void setValuesAsQueryTokens(FhirContext theContext, String theParamName, QualifiedParamList theParameters) {
  myList.clear();
  for (String next : theParameters) {
    PT nextParam = newInstance();
    nextParam.setValueAsQueryToken(theContext, theParamName, theParameters.getQualifier(), next);
    myList.add(nextParam);
  }
}
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 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

@Override
public void translateClientArgumentIntoQueryArgument(FhirContext theContext, Object theSourceClientArgument, Map<String, List<String>> theTargetQueryArguments, IBaseResource theTargetResource) throws InternalErrorException {
  if (theSourceClientArgument == null) {
    if (isRequired()) {
      throw new NullPointerException("SearchParameter '" + getName() + "' is required and may not be null");
    }
  } else {
    List<QualifiedParamList> value = encode(theContext, theSourceClientArgument);
    for (QualifiedParamList nextParamEntry : value) {
      StringBuilder b = new StringBuilder();
      for (String str : nextParamEntry) {
        if (b.length() > 0) {
          b.append(",");
        }
        b.append(str);
      }
      String qualifier = nextParamEntry.getQualifier();
      String paramName = isNotBlank(qualifier) ? getName() + qualifier : getName();
      List<String> paramValues = theTargetQueryArguments.get(paramName);
      if (paramValues == null) {
        paramValues = new ArrayList<>(value.size());
        theTargetQueryArguments.put(paramName, paramValues);
      }
      paramValues.add(b.toString());
    }
  }
}
origin: jamesagnew/hapi-fhir

if (isNotBlank(paramList.get(0).getQualifier()) && paramList.get(0).getQualifier().startsWith(".")) {
  throw new InvalidRequestException("Invalid parameter chain: " + nextParamName + paramList.get(0).getQualifier());
origin: jamesagnew/hapi-fhir

boolean recurse = Constants.PARAM_INCLUDE_QUALIFIER_RECURSE.equals(nextParamList.getQualifier());
origin: jamesagnew/hapi-fhir

boolean recurse = Constants.PARAM_INCLUDE_QUALIFIER_RECURSE.equals(nextParamList.getQualifier());
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) {
  myList.clear();
  for (String next : theParameters) {
    PT nextParam = newInstance();
    nextParam.setValueAsQueryToken(theContext, theParamName, theParameters.getQualifier(), next);
    myList.add(nextParam);
  }
}
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-client

@Override
public void translateClientArgumentIntoQueryArgument(FhirContext theContext, Object theSourceClientArgument, Map<String, List<String>> theTargetQueryArguments, IBaseResource theTargetResource) throws InternalErrorException {
  if (theSourceClientArgument == null) {
    if (isRequired()) {
      throw new NullPointerException("SearchParameter '" + getName() + "' is required and may not be null");
    }
  } else {
    List<QualifiedParamList> value = encode(theContext, theSourceClientArgument);
    for (QualifiedParamList nextParamEntry : value) {
      StringBuilder b = new StringBuilder();
      for (String str : nextParamEntry) {
        if (b.length() > 0) {
          b.append(",");
        }
        b.append(str);
      }
      String qualifier = nextParamEntry.getQualifier();
      String paramName = isNotBlank(qualifier) ? getName() + qualifier : getName();
      List<String> paramValues = theTargetQueryArguments.get(paramName);
      if (paramValues == null) {
        paramValues = new ArrayList<>(value.size());
        theTargetQueryArguments.put(paramName, paramValues);
      }
      paramValues.add(b.toString());
    }
  }
}
origin: ca.uhn.hapi.fhir/hapi-fhir-server

boolean recurse = Constants.PARAM_INCLUDE_QUALIFIER_RECURSE.equals(nextParamList.getQualifier());
origin: ca.uhn.hapi.fhir/hapi-fhir-client

boolean recurse = Constants.PARAM_INCLUDE_QUALIFIER_RECURSE.equals(nextParamList.getQualifier());
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;
    }
  }
}
ca.uhn.fhir.rest.apiQualifiedParamListgetQualifier

Popular methods of QualifiedParamList

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

Popular in Java

  • Creating JSON documents from java classes using gson
  • setRequestProperty (URLConnection)
  • getSystemService (Context)
  • getExternalFilesDir (Context)
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
  • MessageFormat (java.text)
    Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • Table (org.hibernate.mapping)
    A relational table
  • Top PhpStorm 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