public class JDBCFeatureIOService extends JDBCAbstractIOService implements NFEFeatureIOService
Constructor and Description |
---|
JDBCFeatureIOService(NFEIOServiceProvider serviceProvider) |
Modifier and Type | Method and Description |
---|---|
JGeometry |
calculatePersistedNetworkMBR()
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.
|
JGeometry |
getMBRForNodes(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.
|
void |
importNetworkElementsAsFeatures(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.
|
NFEFeature |
loadFeature(long featureLayerId, long featureId)
Loads the feature, network elements, feature elements and rules instances related to the specified feature.
|
void |
loadFeatureLayersContent(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.
|
void |
saveModelContent()
Saves the feature layers network elements, feature elements, features and rules instances that were created, modified or deleted.
|
void |
saveModelContent(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.
|
void |
updateAttributeForFeatures(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.
|
getDataSource, getModel, getServiceProvider, setDataSource, setModel
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDataSource, getModel, getServiceProvider, setDataSource, setModel
public JDBCFeatureIOService(NFEIOServiceProvider serviceProvider)
public java.util.Collection<NFEFeature> loadNodeFeatures(long nodeId) throws NFEIOException
NFEFeatureIOService
loadNodeFeatures
in interface NFEFeatureIOService
nodeId
- id of the node to be loaded along with its featuresNFEIOException
public java.util.Collection<NFEFeature> loadLinkFeatures(long linkId) throws NFEIOException
NFEFeatureIOService
loadLinkFeatures
in interface NFEFeatureIOService
linkId
- id of the link to be loaded along with its featuresNFEIOException
public NFEFeature loadFeature(long featureLayerId, long featureId) throws NFEIOException
NFEFeatureIOService
loadFeature
in interface NFEFeatureIOService
featureLayerId
- feature layer identifier of the feature to loadfeatureId
- feature identifierNFEIOException
- if an NFE error occurs.public void loadFeatureLayersContent(java.awt.geom.Area queryArea, java.util.Collection<java.lang.Long> featLayerIds) throws NFEIOException
NFEFeatureIOService
loadFeatureLayersContent
in interface NFEFeatureIOService
queryArea
- area to load the feature layers contentfeatLayerIds
- identifiers of the feature layers to load the contentNFEIOException
- if an NFE error occurs.public void saveModelContent() throws NFEIOException
NFEFeatureIOService
saveModelContent
in interface NFEFeatureIOService
NFEIOException
- if an NFE error occurs.public void saveModelContent(java.sql.Connection conn) throws NFEIOException
NFEFeatureIOService
saveModelContent
in interface NFEFeatureIOService
conn
- ConnectionNFEIOException
- if an NFE error occurs.public JGeometry calculatePersistedNetworkMBR() throws NFEIOException
NFEFeatureIOService
calculatePersistedNetworkMBR
in interface NFEFeatureIOService
NFEIOException
- if an NFE error occurs.public java.util.List<java.lang.Long> findFeaturesIds(NFESearchParams searchParams) throws NFEIOException
NFEFeatureIOService
findFeaturesIds
in interface NFEFeatureIOService
searchParams
- search parametersNFEIOException
- if an NFE error occurs.public java.util.List<java.lang.Long> getRelatedNodeIdsForFeature(NFEFeatureLayer featureLayer, java.lang.Long featureId) throws NFEIOException
NFEFeatureIOService
getRelatedNodeIdsForFeature
in interface NFEFeatureIOService
featureLayer
- feature layerfeatureId
- feature idNFEIOException
- if an NFE error occurs.public java.util.List<java.lang.Long> getRelatedLinkIdsForFeature(NFEFeatureLayer featureLayer, java.lang.Long featureId) throws NFEIOException
NFEFeatureIOService
getRelatedLinkIdsForFeature
in interface NFEFeatureIOService
featureLayer
- feature layerfeatureId
- feature idNFEIOException
- if an NFE error occurs.public java.util.List<NFEFeature> getChildFeatures(NFEFeature nfeFeature) throws NFEIOException
NFEFeatureIOService
getChildFeatures
in interface NFEFeatureIOService
nfeFeature
- feature parentNFEIOException
- if an NFE error occurs.public java.util.List<java.lang.Long> getRelatedNodesIdsForLink(java.lang.Long linkId) throws NFEIOException
NFEFeatureIOService
getRelatedNodesIdsForLink
in interface NFEFeatureIOService
linkId
- link idNFEIOException
- if an NFE error occurs.public JGeometry getMBRForNodes(java.lang.String geoColumn, java.lang.String table, java.util.List<java.lang.Long> nodeIds, java.lang.String workspace) throws NFEIOException
NFEFeatureIOService
getMBRForNodes
in interface NFEFeatureIOService
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 usedNFEIOException
- if an NFE error occurs.public void updateAttributeForFeatures(NFEFeatureLayer nfeFeatureLayer, java.lang.Long featureClassId, java.lang.String attributeName, java.lang.String newValue, java.lang.String oldValue) throws NFEIOException
NFEFeatureIOService
updateAttributeForFeatures
in interface NFEFeatureIOService
nfeFeatureLayer
- feature layerfeatureClassId
- feature class identifierattributeName
- attribute namenewValue
- new valueoldValue
- old valueNFEIOException
- if an NFE error occurs.public void importNetworkElementsAsFeatures(java.lang.String srcNetworkName, long linesFeatureLayerId, long linesFeatureClassId, long nodesFeatureLayerId, long nodesFeatureClassId) throws NFEIOException
NFEFeatureIOService
importNetworkElementsAsFeatures
in interface NFEFeatureIOService
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 idNFEIOException
- if an NFE error occurs.