Tabnine Logo
CollectionHelper.isNotNullOrEmpty
Code IndexAdd Tabnine to your IDE (free)

How to use
isNotNullOrEmpty
method
in
org.n52.sos.util.CollectionHelper

Best Java code snippets using org.n52.sos.util.CollectionHelper.isNotNullOrEmpty (Showing top 20 results out of 315)

origin: org.n52.sensorweb.sos/coding-wml-v20

private void parseComment(ObservationProcessType opt, ObservationProcess observationProcess) {
  if (CollectionHelper.isNotNullOrEmpty(opt.getCommentArray())) {
    observationProcess.setComments(Lists.newArrayList(opt.getCommentArray()));
  }
}
origin: org.n52.sensorweb.sos/coding-ows-v110

private void clearAbstracts(ServiceIdentification serviceIdent) {
  if (CollectionHelper.isNotNullOrEmpty(serviceIdent.getAbstractArray())) {
    for (int i = 0; i < serviceIdent.getAbstractArray().length; i++) {
      serviceIdent.removeAbstract(i);
    }
  }
}
origin: org.n52.sensorweb.sos/coding-wml-v20

private void parseInput(ObservationProcessType opt, ObservationProcess observationProcess) {
  if (CollectionHelper.isNotNullOrEmpty(opt.getInputArray())) {
    parseReferenceType(opt.getInputArray());
  }
}
origin: org.n52.sensorweb.sos/coding-ows-v110

private void clearTitles(ServiceIdentification serviceIdent) {
  if (CollectionHelper.isNotNullOrEmpty(serviceIdent.getTitleArray())) {
    for (int i = 0; i < serviceIdent.getTitleArray().length; i++) {
      serviceIdent.removeTitle(i);
    }
  }
}
origin: org.n52.sensorweb.sos/coding-sensorML-v20

private List<SmlIo<?>> parseInputs(Inputs inputs) throws OwsExceptionReport {
  if (CollectionHelper.isNotNullOrEmpty(inputs.getInputList().getInputArray())) {
    final List<SmlIo<?>> sosInputs = new ArrayList<SmlIo<?>>(inputs.getInputList().getInputArray().length);
    for (final Input xbInput : inputs.getInputList().getInputArray()) {
      sosInputs.add(parseInput(xbInput));
    }
    return sosInputs;
  }
  return Collections.emptyList();
}
origin: org.n52.sensorweb.sos/coding-sensorML-v20

private List<SmlIo<?>> parseOutputs(Outputs outputs) throws OwsExceptionReport {
  if (CollectionHelper.isNotNullOrEmpty(outputs.getOutputList().getOutputArray())) {
    final List<SmlIo<?>> sosOutputs = new ArrayList<SmlIo<?>>(outputs.getOutputList().getOutputArray().length);
    for (final Output xbOutput : outputs.getOutputList().getOutputArray()) {
      sosOutputs.add(parseOutput(xbOutput));
    }
    return sosOutputs;
  }
  return Collections.emptyList();
}
origin: org.n52.sensorweb.sos/coding-sensorML-v20

private void decodePhone(CITelephoneType citt, SmlResponsibleParty responsibleParty) {
  if (CollectionHelper.isNotNullOrEmpty(citt.getVoiceArray())) {
    responsibleParty.setPhoneVoice(characterStringPropertyTypeArrayToList(citt.getVoiceArray()));
  }
  if (CollectionHelper.isNotNullOrEmpty(citt.getFacsimileArray())) {
    responsibleParty.setPhoneFax(characterStringPropertyTypeArrayToList(citt.getFacsimileArray()));
  }
}
origin: org.n52.sensorweb.sos/coding-sensorML-v20

private void parseAbstractPhysicalProcess(AbstractPhysicalProcessType appt,
    AbstractPhysicalProcess abstractPhysicalProcess) throws OwsExceptionReport {
  if (appt.isSetAttachedTo()) {
    Object decodeXmlElement = CodingHelper.decodeXmlElement(appt.getAttachedTo());
    if (decodeXmlElement != null && decodeXmlElement instanceof ReferenceType) {
      abstractPhysicalProcess.setAttachedTo((ReferenceType) decodeXmlElement);
    }
  }
  if (CollectionHelper.isNotNullOrEmpty(appt.getLocalReferenceFrameArray())) {
  }
  if (CollectionHelper.isNotNullOrEmpty(appt.getLocalTimeFrameArray())) {
  }
  if (CollectionHelper.isNotNullOrEmpty(appt.getPositionArray())) {
    for (PositionUnionPropertyType pupt : appt.getPositionArray()) {
      abstractPhysicalProcess.setPosition(parsePositionFrom(pupt));
      // TODO remove break if AbstractPhysicalProcess is extended
      break;
    }
  }
  if (CollectionHelper.isNotNullOrEmpty(appt.getTimePositionArray())) {
  }
}
origin: org.n52.sensorweb.sos/coding-sensorML-v101

@SuppressWarnings({ "unchecked", "rawtypes" })
private SweAllowedValues parseAllowedValues(AllowedValues avt) {
  SweAllowedValues allowedValues = new SweAllowedValues();
  if (avt.isSetId()) {
    allowedValues.setGmlId(avt.getId());
  }
  if (CollectionHelper.isNotNullOrEmpty(avt.getValueListArray())) {
    for (List list : avt.getValueListArray()) {
      if (CollectionHelper.isNotEmpty(list)) {
        for (Object value : list) {
          allowedValues.addValue(Double.parseDouble(value.toString()));
        }
      }
    }
  }
  if (CollectionHelper.isNotNullOrEmpty(avt.getIntervalArray())) {
    for (List interval : avt.getIntervalArray()) {
      RangeValue<Double> rangeValue = new RangeValue<Double>();
      Iterator<Double> iterator = interval.iterator();
      if (iterator.hasNext()) {
        rangeValue.setRangeStart(iterator.next());
      }
      if (iterator.hasNext()) {
        rangeValue.setRangeEnd(iterator.next());
      }
      allowedValues.addInterval(rangeValue);
    }
  }
  return allowedValues;
}
origin: org.n52.sensorweb.sos/coding-wml-v20

private void parseParameter(ObservationProcessType opt, ObservationProcess observationProcess)
    throws OwsExceptionReport {
  if (CollectionHelper.isNotNullOrEmpty(opt.getParameterArray())) {
    observationProcess.setParameters(parseNamedValueTypeArray(opt.getParameterArray()));
  }
  checkForOffering(observationProcess);
}
origin: org.n52.sensorweb.sos/coding-sensorML-v101

@SuppressWarnings({ "unchecked", "rawtypes" })
private SweAllowedTimes parseAllowedTimes(AllowedTimes att) throws DateTimeParseException {
  SweAllowedTimes allowedTimes = new SweAllowedTimes();
  if (att.isSetId()) {
    allowedTimes.setGmlId(att.getId());
  }
  if (CollectionHelper.isNotNullOrEmpty(att.getValueListArray())) {
    for (List list : att.getValueListArray()) {
      if (CollectionHelper.isNotEmpty(list)) {
        for (Object value : list) {
          allowedTimes.addValue(DateTimeHelper.parseIsoString2DateTime(value.toString()));
        }
      }
    }
  }
  if (CollectionHelper.isNotNullOrEmpty(att.getIntervalArray())) {
    for (List interval : att.getIntervalArray()) {
      RangeValue<DateTime> rangeValue = new RangeValue<DateTime>();
      Iterator iterator = interval.iterator();
      if (iterator.hasNext()) {
        rangeValue.setRangeStart(DateTimeHelper.parseIsoString2DateTime(iterator.next().toString()));
      }
      if (iterator.hasNext()) {
        rangeValue.setRangeEnd(DateTimeHelper.parseIsoString2DateTime(iterator.next().toString()));
      }
      allowedTimes.addInterval(rangeValue);
    }
  }
  return allowedTimes;
}
origin: org.n52.sensorweb.sos/coding-sensorML-v20

/**
 * Parses the classification
 * 
 * @param classificationArray
 *            XML classification
 * @return SOS classification
 */
private List<SmlClassifier> parseClassification(final ClassifierListPropertyType[] clpts) {
  final List<SmlClassifier> sosClassifiers = new ArrayList<SmlClassifier>(clpts.length);
  for (final ClassifierListPropertyType clpt : clpts) {
    if (clpt.isSetClassifierList()) {
      ClassifierListType clt = clpt.getClassifierList();
      if (CollectionHelper.isNotNullOrEmpty(clt.getClassifierArray()))
      for (final Classifier c : clt.getClassifierArray()) {
        if (c.getTerm() != null) {
          final SmlClassifier smlClassifier = new SmlClassifier();
          parseTerm(c.getTerm(), smlClassifier);
          sosClassifiers.add(smlClassifier);
        }
      }
    }
  }
  return sosClassifiers;
}

origin: org.n52.sensorweb.sos/coding-sensorML-v20

private List<SmlContact> parseContact(final ContactListPropertyType[] clpts) throws OwsExceptionReport {
  List<SmlContact> smlContacts = Lists.newArrayList();
  for (ContactListPropertyType clpt : clpts) {
    if (clpt.isSetContactList()
        && CollectionHelper.isNotNullOrEmpty(clpt.getContactList().getContactArray())) {
      for (CIResponsiblePartyPropertyType c : clpt.getContactList().getContactArray()) {
        final Object o = CodingHelper.decodeXmlElement(c);
        if (o instanceof SmlContact) {
          smlContacts.add((SmlContact) o);
        } else {
          throw new InvalidParameterValueException().at(XmlHelper.getLocalName(c))
              .withMessage("Error while parsing the contacts of " + "the SensorML!");
        }
      }
    }
  }
  return smlContacts;
}
origin: org.n52.sensorweb.sos/coding-sensorML-v20

private void parseFeatureOfInterest(FeaturesOfInterest featuresOfInterest, AbstractProcessV20 abstractProcess)
    throws OwsExceptionReport {
  if (CollectionHelper.isNotNullOrEmpty(featuresOfInterest.getFeatureList().getFeatureArray())) {
    SmlFeatureOfInterest smlFeatureOfInterest = new SmlFeatureOfInterest();
    for (FeaturePropertyType fpt : featuresOfInterest.getFeatureList().getFeatureArray()) {
      Object o = CodingHelper.decodeXmlElement(fpt);
      if (o instanceof AbstractFeature) {
        smlFeatureOfInterest.addFeatureOfInterest((AbstractFeature) o);
      }
    }
    abstractProcess.setSmlFeatureOfInterest(smlFeatureOfInterest);
  }
}
origin: org.n52.sensorweb.sos/coding-sensorML-v101

@SuppressWarnings({ "unchecked", "rawtypes" })
private SweAllowedTokens parseAllowedTokens(AllowedTokens att) {
  SweAllowedTokens allowedTokens = new SweAllowedTokens();
  if (att.isSetId()) {
    allowedTokens.setGmlId(att.getId());
  }
  if (CollectionHelper.isNotNullOrEmpty(att.getValueListArray())) {
    for (List list : att.getValueListArray()) {
      if (CollectionHelper.isNotEmpty(list)) {
        allowedTokens.setValue(list);
      }
    }
  }
  return allowedTokens;
}
origin: org.n52.sensorweb.sos/ifoi-coding

private InsertFeatureOfInterestRequest parseInsertFeatureOfInterest(InsertFeatureOfInterestDocument ifoid)
    throws OwsExceptionReport {
  InsertFeatureOfInterestRequest request = null;
  InsertFeatureOfInterestType ifoit = ifoid.getInsertFeatureOfInterest();
  if (ifoit != null) {
    request = new InsertFeatureOfInterestRequest();
    request.setVersion(ifoit.getVersion());
    request.setService(ifoit.getService());
    if (CollectionHelper.isNotNullOrEmpty(ifoit.getFeatureMemberArray())) {
      parseFeatureMember(ifoit, request);
    }
  } else {
    throw new NoApplicableCodeException()
        .withMessage("Received XML document is not valid. Set log level to debug to get more details");
  }
  return request;
}
origin: org.n52.sensorweb.sos/coding-sensorML-v20

private void parseIdentifications(DescribedObject describedObject,
    IdentifierListPropertyType[] identificationArray) {
  for (final IdentifierListPropertyType ilpt : identificationArray) {
    if (ilpt.isSetIdentifierList()
        && CollectionHelper.isNotNullOrEmpty(ilpt.getIdentifierList().getIdentifier2Array())) {
      for (final Identifier i : ilpt.getIdentifierList().getIdentifier2Array()) {
        if (i.getTerm() != null) {
          final SmlIdentifier identifier = new SmlIdentifier();
          parseTerm(i.getTerm(), identifier);
          describedObject.addIdentifier(identifier);
          if (isIdentificationProcedureIdentifier(identifier)) {
            describedObject.setIdentifier(identifier.getValue());
          }
        }
      }
    }
  }
}
origin: org.n52.sensorweb.sos/coding-sensorML-v20

if (clpt.isSetCharacteristicList()) {
  CharacteristicListType clt = clpt.getCharacteristicList();
  if (CollectionHelper.isNotNullOrEmpty(clt.getCharacteristicArray())) {
    for (Characteristic c : clt.getCharacteristicArray()) {
      final SmlCharacteristic characteristic = new SmlCharacteristic(c.getName());
origin: org.n52.sensorweb.sos/coding-sensorML-v20

private void parseAbstractProcess(AbstractProcessType apt, AbstractProcessV20 abstractProcess)
    throws OwsExceptionReport {
  if (apt.isSetTypeOf()) {
    Object decodedElement = CodingHelper.decodeXmlElement(apt.getTypeOf());
    if (decodedElement instanceof ReferenceType) {
      abstractProcess.setTypeOf((ReferenceType)decodedElement);
    }
  }
  if (apt.isSetConfiguration()) {
  }
  if (apt.isSetFeaturesOfInterest()) {
    parseFeatureOfInterest(apt.getFeaturesOfInterest(), abstractProcess);
  }
  if (apt.isSetInputs()) {
    abstractProcess.setInputs(parseInputs(apt.getInputs()));
  }
  if (apt.isSetOutputs()) {
    abstractProcess.setOutputs(parseOutputs(apt.getOutputs()));
  }
  if (CollectionHelper.isNotNullOrEmpty(apt.getModesArray())) {
  }
}
origin: org.n52.sensorweb.sos/coding-sensorML-v20

if (cs.isSetCapabilityList()) {
  CapabilityListType cl = cs.getCapabilityList();
  if (CollectionHelper.isNotNullOrEmpty(cl.getCapabilityArray())) {
    for (Capability c : cl.getCapabilityArray()) {
      final SmlCapability capability = new SmlCapability(c.getName());
org.n52.sos.utilCollectionHelperisNotNullOrEmpty

Popular methods of CollectionHelper

  • isNotEmpty
  • isEmpty
  • isNullOrEmpty
  • union
  • conjunctCollections
  • map
  • synchronizedList
  • synchronizedMap

Popular in Java

  • Finding current android device location
  • addToBackStack (FragmentTransaction)
  • getExternalFilesDir (Context)
  • setRequestProperty (URLConnection)
  • Pointer (com.sun.jna)
    An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a na
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • String (java.lang)
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • Best IntelliJ 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