Class JDBCFeatureIOService

    • Constructor Detail

    • Method Detail

      • loadNodeFeatures

        public java.util.Collection<NFEFeature> loadNodeFeatures​(long nodeId)
                                                          throws NFEIOException
        Description copied from interface: NFEFeatureIOService
        Loads into the Model the node and the features associated to the node.
        Specified by:
        loadNodeFeatures in interface NFEFeatureIOService
        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: NFEFeatureIOService
        Loads into the Model the link and the features associated to the link.
        Specified by:
        loadLinkFeatures in interface NFEFeatureIOService
        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: NFEFeatureIOService
        Loads 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:
        loadFeature in interface NFEFeatureIOService
        Parameters:
        featureLayerId - feature layer identifier of the feature to load
        featureId - 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 NFEIOException
        Description copied from interface: NFEFeatureIOService
        Loads 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:
        loadFeatureLayersContent in interface NFEFeatureIOService
        Parameters:
        queryArea - area to load the feature layers content
        featLayerIds - identifiers of the feature layers to load the content
        Throws:
        NFEIOException - if an NFE error occurs.
      • saveModelContent

        public void saveModelContent​(java.sql.Connection conn)
                              throws NFEIOException
        Description copied from interface: NFEFeatureIOService
        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. This saving function allow to perform more tasks and to commit and close the connection when needed.
        Specified by:
        saveModelContent in interface NFEFeatureIOService
        Parameters:
        conn - Connection
        Throws:
        NFEIOException - if an NFE error occurs.
      • findFeaturesIds

        public java.util.List<java.lang.Long> findFeaturesIds​(NFESearchParams searchParams)
                                                       throws NFEIOException
        Description copied from interface: NFEFeatureIOService
        Searches 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:
        findFeaturesIds in interface NFEFeatureIOService
        Parameters:
        searchParams - search parameters
        Returns:
        identifiers of the resulting features
        Throws:
        NFEIOException - if an NFE error occurs.
      • getRelatedNodesIdsForLink

        public java.util.List<java.lang.Long> getRelatedNodesIdsForLink​(java.lang.Long linkId)
                                                                 throws NFEIOException
        Description copied from interface: NFEFeatureIOService
        Returns the start and end nodes identifiers of the specified link.
        Specified by:
        getRelatedNodesIdsForLink in interface NFEFeatureIOService
        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: NFEFeatureIOService
        Returns the minimum bounding rectangle of the specified nodes.
        Specified by:
        getMBRForNodes in interface NFEFeatureIOService
        Parameters:
        geoColumn - geometry column name in nodes table
        table - nodes table
        nodeIds - nodes identifiers
        workspace - 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: NFEFeatureIOService
        Updates 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:
        updateAttributeForFeatures in interface NFEFeatureIOService
        Parameters:
        nfeFeatureLayer - feature layer
        featureClassId - feature class identifier
        attributeName - attribute name
        newValue - new value
        oldValue - 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 NFEIOException
        Description copied from interface: NFEFeatureIOService
        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.
        Specified by:
        importNetworkElementsAsFeatures in interface NFEFeatureIOService
        Parameters:
        srcNetworkName - network name to be imported
        linesFeatureLayerId - translating line features' feature layer id
        linesFeatureClassId - translating line features' feature class id
        nodesFeatureLayerId - translating node features' feature layer id
        nodesFeatureClassId - translating node features' feature class id
        Throws:
        NFEIOException - if an NFE error occurs.