Class JDBCModelIOService

    • Method Detail

      • createFromScratchModel

        public NFEModel createFromScratchModel​(java.lang.String modelName,
                                               boolean directedNetwork,
                                               NFEGeometryDescriptor geomDescriptor)
                                        throws NFEIOException
        Description copied from interface: NFEModelIOService
        Creates a model in from scratch mode. The function will create the initial model infrastructure if it doesn't exists along with the network used by the model. Also the function creates the tables related to the model: FT_CLASS, FT_CLASS_REL, FT_CLASS_ATTR_CSTR, FT_USR_DATA, FT_USR_DATA_CATLG, FT_USR_DATA_CVAL, FT_CLASS_DEF_CON_PT, LINE_LINE_RULE, LINE_POINT_RULE, RULE_INSTANCE, FT_RULE_REL, RULE_DEC_HANDLER, POINT_CARD_RULE.
        Specified by:
        createFromScratchModel in interface NFEModelIOService
        Parameters:
        modelName - NFE model name
        directedNetwork - true if the network to create has to be directed, false otherwise
        geomDescriptor - network geometry descriptor
        Returns:
        NFE model
        Throws:
        NFEIOException - if an NFE error occurs.
      • createOverExistingNetworkModel

        public NFEModel createOverExistingNetworkModel​(java.lang.String modelName,
                                                       java.lang.String networkName)
                                                throws NFEIOException
        Description copied from interface: NFEModelIOService
        Creates a model in from existing network mode. The function will create the initial model infrastructure if it doesn't exists. Also the function creates the tables related to the model: FT_CLASS, FT_CLASS_REL, FT_CLASS_ATTR_CSTR, FT_USR_DATA, FT_USR_DATA_CATLG, FT_USR_DATA_CVAL, FT_CLASS_DEF_CON_PT, LINE_LINE_RULE, LINE_POINT_RULE, RULE_INSTANCE, FT_RULE_REL, RULE_DEC_HANDLER, POINT_CARD_RULE.
        Specified by:
        createOverExistingNetworkModel in interface NFEModelIOService
        Parameters:
        modelName - model name
        networkName - network name
        Returns:
        NFE model
        Throws:
        NFEIOException - if an NFE error occurs.
      • createFeatureLayer

        public NFEFeatureLayer createFeatureLayer​(java.lang.String featureLayerName,
                                                  java.lang.String featureTable,
                                                  java.lang.String relationTable,
                                                  java.lang.String hierarchyTable,
                                                  java.util.Collection<NFEAttributeDescriptor> attrDescriptors,
                                                  int hierarchyLevel,
                                                  int zOrder)
                                           throws NFEIOException
        Description copied from interface: NFEModelIOService
        Creates a feature layer. Version disable the model before to execute this function (NFEWorkspaceIOService.disableAllVersioning) and reload the model after to execute it.
        Specified by:
        createFeatureLayer in interface NFEModelIOService
        Parameters:
        featureLayerName - feature layer name
        featureTable - feature table
        relationTable - relation table
        hierarchyTable - hierarchy table
        attrDescriptors - attributes descriptors
        hierarchyLevel - hierarchy level of the feature layer
        zOrder - Z-order of the feature layer. The Z-order determines which feature layer appears on top of the other.
        Returns:
        NFE feature layer
        Throws:
        NFEIOException - if an NFE error occurs.
      • enableAnalysisInModel

        public void enableAnalysisInModel()
                                   throws NFEIOException
        Description copied from interface: NFEModelIOService
        Enables the analysis searching creating the path layer. It is mandatory to call this function before to perform any analysis. Additionally the paths that are saved in database will be load in Model. Note that if your model is analysis enabled the path features will be deleted when any related link or node is deleted.
        Specified by:
        enableAnalysisInModel in interface NFEModelIOService
        Throws:
        NFEIOException
      • loadModel

        public NFEModel loadModel​(java.lang.String modelName)
                           throws NFEIOException
        Description copied from interface: NFEModelIOService
        Loads the NFE model. Note that the metadata and information about the feature layers will loaded but not the related features.
        Specified by:
        loadModel in interface NFEModelIOService
        Parameters:
        modelName - model name
        Returns:
        NFE model
        Throws:
        NFEIOException - if an NFE error occurs.
      • persistFeatureClass

        public void persistFeatureClass​(NFEFeatureClass featClass)
                                 throws NFEIOException
        Description copied from interface: NFEModelIOService
        Persists a feature class. Version disable the model before to execute this function (NFEWorkspaceIOService.disableAllVersioning) and reload the model after to execute it.
        Specified by:
        persistFeatureClass in interface NFEModelIOService
        Parameters:
        featClass - feature class
        Throws:
        NFEIOException - if an NFE error occurs.
      • updateFeatureClass

        public void updateFeatureClass​(NFEFeatureClass featClass)
                                throws NFEIOException
        Description copied from interface: NFEModelIOService
        Updates the feature class. Updates the name, shape, cardinality rules, style, predefined points and attribute constraints. Version disable the model before to execute this function (NFEWorkspaceIOService.disableAllVersioning) and reloads the model after to execute it.
        Specified by:
        updateFeatureClass in interface NFEModelIOService
        Parameters:
        featClass - feature class
        Throws:
        NFEIOException - if an NFE error occurs.
      • updateAttributeConstraints

        public void updateAttributeConstraints​(java.lang.Long featureClassId,
                                               java.lang.String attributeName,
                                               java.lang.String newValue)
                                        throws NFEIOException
        Description copied from interface: NFEModelIOService
        Updates the attribute default value for the specified feature class. Version disable the model before to execute this function (NFEWorkspaceIOService.disableAllVersioning) and reload the model after to execute it.
        Specified by:
        updateAttributeConstraints in interface NFEModelIOService
        Parameters:
        featureClassId - feature class id
        attributeName - attribute name
        newValue - new attribute default value
        Throws:
        NFEIOException - if an NFE error occurs.
      • updateCatalog

        public void updateCatalog​(NFECatalog catalog)
                           throws NFEIOException
        Description copied from interface: NFEModelIOService
        Updates the catalog values of the specified catalog. Version disable the model before to execute this function (NFEWorkspaceIOService.disableAllVersioning) and reload the model after to execute it.
        Specified by:
        updateCatalog in interface NFEModelIOService
        Parameters:
        catalog - catalog
        Throws:
        NFEIOException - if an NFE error occurs.
      • deleteFeatureLayer

        public void deleteFeatureLayer​(NFEFeatureLayer featLayer)
                                throws NFEIOException
        Description copied from interface: NFEModelIOService
        Deletes the feature layer. Use carefully since this function will delete all the data related to the feature layer. Before to execute this function delete the related features and rules. Version disable the model before to execute this function (NFEWorkspaceIOService.disableAllVersioning) and reload the model after to execute it.
        Specified by:
        deleteFeatureLayer in interface NFEModelIOService
        Parameters:
        featLayer - feature layer
        Throws:
        NFEIOException - if an NFE error occurs.
      • deleteFeatureClass

        public void deleteFeatureClass​(NFEFeatureClass featClass)
                                throws NFEIOException
        Description copied from interface: NFEModelIOService
        Deletes the feature class. Use carefully since this function will delete all the data related to the feature class. Before to execute this function delete the related features and rules. Version disable the model before to execute this function (NFEWorkspaceIOService.disableAllVersioning) and reload the model after to execute it.
        Specified by:
        deleteFeatureClass in interface NFEModelIOService
        Parameters:
        featClass - feature class
        Throws:
        NFEIOException - if an NFE error occurs.
      • deleteCatalog

        public void deleteCatalog​(long catalogId)
                           throws NFEIOException
        Description copied from interface: NFEModelIOService
        Deletes the specified catalog. The function getFeatureLayersAttributesUsingCatalog can be used to ensure that the catalog is not in use.
        Specified by:
        deleteCatalog in interface NFEModelIOService
        Parameters:
        catalogId - catalog id
        Throws:
        NFEIOException - if an NFE error occurs.
      • getModelsIdentificators

        public java.util.Map<java.lang.Long,​java.lang.String> getModelsIdentificators()
                                                                                     throws NFEIOException
        Description copied from interface: NFEModelIOService
        Returns a map with identifiers and names of all the existing models.
        Specified by:
        getModelsIdentificators in interface NFEModelIOService
        Returns:
        map with identifiers (key) and names (value) of all the existing models.
        Throws:
        NFEIOException - if an NFE error occurs.
      • getFeatureLayersAttributesUsingCatalog

        public java.util.Map<java.lang.Long,​java.util.Collection<java.lang.String>> getFeatureLayersAttributesUsingCatalog​(long catalogId)
                                                                                                                          throws NFEIOException
        Description copied from interface: NFEModelIOService
        Returns a map with as key the feature layer identifiers and as values the list of attributes using the catalog.
        Specified by:
        getFeatureLayersAttributesUsingCatalog in interface NFEModelIOService
        Parameters:
        catalogId - catalog id
        Returns:
        map with as key the feature layer identifiers and as values the list of attributes using the catalog
        Throws:
        NFEIOException - if an NFE error occurs.
      • persistRules

        public void persistRules​(java.util.Collection<NFEConnectivityRule> newRules,
                                 java.util.Collection<NFEConnectivityRule> deletedRules,
                                 java.util.Collection<NFEConnectivityRule> updatedRules)
                          throws NFEIOException
        Description copied from interface: NFEModelIOService
        Persists the NFE rules. In case of update or delete operations the rule has to be unused by any feature. This implies that no record related to the rule has to be in the table FT_RULE_REL_[model_id]. In case of the line line rules create or update operations the line point rules have to refer to the same point feature including the same attributes conditions if any.
        Specified by:
        persistRules in interface NFEModelIOService
        Parameters:
        newRules - rules to add
        deletedRules - rules to delete
        updatedRules - rules to update
        Throws:
        NFEIOException - if an NFE error occurs.