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

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

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

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

  @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 IQueryParameterOr<?> parse(FhirContext theContext, String theParamName, List<QualifiedParamList> theString) throws InternalErrorException, InvalidRequestException {
    IQueryParameterOr<?> dt;
    try {
      dt = newInstance();
      if (theString.size() == 0 || theString.get(0).size() == 0) {
        return dt;
      }
      if (theString.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.setValuesAsQueryTokens(theContext, theParamName, theString.get(0));
    } catch (SecurityException e) {
      throw new InternalErrorException(e);
    }
    return dt;
  }
}
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

    int idx = retVal.size() - 1;
    String existing = retVal.get(idx);
    prev = existing.substring(0, existing.length() - 1) + ',';
int idx = retVal.size() - 1;
String existing = retVal.get(idx);
prev = existing + str;
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: jamesagnew/hapi-fhir

  continue;
if (nextParamList.size() > 1) {
  throw new InvalidRequestException(theContext.getLocalizer().getMessage(IncludeParameter.class, "orIncludeInRequest"));
origin: jamesagnew/hapi-fhir

  continue;
if (nextParamList.size() > 1) {
  throw new InvalidRequestException(theContext.getLocalizer().getMessage(IncludeParameter.class, "orIncludeInRequest"));
origin: jamesagnew/hapi-fhir

if (paramList.size() > 0 && paramList.get(0).size() > 0) {
  String intString = paramList.get(0).get(0);
  try {
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: 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-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 IQueryParameterOr<?> parse(FhirContext theContext, String theParamName, List<QualifiedParamList> theString) throws InternalErrorException, InvalidRequestException {
    IQueryParameterOr<?> dt;
    try {
      dt = newInstance();
      if (theString.size() == 0 || theString.get(0).size() == 0) {
        return dt;
      }
      if (theString.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.setValuesAsQueryTokens(theContext, theParamName, theString.get(0));
    } catch (SecurityException e) {
      throw new InternalErrorException(e);
    }
    return dt;
  }
}
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

    int idx = retVal.size() - 1;
    String existing = retVal.get(idx);
    prev = existing.substring(0, existing.length() - 1) + ',';
int idx = retVal.size() - 1;
String existing = retVal.get(idx);
prev = existing + str;
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-server

  continue;
if (nextParamList.size() > 1) {
  throw new InvalidRequestException(theContext.getLocalizer().getMessage(IncludeParameter.class, "orIncludeInRequest"));
origin: ca.uhn.hapi.fhir/hapi-fhir-client

  continue;
if (nextParamList.size() > 1) {
  throw new InvalidRequestException(theContext.getLocalizer().getMessage(IncludeParameter.class, "orIncludeInRequest"));
ca.uhn.fhir.rest.apiQualifiedParamListsize

Popular methods of QualifiedParamList

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

Popular in Java

  • Creating JSON documents from java classes using gson
  • runOnUiThread (Activity)
  • putExtra (Intent)
  • getContentResolver (Context)
  • VirtualMachine (com.sun.tools.attach)
    A Java virtual machine. A VirtualMachine represents a Java virtual machine to which this Java vir
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • Socket (java.net)
    Provides a client-side TCP socket.
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • TimerTask (java.util)
    The TimerTask class represents a task to run at a specified time. The task may be run once or repeat
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • Top Sublime Text 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