public class InsertResultDAO extends AbstractInsertResultDAO implements CapabilitiesExtensionProvider
Modifier and Type | Field and Description |
---|---|
private static int |
FLUSH_THRESHOLD |
private static org.slf4j.Logger |
LOGGER |
private HibernateSessionHolder |
sessionHolder |
DATASOURCE_DAO_IDENTIFIER, IDEPENDET_IDENTIFIER
Constructor and Description |
---|
InsertResultDAO()
constructor
|
Modifier and Type | Method and Description |
---|---|
private String[] |
checkForCountValue(String[] blockValues,
String tokenSeparator)
Check if the block values from result values contains a preceding count
value
|
private MultiObservationValues<SweDataArray> |
createObservationValueFrom(String[] blockValues,
SweAbstractDataComponent recordFromResultStructure,
SweAbstractEncoding encoding,
int resultTimeIndex,
int phenomenonTimeIndex)
Create internal observation value
|
private SosProcedureDescription |
createProcedure(Procedure hProcedure)
Create internal ProcedureDescription from Procedure entity
|
private String[] |
getBlockValues(String resultValues,
SweAbstractEncoding encoding)
Get block values from result values
|
CapabilitiesExtensionKey |
getCapabilitiesExtensionKey()
Get the
CapabilitiesExtensionKey for this provider |
String |
getDatasourceDaoIdentifier() |
CapabilitiesExtension |
getExtension()
Get the
CapabilitiesExtension the provider provides. |
private OmObservation |
getObservation(ResultTemplate resultTemplate,
String[] blockValues,
SweAbstractDataComponent resultStructure,
SweAbstractEncoding encoding,
org.hibernate.Session session)
Get internal observation
|
private Time |
getPhenomenonTime(String timeString)
Get internal time object from time String
|
String |
getRelatedOperation()
Get the specific service operation name this
CapabilitiesExtension relates to. |
private OmObservation |
getSingleObservationFromResultValues(String version,
ResultTemplate resultTemplate,
String resultValues,
org.hibernate.Session session)
Create OmObservation from result values
|
protected List<OmObservation> |
getSingleObservationsFromObservation(OmObservation observation)
Unfold internal observation from result values to single internal
observations
|
private String[] |
getSingleValues(String block,
SweAbstractEncoding encoding)
Get single values from a block value
|
protected AbstractFeature |
getSosAbstractFeature(FeatureOfInterest featureOfInterest,
String version,
org.hibernate.Session session)
Get internal feature from FeatureOfInterest entity
|
private OmObservationConstellation |
getSosObservationConstellation(ResultTemplate resultTemplate,
org.hibernate.Session session)
Get internal ObservationConstellation from result template
|
boolean |
hasRelatedOperation()
Does this
CapabilitiesExtension related to a specific service
operation |
InsertResultResponse |
insertResult(InsertResultRequest request) |
private String[] |
separateValues(String values,
String separator)
Separate values from String with separator
|
setOperationsMetadata
setRecordFrom
addFeatureOfInterestParameter, addFeatureOfInterestParameter, addObservablePropertyParameter, addObservablePropertyParameter, addOfferingParameter, addOfferingParameter, addProcedureParameter, addProcedureParameter, getCache, getConfigurator, getConformanceClasses, getDCP, getOperationDAOKeyType, getOperationName, getOperationsMetadata
private static final org.slf4j.Logger LOGGER
private static final int FLUSH_THRESHOLD
private final HibernateSessionHolder sessionHolder
public String getDatasourceDaoIdentifier()
getDatasourceDaoIdentifier
in interface DatasourceDaoIdentifier
public InsertResultResponse insertResult(InsertResultRequest request) throws OwsExceptionReport
insertResult
in class AbstractInsertResultDAO
OwsExceptionReport
private OmObservation getSingleObservationFromResultValues(String version, ResultTemplate resultTemplate, String resultValues, org.hibernate.Session session) throws OwsExceptionReport
version
- Service versionresultTemplate
- Associated result templateresultValues
- Result valuessession
- Hibernate sessionOwsExceptionReport
- If an error occurs during the processingprotected AbstractFeature getSosAbstractFeature(FeatureOfInterest featureOfInterest, String version, org.hibernate.Session session) throws OwsExceptionReport
featureOfInterest
- version
- Service versionsession
- Hibernate sessionOwsExceptionReport
- If an error occurs during requestingprotected List<OmObservation> getSingleObservationsFromObservation(OmObservation observation) throws OwsExceptionReport
observation
- Internal observaiton to unfoldOwsExceptionReport
- If an error occurs during unfoldingprivate OmObservationConstellation getSosObservationConstellation(ResultTemplate resultTemplate, org.hibernate.Session session)
resultTemplate
- session
- Hibernate sessionprivate SosProcedureDescription createProcedure(Procedure hProcedure)
hProcedure
- Procedure entityprivate OmObservation getObservation(ResultTemplate resultTemplate, String[] blockValues, SweAbstractDataComponent resultStructure, SweAbstractEncoding encoding, org.hibernate.Session session) throws OwsExceptionReport
resultTemplate
- Associated ResultTemplateblockValues
- Block values from result valuesresultStructure
- Associated ResultStructureencoding
- Associated ResultEncodingsession
- Hibernate sessionOwsExceptionReport
- If processing failsprivate MultiObservationValues<SweDataArray> createObservationValueFrom(String[] blockValues, SweAbstractDataComponent recordFromResultStructure, SweAbstractEncoding encoding, int resultTimeIndex, int phenomenonTimeIndex) throws OwsExceptionReport
blockValues
- Block values from result valuesrecordFromResultStructure
- Associated ResultStructureencoding
- Associated Result encodingresultTimeIndex
- Result time positionphenomenonTimeIndex
- Phenomenon time positionsOwsExceptionReport
- If processing failsprivate Time getPhenomenonTime(String timeString) throws OwsExceptionReport
timeString
- Time String to parseOwsExceptionReport
- If an error occursprivate String[] getSingleValues(String block, SweAbstractEncoding encoding)
block
- Block valueencoding
- ResultEncodingprivate String[] getBlockValues(String resultValues, SweAbstractEncoding encoding)
resultValues
- Result valuesencoding
- ResultEncodingprivate String[] checkForCountValue(String[] blockValues, String tokenSeparator)
blockValues
- Block values from result valuestokenSeparator
- Token separatorprivate String[] separateValues(String values, String separator)
values
- Value Stringseparator
- Separatorpublic CapabilitiesExtension getExtension()
CapabilitiesExtensionProvider
CapabilitiesExtension
the provider provides.getExtension
in interface CapabilitiesExtensionProvider
public CapabilitiesExtensionKey getCapabilitiesExtensionKey()
CapabilitiesExtensionProvider
CapabilitiesExtensionKey
for this providergetCapabilitiesExtensionKey
in interface CapabilitiesExtensionProvider
public boolean hasRelatedOperation()
CapabilitiesExtensionProvider
CapabilitiesExtension
related to a specific service
operationhasRelatedOperation
in interface CapabilitiesExtensionProvider
true
, if service relates to a specific service
operationpublic String getRelatedOperation()
CapabilitiesExtensionProvider
CapabilitiesExtension
relates to.getRelatedOperation
in interface CapabilitiesExtensionProvider
Copyright © 2012-2015 52north.org. All Rights Reserved.