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, setModelequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetDataSource, getModel, getServiceProvider, setDataSource, setModelpublic JDBCFeatureIOService(NFEIOServiceProvider serviceProvider)
public java.util.Collection<NFEFeature> loadNodeFeatures(long nodeId) throws NFEIOException
NFEFeatureIOServiceloadNodeFeatures in interface NFEFeatureIOServicenodeId - id of the node to be loaded along with its featuresNFEIOExceptionpublic java.util.Collection<NFEFeature> loadLinkFeatures(long linkId) throws NFEIOException
NFEFeatureIOServiceloadLinkFeatures in interface NFEFeatureIOServicelinkId - id of the link to be loaded along with its featuresNFEIOExceptionpublic NFEFeature loadFeature(long featureLayerId, long featureId) throws NFEIOException
NFEFeatureIOServiceloadFeature in interface NFEFeatureIOServicefeatureLayerId - 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
NFEFeatureIOServiceloadFeatureLayersContent in interface NFEFeatureIOServicequeryArea - 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
NFEFeatureIOServicesaveModelContent in interface NFEFeatureIOServiceNFEIOException - if an NFE error occurs.
public void saveModelContent(java.sql.Connection conn)
throws NFEIOException
NFEFeatureIOServicesaveModelContent in interface NFEFeatureIOServiceconn - ConnectionNFEIOException - if an NFE error occurs.public JGeometry calculatePersistedNetworkMBR() throws NFEIOException
NFEFeatureIOServicecalculatePersistedNetworkMBR in interface NFEFeatureIOServiceNFEIOException - if an NFE error occurs.public java.util.List<java.lang.Long> findFeaturesIds(NFESearchParams searchParams) throws NFEIOException
NFEFeatureIOServicefindFeaturesIds in interface NFEFeatureIOServicesearchParams - search parametersNFEIOException - if an NFE error occurs.public java.util.List<java.lang.Long> getRelatedNodeIdsForFeature(NFEFeatureLayer featureLayer, java.lang.Long featureId) throws NFEIOException
NFEFeatureIOServicegetRelatedNodeIdsForFeature in interface NFEFeatureIOServicefeatureLayer - 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
NFEFeatureIOServicegetRelatedLinkIdsForFeature in interface NFEFeatureIOServicefeatureLayer - feature layerfeatureId - feature idNFEIOException - if an NFE error occurs.public java.util.List<NFEFeature> getChildFeatures(NFEFeature nfeFeature) throws NFEIOException
NFEFeatureIOServicegetChildFeatures in interface NFEFeatureIOServicenfeFeature - feature parentNFEIOException - if an NFE error occurs.
public java.util.List<java.lang.Long> getRelatedNodesIdsForLink(java.lang.Long linkId)
throws NFEIOException
NFEFeatureIOServicegetRelatedNodesIdsForLink in interface NFEFeatureIOServicelinkId - 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
NFEFeatureIOServicegetMBRForNodes in interface NFEFeatureIOServicegeoColumn - 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
NFEFeatureIOServiceupdateAttributeForFeatures in interface NFEFeatureIOServicenfeFeatureLayer - 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
NFEFeatureIOServiceimportNetworkElementsAsFeatures in interface NFEFeatureIOServicesrcNetworkName - 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.