Class JDBCFeatureIOService
- java.lang.Object
-
- oracle.spatial.network.nfe.io.jdbc.service.JDBCAbstractIOService
-
- oracle.spatial.network.nfe.io.jdbc.service.JDBCFeatureIOService
-
- All Implemented Interfaces:
NFEFeatureIOService,NFEIOService
public class JDBCFeatureIOService extends JDBCAbstractIOService implements NFEFeatureIOService
Provides the default implementation for the feature service.
-
-
Constructor Summary
Constructors Constructor Description JDBCFeatureIOService(NFEIOServiceProvider serviceProvider)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JGeometrycalculatePersistedNetworkMBR()Returns the minimum bounding rectangle of the model network.java.util.List<java.lang.Long>findFeaturesIds(NFESearchParams searchParams)Searches features based on the specified parameters.java.util.List<NFEFeature>getChildFeatures(NFEFeature nfeFeature)Returns the child features of the specified feature.JGeometrygetMBRForNodes(java.lang.String geoColumn, java.lang.String table, java.util.List<java.lang.Long> nodeIds, java.lang.String workspace)Returns the minimum bounding rectangle of the specified nodes.java.util.List<java.lang.Long>getRelatedLinkIdsForFeature(NFEFeatureLayer featureLayer, java.lang.Long featureId)Returns the links identifiers of the links related by the specified feature.java.util.List<java.lang.Long>getRelatedNodeIdsForFeature(NFEFeatureLayer featureLayer, java.lang.Long featureId)Returns the nodes identifiers of the nodes related by the specified feature.java.util.List<java.lang.Long>getRelatedNodesIdsForLink(java.lang.Long linkId)Returns the start and end nodes identifiers of the specified link.voidimportNetworkElementsAsFeatures(java.lang.String srcNetworkName, long linesFeatureLayerId, long linesFeatureClassId, long nodesFeatureLayerId, long nodesFeatureClassId)Imports all the links and nodes from the specified network to the current model in the database, translating them into line and point features respectively.NFEFeatureloadFeature(long featureLayerId, long featureId)Loads the feature, network elements, feature elements and rules instances related to the specified feature.voidloadFeatureLayersContent(java.awt.geom.Area queryArea, java.util.Collection<java.lang.Long> featLayerIds)Loads the network elements, feature elements, features and rules instances that interact spatially with the specified area.java.util.Collection<NFEFeature>loadLinkFeatures(long linkId)Loads into the Model the link and the features associated to the link.java.util.Collection<NFEFeature>loadNodeFeatures(long nodeId)Loads into the Model the node and the features associated to the node.voidsaveModelContent()Saves the feature layers network elements, feature elements, features and rules instances that were created, modified or deleted.voidsaveModelContent(java.sql.Connection conn)Saves the feature layers network elements, feature elements, features and rules instances that were created, modified or deleted, the specified connection will NOT be closed, rollback or commited.voidupdateAttributeForFeatures(NFEFeatureLayer nfeFeatureLayer, java.lang.Long featureClassId, java.lang.String attributeName, java.lang.String newValue, java.lang.String oldValue)Updates the features attributes from the old value to the new value.-
Methods inherited from class oracle.spatial.network.nfe.io.jdbc.service.JDBCAbstractIOService
close, commit, commitAndClose, getDataSource, getModel, getServiceProvider, rollback, rollbackAndClose, setDataSource, setModel
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface oracle.spatial.network.nfe.io.service.NFEIOService
getDataSource, getModel, getServiceProvider, setDataSource, setModel
-
-
-
-
Constructor Detail
-
JDBCFeatureIOService
public JDBCFeatureIOService(NFEIOServiceProvider serviceProvider)
-
-
Method Detail
-
loadNodeFeatures
public java.util.Collection<NFEFeature> loadNodeFeatures(long nodeId) throws NFEIOException
Description copied from interface:NFEFeatureIOServiceLoads into the Model the node and the features associated to the node.- Specified by:
loadNodeFeaturesin interfaceNFEFeatureIOService- Parameters:
nodeId- id of the node to be loaded along with its features- Returns:
- A collection containing the features associated to the passed nodeId
- Throws:
NFEIOException
-
loadLinkFeatures
public java.util.Collection<NFEFeature> loadLinkFeatures(long linkId) throws NFEIOException
Description copied from interface:NFEFeatureIOServiceLoads into the Model the link and the features associated to the link.- Specified by:
loadLinkFeaturesin interfaceNFEFeatureIOService- Parameters:
linkId- id of the link to be loaded along with its features- Returns:
- A collection containing the features associated to the passed linkId
- Throws:
NFEIOException
-
loadFeature
public NFEFeature loadFeature(long featureLayerId, long featureId) throws NFEIOException
Description copied from interface:NFEFeatureIOServiceLoads the feature, network elements, feature elements and rules instances related to the specified feature. Note that the deleted features in the model will not be loaded.- Specified by:
loadFeaturein interfaceNFEFeatureIOService- Parameters:
featureLayerId- feature layer identifier of the feature to loadfeatureId- feature identifier- Returns:
- feature
- Throws:
NFEIOException- if an NFE error occurs.
-
loadFeatureLayersContent
public void loadFeatureLayersContent(java.awt.geom.Area queryArea, java.util.Collection<java.lang.Long> featLayerIds) throws NFEIOExceptionDescription copied from interface:NFEFeatureIOServiceLoads the network elements, feature elements, features and rules instances that interact spatially with the specified area. Note that the deleted elements in the model will not be loaded.- Specified by:
loadFeatureLayersContentin interfaceNFEFeatureIOService- Parameters:
queryArea- area to load the feature layers contentfeatLayerIds- identifiers of the feature layers to load the content- Throws:
NFEIOException- if an NFE error occurs.
-
saveModelContent
public void saveModelContent() throws NFEIOExceptionDescription copied from interface:NFEFeatureIOServiceSaves the feature layers network elements, feature elements, features and rules instances that were created, modified or deleted.- Specified by:
saveModelContentin interfaceNFEFeatureIOService- Throws:
NFEIOException- if an NFE error occurs.
-
saveModelContent
public void saveModelContent(java.sql.Connection conn) throws NFEIOExceptionDescription copied from interface:NFEFeatureIOServiceSaves the feature layers network elements, feature elements, features and rules instances that were created, modified or deleted, the specified connection will NOT be closed, rollback or commited. This saving function allow to perform more tasks and to commit and close the connection when needed.- Specified by:
saveModelContentin interfaceNFEFeatureIOService- Parameters:
conn- Connection- Throws:
NFEIOException- if an NFE error occurs.
-
calculatePersistedNetworkMBR
public JGeometry calculatePersistedNetworkMBR() throws NFEIOException
Description copied from interface:NFEFeatureIOServiceReturns the minimum bounding rectangle of the model network.- Specified by:
calculatePersistedNetworkMBRin interfaceNFEFeatureIOService- Returns:
- minimum bounding rectangle of the model network
- Throws:
NFEIOException- if an NFE error occurs.
-
findFeaturesIds
public java.util.List<java.lang.Long> findFeaturesIds(NFESearchParams searchParams) throws NFEIOException
Description copied from interface:NFEFeatureIOServiceSearches features based on the specified parameters. In the object searchParams the featureLayerId is mandatory, the parameters featureClassId, featureId and conditionString are optional. The conditionString parameter will be added to the where clause of the search query on the feature table.- Specified by:
findFeaturesIdsin interfaceNFEFeatureIOService- Parameters:
searchParams- search parameters- Returns:
- identifiers of the resulting features
- Throws:
NFEIOException- if an NFE error occurs.
-
getRelatedNodeIdsForFeature
public java.util.List<java.lang.Long> getRelatedNodeIdsForFeature(NFEFeatureLayer featureLayer, java.lang.Long featureId) throws NFEIOException
Description copied from interface:NFEFeatureIOServiceReturns the nodes identifiers of the nodes related by the specified feature.- Specified by:
getRelatedNodeIdsForFeaturein interfaceNFEFeatureIOService- Parameters:
featureLayer- feature layerfeatureId- feature id- Returns:
- list of nodes identifiers
- Throws:
NFEIOException- if an NFE error occurs.
-
getRelatedLinkIdsForFeature
public java.util.List<java.lang.Long> getRelatedLinkIdsForFeature(NFEFeatureLayer featureLayer, java.lang.Long featureId) throws NFEIOException
Description copied from interface:NFEFeatureIOServiceReturns the links identifiers of the links related by the specified feature.- Specified by:
getRelatedLinkIdsForFeaturein interfaceNFEFeatureIOService- Parameters:
featureLayer- feature layerfeatureId- feature id- Returns:
- list of links identifiers
- Throws:
NFEIOException- if an NFE error occurs.
-
getChildFeatures
public java.util.List<NFEFeature> getChildFeatures(NFEFeature nfeFeature) throws NFEIOException
Description copied from interface:NFEFeatureIOServiceReturns the child features of the specified feature. Note that the deleted features in the model will not be returned.- Specified by:
getChildFeaturesin interfaceNFEFeatureIOService- Parameters:
nfeFeature- feature parent- Returns:
- child features
- Throws:
NFEIOException- if an NFE error occurs.
-
getRelatedNodesIdsForLink
public java.util.List<java.lang.Long> getRelatedNodesIdsForLink(java.lang.Long linkId) throws NFEIOExceptionDescription copied from interface:NFEFeatureIOServiceReturns the start and end nodes identifiers of the specified link.- Specified by:
getRelatedNodesIdsForLinkin interfaceNFEFeatureIOService- Parameters:
linkId- link id- Returns:
- start and end nodes identifiers
- Throws:
NFEIOException- if an NFE error occurs.
-
getMBRForNodes
public JGeometry getMBRForNodes(java.lang.String geoColumn, java.lang.String table, java.util.List<java.lang.Long> nodeIds, java.lang.String workspace) throws NFEIOException
Description copied from interface:NFEFeatureIOServiceReturns the minimum bounding rectangle of the specified nodes.- Specified by:
getMBRForNodesin interfaceNFEFeatureIOService- Parameters:
geoColumn- geometry column name in nodes tabletable- nodes tablenodeIds- nodes identifiersworkspace- workspace that will be used by the connection, if null the current workspace will be used- Returns:
- the minimum bounding rectangle of the specified nodes
- Throws:
NFEIOException- if an NFE error occurs.
-
updateAttributeForFeatures
public void updateAttributeForFeatures(NFEFeatureLayer nfeFeatureLayer, java.lang.Long featureClassId, java.lang.String attributeName, java.lang.String newValue, java.lang.String oldValue) throws NFEIOException
Description copied from interface:NFEFeatureIOServiceUpdates the features attributes from the old value to the new value. The features have to belong to the specified feature layer and feature class. Only the attributes having the current value as the old value will be updated. This method can be used for example to update all the affected attributes when a catalog value changes.- Specified by:
updateAttributeForFeaturesin interfaceNFEFeatureIOService- Parameters:
nfeFeatureLayer- feature layerfeatureClassId- feature class identifierattributeName- attribute namenewValue- new valueoldValue- old value- Throws:
NFEIOException- if an NFE error occurs.
-
importNetworkElementsAsFeatures
public void importNetworkElementsAsFeatures(java.lang.String srcNetworkName, long linesFeatureLayerId, long linesFeatureClassId, long nodesFeatureLayerId, long nodesFeatureClassId) throws NFEIOExceptionDescription copied from interface:NFEFeatureIOServiceImports all the links and nodes from the specified network to the current model in the database, translating them into line and point features respectively.- Specified by:
importNetworkElementsAsFeaturesin interfaceNFEFeatureIOService- Parameters:
srcNetworkName- network name to be importedlinesFeatureLayerId- translating line features' feature layer idlinesFeatureClassId- translating line features' feature class idnodesFeatureLayerId- translating node features' feature layer idnodesFeatureClassId- translating node features' feature class id- Throws:
NFEIOException- if an NFE error occurs.
-
-