Search in sources :

Example 1 with FormatDAO

use of org.n52.sos.ds.hibernate.dao.FormatDAO in project SOS by 52North.

the class FeatureOfInterestDAO method getOrInsert.

/**
 * Insert and/or get featureOfInterest object for identifier
 *
 * @param identifier
 *            FeatureOfInterest identifier
 * @param url
 *            FeatureOfInterest URL, if defined as link
 * @param session
 *            Hibernate session
 * @return FeatureOfInterest object
 */
public AbstractFeatureEntity getOrInsert(String identifier, String url, Session session) {
    AbstractFeatureEntity feature = get(identifier, session);
    if (feature == null) {
        feature = new FeatureEntity();
        feature.setIdentifier(identifier, getDaoFactory().isStaSupportsUrls());
        if (url != null && !url.isEmpty()) {
            feature.setUrl(url);
        }
        FormatEntity type = new FormatDAO().getOrInsertFormatEntity(OGCConstants.UNKNOWN, session);
        feature.setFeatureType(type);
        session.save(feature);
    } else if (feature.getUrl() != null && !feature.getUrl().isEmpty() && url != null && !url.isEmpty()) {
        feature.setUrl(url);
        session.saveOrUpdate(feature);
    }
    // don't flush here because we may be batching
    return feature;
}
Also used : AbstractFeatureEntity(org.n52.series.db.beans.AbstractFeatureEntity) FeatureEntity(org.n52.series.db.beans.FeatureEntity) FormatEntity(org.n52.series.db.beans.FormatEntity) AbstractFeatureEntity(org.n52.series.db.beans.AbstractFeatureEntity)

Example 2 with FormatDAO

use of org.n52.sos.ds.hibernate.dao.FormatDAO in project SOS by 52North.

the class InsertResultHandler method insertObservationConstellationForProfiles.

private DatasetEntity insertObservationConstellationForProfiles(AbstractSeriesDAO obsConstDao, FormatDAO obsTypeDao, OmObservation o, Session session) throws OwsExceptionReport {
    ProcedureEntity procedure = getDaoFactory().getProcedureDAO().getProcedureForIdentifier(o.getObservationConstellation().getProcedureIdentifier(), session);
    PhenomenonEntity observableProperty = getDaoFactory().getObservablePropertyDAO().getOrInsertObservableProperty(o.getObservationConstellation().getObservableProperty(), session);
    OfferingEntity offering = getDaoFactory().getOfferingDAO().getOfferingForIdentifier(o.getObservationConstellation().getOfferings().iterator().next(), session);
    CategoryEntity category = getDaoFactory().getCategoryDAO().getOrInsertCategory(observableProperty, session);
    DatasetEntity oc = obsConstDao.checkOrInsertSeries(procedure, observableProperty, offering, category, false, session);
    if (o.getObservationConstellation().isSetObservationType()) {
        oc.setOmObservationType(obsTypeDao.getFormatEntityObject(o.getObservationConstellation().getObservationType(), session));
    }
    return oc;
}
Also used : ProcedureEntity(org.n52.series.db.beans.ProcedureEntity) DatasetEntity(org.n52.series.db.beans.DatasetEntity) PhenomenonEntity(org.n52.series.db.beans.PhenomenonEntity) OfferingEntity(org.n52.series.db.beans.OfferingEntity) CategoryEntity(org.n52.series.db.beans.CategoryEntity)

Example 3 with FormatDAO

use of org.n52.sos.ds.hibernate.dao.FormatDAO in project SOS by 52North.

the class AbstractSeriesDAO method updateSeries.

private void updateSeries(DatasetEntity dataset, String observationType, Session session) {
    FormatEntity obsType = new FormatDAO().getFormatEntityObject(observationType, session);
    dataset.setOmObservationType(obsType);
    session.saveOrUpdate(dataset);
    // update hidden child observation constellations
    // TODO should hidden child observation constellations be restricted to
    // the parent observation type?
    Set<String> offerings = dataset.getOffering().getChildren().stream().map(o -> o.getIdentifier()).collect(Collectors.toSet());
    if (CollectionHelper.isNotEmpty(offerings)) {
        Criteria c = session.createCriteria(getSeriesClass()).setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY).add(Restrictions.eq(DatasetEntity.PROPERTY_PHENOMENON, dataset.getObservableProperty())).add(Restrictions.eq(DatasetEntity.PROPERTY_PROCEDURE, dataset.getProcedure())).add(Restrictions.eq(DatasetEntity.HIDDEN_CHILD, true));
        c.createCriteria(DatasetEntity.PROPERTY_OFFERING).add(Restrictions.in(OfferingEntity.IDENTIFIER, offerings));
        LOGGER.trace("QUERY updateSeries(observationConstellation, observationType): {}", HibernateHelper.getSqlString(c));
        List<DatasetEntity> hiddenChildObsConsts = c.list();
        for (DatasetEntity hiddenChildObsConst : hiddenChildObsConsts) {
            hiddenChildObsConst.setOmObservationType(obsType);
            session.saveOrUpdate(hiddenChildObsConst);
        }
    }
}
Also used : InvalidParameterValueException(org.n52.shetland.ogc.ows.exception.InvalidParameterValueException) GetObservationByIdRequest(org.n52.shetland.ogc.sos.request.GetObservationByIdRequest) AbstractFeatureEntity(org.n52.series.db.beans.AbstractFeatureEntity) CodedException(org.n52.shetland.ogc.ows.exception.CodedException) LoggerFactory(org.slf4j.LoggerFactory) DescribableEntity(org.n52.series.db.beans.DescribableEntity) Filter(org.n52.shetland.ogc.filter.Filter) ObservationFactory(org.n52.sos.ds.hibernate.dao.observation.ObservationFactory) Query(org.hibernate.query.Query) ResultFilterRestrictions(org.n52.sos.ds.hibernate.util.ResultFilterRestrictions) DataEntity(org.n52.series.db.beans.DataEntity) Collection(java.util.Collection) SubQueryIdentifier(org.n52.sos.ds.hibernate.util.ResultFilterRestrictions.SubQueryIdentifier) Set(java.util.Set) UUID(java.util.UUID) SpatialFilter(org.n52.shetland.ogc.filter.SpatialFilter) Collectors(java.util.stream.Collectors) GetObservationRequest(org.n52.shetland.ogc.sos.request.GetObservationRequest) FormatEntity(org.n52.series.db.beans.FormatEntity) DatasetType(org.n52.series.db.beans.dataset.DatasetType) List(java.util.List) CollectionHelper(org.n52.shetland.util.CollectionHelper) FetchMode(org.hibernate.FetchMode) HibernateHelper(org.n52.sos.ds.hibernate.util.HibernateHelper) Geometry(org.locationtech.jts.geom.Geometry) PlatformEntity(org.n52.series.db.beans.PlatformEntity) FormatDAO(org.n52.sos.ds.hibernate.dao.FormatDAO) Criteria(org.hibernate.Criteria) ProjectionList(org.hibernate.criterion.ProjectionList) DatastreamEntity(org.n52.series.db.beans.sta.DatastreamEntity) Restrictions(org.hibernate.criterion.Restrictions) OmObservationConstellation(org.n52.shetland.ogc.om.OmObservationConstellation) Session(org.hibernate.Session) DatasetEntity(org.n52.series.db.beans.DatasetEntity) HashSet(java.util.HashSet) OfferingEntity(org.n52.series.db.beans.OfferingEntity) GetResultRequest(org.n52.shetland.ogc.sos.request.GetResultRequest) DateTimeHelper(org.n52.shetland.util.DateTimeHelper) Strings(com.google.common.base.Strings) GetDataAvailabilityRequest(org.n52.shetland.ogc.sos.gda.GetDataAvailabilityRequest) ProcedureEntity(org.n52.series.db.beans.ProcedureEntity) LinkedHashSet(java.util.LinkedHashSet) Criterion(org.hibernate.criterion.Criterion) Sos2Constants(org.n52.shetland.ogc.sos.Sos2Constants) Logger(org.slf4j.Logger) CategoryEntity(org.n52.series.db.beans.CategoryEntity) AbstractIdentifierNameDescriptionDAO(org.n52.sos.ds.hibernate.dao.AbstractIdentifierNameDescriptionDAO) ObservationContext(org.n52.sos.ds.hibernate.dao.observation.ObservationContext) Projections(org.hibernate.criterion.Projections) OwsExceptionReport(org.n52.shetland.ogc.ows.exception.OwsExceptionReport) SpatialRestrictions(org.n52.sos.ds.hibernate.util.SpatialRestrictions) AbstractPhenomenon(org.n52.shetland.ogc.om.AbstractPhenomenon) DaoFactory(org.n52.sos.ds.hibernate.dao.DaoFactory) ComparisonFilter(org.n52.shetland.ogc.filter.ComparisonFilter) DetachedCriteria(org.hibernate.criterion.DetachedCriteria) PhenomenonEntity(org.n52.series.db.beans.PhenomenonEntity) ResultFilterClasses(org.n52.sos.ds.hibernate.util.ResultFilterClasses) TimeExtrema(org.n52.sos.ds.hibernate.util.TimeExtrema) QuantityDataEntity(org.n52.series.db.beans.QuantityDataEntity) ValueType(org.n52.series.db.beans.dataset.ValueType) NoApplicableCodeException(org.n52.shetland.ogc.ows.exception.NoApplicableCodeException) Subqueries(org.hibernate.criterion.Subqueries) FormatEntity(org.n52.series.db.beans.FormatEntity) FormatDAO(org.n52.sos.ds.hibernate.dao.FormatDAO) DatasetEntity(org.n52.series.db.beans.DatasetEntity) Criteria(org.hibernate.Criteria) DetachedCriteria(org.hibernate.criterion.DetachedCriteria)

Example 4 with FormatDAO

use of org.n52.sos.ds.hibernate.dao.FormatDAO in project SOS by 52North.

the class InsertSensorHandler method insertSensor.

@Override
public synchronized InsertSensorResponse insertSensor(final InsertSensorRequest request) throws OwsExceptionReport {
    final InsertSensorResponse response = new InsertSensorResponse();
    response.setService(request.getService());
    response.setVersion(request.getVersion());
    final String assignedProcedureID = request.getAssignedProcedureIdentifier();
    // we use only the first offering for the response because swes 2.0
    // specifies only one single element
    final SosOffering firstAssignedOffering = request.getFirstAssignedOffering();
    Session session = null;
    Transaction transaction = null;
    try {
        session = getHibernateSessionHolder().getSession();
        transaction = session.beginTransaction();
        FormatDAO formatDAO = new FormatDAO();
        final FormatEntity procedureDescriptionFormat = formatDAO.getOrInsertFormatEntity(request.getProcedureDescriptionFormat(), session);
        if (procedureDescriptionFormat != null) {
            final ProcedureEntity hProcedure = new ProcedureDAO(getDaoFactory()).getOrInsertProcedure(assignedProcedureID, procedureDescriptionFormat, request.getProcedureDescription(), request.isType(), session);
            // TODO: set correct validTime,
            new ProcedureHistoryDAO(getDaoFactory()).insert(hProcedure, procedureDescriptionFormat, getSensorDescriptionFromProcedureDescription(request.getProcedureDescription()), new DateTime(DateTimeZone.UTC), session);
            if (!request.isType()) {
                final List<FormatEntity> observationTypes = formatDAO.getOrInsertFormatEntitys(request.getMetadata().getObservationTypes(), session);
                final List<FormatEntity> featureOfInterestTypes = formatDAO.getOrInsertFormatEntitys(request.getMetadata().getFeatureOfInterestTypes(), session);
                if (observationTypes != null && featureOfInterestTypes != null) {
                    final List<PhenomenonEntity> hObservableProperties = getOrInsertNewObservableProperties(request.getObservableProperty(), request.getProcedureDescription(), session);
                    Map<String, UnitEntity> hUnits = getOrInsertNewUnits(hObservableProperties, request.getProcedureDescription(), session);
                    final AbstractSeriesDAO seriesDAO = getDaoFactory().getSeriesDAO();
                    final OfferingDAO offeringDAO = getDaoFactory().getOfferingDAO();
                    Set<String> allParentOfferings = getAllParentOfferings(hProcedure);
                    Set<String> parentOfferings = getParentOfferings(hProcedure);
                    for (final SosOffering assignedOffering : request.getAssignedOfferings()) {
                        final List<RelatedFeatureEntity> hRelatedFeatures = new LinkedList<RelatedFeatureEntity>();
                        if (request.getRelatedFeatures() != null && !request.getRelatedFeatures().isEmpty()) {
                            final RelatedFeatureDAO relatedFeatureDAO = getDaoFactory().getRelatedFeatureDAO();
                            for (final SwesFeatureRelationship relatedFeature : request.getRelatedFeatures()) {
                                hRelatedFeatures.addAll(relatedFeatureDAO.getOrInsertRelatedFeature(relatedFeature.getFeature(), relatedFeature.getRole(), session));
                            }
                        }
                        final OfferingEntity hOffering = offeringDAO.getAndUpdateOrInsert(new SosOffering(assignedOffering.getIdentifier(), assignedOffering.getOfferingName()), hRelatedFeatures, observationTypes, featureOfInterestTypes, session);
                        // is a child/component
                        if (!parentOfferings.isEmpty() && !allParentOfferings.isEmpty() && hProcedure.hasParents() && !allParentOfferings.contains(assignedOffering.getIdentifier()) && !parentOfferings.contains(assignedOffering.getIdentifier())) {
                            offeringDAO.updateParentOfferings(parentOfferings, hOffering, session);
                        }
                        for (final PhenomenonEntity hObservableProperty : hObservableProperties) {
                            CategoryEntity hCategory = getCategory(hObservableProperty, request, session);
                            ObservationContext ctx = new ObservationContext().setCategory(hCategory).setOffering(hOffering).setPhenomenon(hObservableProperty).setProcedure(hProcedure).setPublish(false).setHiddenChild(!assignedOffering.isParentOffering());
                            checkForMobileInsituFlags(ctx, request.getProcedureDescription().getProcedureDescription());
                            if (hUnits.containsKey(hObservableProperty.getIdentifier())) {
                                ctx.setUnit(hUnits.get(hObservableProperty.getIdentifier()));
                            }
                            if (request.getProcedureDescription().isSetFeaturesOfInterestMap()) {
                                boolean inserted = false;
                                for (AbstractFeature feature : request.getProcedureDescription().getFeaturesOfInterestMap().values()) {
                                    if (feature instanceof FeatureWithGeometry && ((FeatureWithGeometry) feature).isSetGeometry()) {
                                        ctx.setFeatureOfInterest(getDaoFactory().getFeatureOfInterestDAO().checkOrInsert(feature, session));
                                        inserted = true;
                                        seriesDAO.getOrInsert(ctx, session);
                                    }
                                }
                                if (!inserted) {
                                    seriesDAO.getOrInsert(ctx, session);
                                }
                            } else {
                                seriesDAO.getOrInsert(ctx, session);
                            }
                            if (checkPreconditionsOfStaticReferenceValues(request)) {
                                addStaticReferenceValues(request, session, procedureDescriptionFormat, hProcedure, observationTypes, featureOfInterestTypes, hRelatedFeatures, hOffering, hObservableProperty, seriesDAO);
                            }
                        }
                    }
                // TODO: parent and child procedures
                } else {
                    throw new NoApplicableCodeException().withMessage("Error while inserting InsertSensor into database!");
                }
            }
            response.setAssignedProcedure(assignedProcedureID);
            response.setAssignedOffering(firstAssignedOffering.getIdentifier());
        } else {
            throw new InvalidParameterValueException(Sos2Constants.InsertSensorParams.procedureDescriptionFormat, request.getProcedureDescriptionFormat());
        }
        session.flush();
        transaction.commit();
    } catch (final HibernateException he) {
        if (transaction != null) {
            transaction.rollback();
        }
        throw new NoApplicableCodeException().causedBy(he).withMessage("Error while inserting sensor data into database!");
    } finally {
        getHibernateSessionHolder().returnSession(session);
    }
    return response;
}
Also used : NoApplicableCodeException(org.n52.shetland.ogc.ows.exception.NoApplicableCodeException) PhenomenonEntity(org.n52.series.db.beans.PhenomenonEntity) InsertSensorResponse(org.n52.shetland.ogc.sos.response.InsertSensorResponse) DateTime(org.joda.time.DateTime) ProcedureEntity(org.n52.series.db.beans.ProcedureEntity) ProcedureDAO(org.n52.sos.ds.hibernate.dao.ProcedureDAO) InvalidParameterValueException(org.n52.shetland.ogc.ows.exception.InvalidParameterValueException) FormatDAO(org.n52.sos.ds.hibernate.dao.FormatDAO) RelatedFeatureDAO(org.n52.sos.ds.hibernate.dao.RelatedFeatureDAO) SosOffering(org.n52.shetland.ogc.sos.SosOffering) UnitEntity(org.n52.series.db.beans.UnitEntity) AbstractSeriesDAO(org.n52.sos.ds.hibernate.dao.observation.series.AbstractSeriesDAO) CategoryEntity(org.n52.series.db.beans.CategoryEntity) HibernateException(org.hibernate.HibernateException) FormatEntity(org.n52.series.db.beans.FormatEntity) AbstractFeature(org.n52.shetland.ogc.gml.AbstractFeature) SwesFeatureRelationship(org.n52.shetland.ogc.swes.SwesFeatureRelationship) OfferingDAO(org.n52.sos.ds.hibernate.dao.OfferingDAO) LinkedList(java.util.LinkedList) RelatedFeatureEntity(org.n52.series.db.beans.RelatedFeatureEntity) Transaction(org.hibernate.Transaction) FeatureWithGeometry(org.n52.shetland.ogc.gml.FeatureWith.FeatureWithGeometry) ObservationContext(org.n52.sos.ds.hibernate.dao.observation.ObservationContext) ProcedureHistoryDAO(org.n52.sos.ds.hibernate.dao.ProcedureHistoryDAO) OfferingEntity(org.n52.series.db.beans.OfferingEntity) Session(org.hibernate.Session)

Example 5 with FormatDAO

use of org.n52.sos.ds.hibernate.dao.FormatDAO in project SOS by 52North.

the class InsertResultHandler method insertResult.

@Override
public synchronized InsertResultResponse insertResult(final InsertResultRequest request) throws OwsExceptionReport {
    final InsertResultResponse response = new InsertResultResponse();
    response.setService(request.getService());
    response.setVersion(request.getVersion());
    Session session = null;
    Transaction transaction = null;
    Map<String, CodespaceEntity> codespaceCache = Maps.newHashMap();
    Map<UoM, UnitEntity> unitCache = Maps.newHashMap();
    Map<String, FormatEntity> formatCache = Maps.newHashMap();
    try {
        session = getHibernateSessionHolder().getSession();
        final ResultTemplateEntity resultTemplate = getDaoFactory().getResultTemplateDAO().getResultTemplateObject(request.getTemplateIdentifier(), session);
        transaction = session.beginTransaction();
        final OmObservation o = getSingleObservationFromResultValues(response.getVersion(), resultTemplate, request.getResultValues(), session);
        final List<OmObservation> observations = getSingleObservationsFromObservation(o);
        if (o.getObservationConstellation().isSetFeatureOfInterest() && o.getObservationConstellation().isSetProcedure()) {
            response.setObservation(o);
        } else {
            response.setObservations(observations);
        }
        final AbstractSeriesDAO obsConstDao = getDaoFactory().getSeriesDAO();
        final FormatDAO obsTypeDao = getDaoFactory().getObservationTypeDAO();
        Map<OmObservationConstellation, DatasetEntity> obsConsts = new HashMap<>();
        int insertion = 0;
        final int size = observations.size();
        final AbstractObservationDAO observationDAO = getDaoFactory().getObservationDAO();
        LOGGER.debug("Start saving {} observations.", size);
        Map<String, AbstractFeatureEntity> featureEntityMap = new HashMap<>();
        for (final OmObservation observation : observations) {
            OmObservationConstellation omObsConst = observation.getObservationConstellation();
            if (!obsConsts.containsKey(omObsConst)) {
                DatasetEntity oc = obsConstDao.getSeries(omObsConst, session);
                if (oc != null) {
                    obsConsts.put(omObsConst, oc);
                } else if (isConvertComplexProfileToSingleProfiles() && observation.isSetValue() && observation.getValue().isSetValue() && observation.getValue().getValue() instanceof ProfileValue) {
                    obsConsts.put(omObsConst, insertObservationConstellationForProfiles(obsConstDao, obsTypeDao, observation, session));
                }
            }
            DatasetEntity obsConst = obsConsts.get(observation.getObservationConstellation());
            AbstractFeatureEntity feature = null;
            if (resultTemplate.isSetFeature()) {
                feature = resultTemplate.getFeature();
            } else {
                feature = getFeature(omObsConst.getFeatureOfInterest(), featureEntityMap, session);
            }
            try {
                if (observation.getValue() instanceof SingleObservationValue) {
                    observationDAO.insertObservationSingleValue(obsConst, feature, observation, codespaceCache, unitCache, formatCache, session);
                } else if (observation.getValue() instanceof MultiObservationValues) {
                    observationDAO.insertObservationMultiValue(obsConst, feature, observation, codespaceCache, unitCache, formatCache, session);
                }
                if (!abortInsertResultForExistingObservations()) {
                    transaction.commit();
                    transaction = session.beginTransaction();
                }
            } catch (PersistenceException pe) {
                if (abortInsertResultForExistingObservations()) {
                    throw pe;
                } else {
                    transaction.rollback();
                    session.clear();
                    transaction = session.beginTransaction();
                    LOGGER.debug("Already existing observation would be ignored!", pe);
                }
            }
            if ((++insertion % FLUSH_THRESHOLD) == 0) {
                session.flush();
                session.clear();
                LOGGER.debug("Saved {}/{} observations.", insertion, size);
            }
        }
        LOGGER.debug("Saved {} observations.", size);
        transaction.commit();
    } catch (final HibernateException he) {
        if (transaction != null) {
            transaction.rollback();
        }
        // XXX exception text
        throw new NoApplicableCodeException().causedBy(he);
    } finally {
        getHibernateSessionHolder().returnSession(session);
    }
    return response;
}
Also used : HashMap(java.util.HashMap) NoApplicableCodeException(org.n52.shetland.ogc.ows.exception.NoApplicableCodeException) CodespaceEntity(org.n52.series.db.beans.CodespaceEntity) OmObservation(org.n52.shetland.ogc.om.OmObservation) MultiObservationValues(org.n52.shetland.ogc.om.MultiObservationValues) UoM(org.n52.shetland.ogc.UoM) SingleObservationValue(org.n52.shetland.ogc.om.SingleObservationValue) FormatDAO(org.n52.sos.ds.hibernate.dao.FormatDAO) UnitEntity(org.n52.series.db.beans.UnitEntity) AbstractSeriesDAO(org.n52.sos.ds.hibernate.dao.observation.series.AbstractSeriesDAO) InsertResultResponse(org.n52.shetland.ogc.sos.response.InsertResultResponse) ProfileValue(org.n52.shetland.ogc.om.values.ProfileValue) HibernateException(org.hibernate.HibernateException) FormatEntity(org.n52.series.db.beans.FormatEntity) DatasetEntity(org.n52.series.db.beans.DatasetEntity) AbstractFeatureEntity(org.n52.series.db.beans.AbstractFeatureEntity) OmObservationConstellation(org.n52.shetland.ogc.om.OmObservationConstellation) Transaction(org.hibernate.Transaction) PersistenceException(javax.persistence.PersistenceException) ResultTemplateEntity(org.n52.series.db.beans.ResultTemplateEntity) AbstractObservationDAO(org.n52.sos.ds.hibernate.dao.observation.AbstractObservationDAO) Session(org.hibernate.Session)

Aggregations

FormatEntity (org.n52.series.db.beans.FormatEntity)4 Session (org.hibernate.Session)3 AbstractFeatureEntity (org.n52.series.db.beans.AbstractFeatureEntity)3 CategoryEntity (org.n52.series.db.beans.CategoryEntity)3 DatasetEntity (org.n52.series.db.beans.DatasetEntity)3 OfferingEntity (org.n52.series.db.beans.OfferingEntity)3 PhenomenonEntity (org.n52.series.db.beans.PhenomenonEntity)3 ProcedureEntity (org.n52.series.db.beans.ProcedureEntity)3 HibernateException (org.hibernate.HibernateException)2 Transaction (org.hibernate.Transaction)2 UnitEntity (org.n52.series.db.beans.UnitEntity)2 OmObservationConstellation (org.n52.shetland.ogc.om.OmObservationConstellation)2 NoApplicableCodeException (org.n52.shetland.ogc.ows.exception.NoApplicableCodeException)2 FormatDAO (org.n52.sos.ds.hibernate.dao.FormatDAO)2 AbstractSeriesDAO (org.n52.sos.ds.hibernate.dao.observation.series.AbstractSeriesDAO)2 Strings (com.google.common.base.Strings)1 Collection (java.util.Collection)1 HashMap (java.util.HashMap)1 HashSet (java.util.HashSet)1 LinkedHashSet (java.util.LinkedHashSet)1