use of org.n52.series.db.beans.ProcedureEntity in project SOS by 52North.
the class ProcedureDAO method getProcedureForIdentifier.
/**
* Get transactional procedure object for procedure identifier and
* procedureDescriptionFormats
*
* @param identifier
* ProcedureEntity identifier
* @param procedureDescriptionFormats
* ProcedureDescriptionFormat identifiers
* @param session
* Hibernate session
* @return Transactional procedure object
*/
public ProcedureEntity getProcedureForIdentifier(final String identifier, Set<String> procedureDescriptionFormats, final Session session) {
Criteria criteria = getDefaultCriteria(session).add(Restrictions.eq(ProcedureEntity.IDENTIFIER, identifier));
criteria.createCriteria(ProcedureEntity.PROPERTY_VALID_PROCEDURE_TIME).add(Restrictions.in(ProcedureHistoryEntity.PROCEDURE_DESCRIPTION_FORMAT, procedureDescriptionFormats));
LOGGER.trace(QUERY_IDENTIFIER_LOG_TEMPLATE, HibernateHelper.getSqlString(criteria));
return (ProcedureEntity) criteria.uniqueResult();
}
use of org.n52.series.db.beans.ProcedureEntity in project SOS by 52North.
the class ProcedureDescriptionGeneratorSml20 method createAggregateProcess.
private AggregateProcess createAggregateProcess(ProcedureEntity procedure, Session session) throws OwsExceptionReport {
AggregateProcess aggregateProcess = new AggregateProcess();
setIdentifier(aggregateProcess, procedure);
setCommonValues(procedure, aggregateProcess, session);
return aggregateProcess;
}
use of org.n52.series.db.beans.ProcedureEntity in project SOS by 52North.
the class ProcedureDescriptionGeneratorSml20 method createSimpleProcess.
private SimpleProcess createSimpleProcess(ProcedureEntity procedure, Session session) throws OwsExceptionReport {
SimpleProcess simpleProcess = new SimpleProcess();
setIdentifier(simpleProcess, procedure);
setCommonValues(procedure, simpleProcess, session);
return simpleProcess;
}
use of org.n52.series.db.beans.ProcedureEntity in project SOS by 52North.
the class ProcedureDescriptionGeneratorSml20 method createPhysicalSystem.
private PhysicalSystem createPhysicalSystem(ProcedureEntity procedure, Session session) throws OwsExceptionReport {
PhysicalSystem physicalSystem = new PhysicalSystem();
setIdentifier(physicalSystem, procedure);
setCommonValues(procedure, physicalSystem, session);
physicalSystem.setPosition(createPosition(procedure, session));
return physicalSystem;
}
use of org.n52.series.db.beans.ProcedureEntity in project SOS by 52North.
the class ProcedureDescriptionGeneratorSml101 method createSmlProcessModel.
/**
* Create a SensorML ProcessModel from Hibernate procedure entity
*
* @param procedure
* Hibernate procedure entity
*
* @return SensorML ProcessModel
*
* @throws OwsExceptionReport
* If an error occurs
*/
private ProcessModel createSmlProcessModel(ProcedureEntity procedure, Session session) throws OwsExceptionReport {
final ProcessModel processModel = new ProcessModel();
setCommonValues(procedure, processModel, session);
processModel.setMethod(createMethod(procedure, getObservablePropertiesForProcedure(procedure, session)));
// processModel.setNames(createNames(procedure));
return processModel;
}
Aggregations