Class JDBCModelIOService
- java.lang.Object
-
- oracle.spatial.network.nfe.io.jdbc.service.JDBCAbstractIOService
-
- oracle.spatial.network.nfe.io.jdbc.service.JDBCModelIOService
-
- All Implemented Interfaces:
NFEIOService,NFEModelIOService
public class JDBCModelIOService extends JDBCAbstractIOService implements NFEModelIOService
Provides the default implementation for the model service.
-
-
Constructor Summary
Constructors Constructor Description JDBCModelIOService(NFEIOServiceProvider serviceProvider)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NFEFeatureLayercreateFeatureLayer(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)Creates a feature layer.NFEModelcreateFromScratchModel(java.lang.String modelName, boolean directedNetwork, NFEGeometryDescriptor geomDescriptor)Creates a model in from scratch mode.NFEModelcreateOverExistingNetworkModel(java.lang.String modelName, java.lang.String networkName)Creates a model in from existing network mode.voiddeleteCatalog(long catalogId)Deletes the specified catalog.voiddeleteFeatureClass(NFEFeatureClass featClass)Deletes the feature class.voiddeleteFeatureLayer(NFEFeatureLayer featLayer)Deletes the feature layer.voiddeleteFeatureLayerAttributes(NFEFeatureLayer featLayer, java.util.Collection<NFEAttributeDescriptor> attrDescriptors)Deletes the feature layer attributes.voiddeleteModel()Deletes the model.voidenableAnalysisInModel()Enables the analysis searching creating the path layer.java.util.Collection<NFECatalog>getCatalogs()Returns all the catalogs related to the model.java.util.Map<java.lang.Long,java.util.Collection<java.lang.String>>getFeatureLayersAttributesUsingCatalog(long catalogId)Returns a map with as key the feature layer identifiers and as values the list of attributes using the catalog.java.util.Map<java.lang.Long,java.lang.String>getModelsIdentificators()Returns a map with identifiers and names of all the existing models.NFEModelloadModel(java.lang.String modelName)Loads the NFE model.voidpersistCatalog(NFECatalog catalog)Persists a catalog.voidpersistFeatureClass(NFEFeatureClass featClass)Persists a feature class.voidpersistFeatureLayerAttributes(NFEFeatureLayer featLayer, java.util.Collection<NFEAttributeDescriptor> attrDescriptors)Persists the feature layer attributes.voidpersistRules(java.util.Collection<NFEConnectivityRule> newRules, java.util.Collection<NFEConnectivityRule> deletedRules, java.util.Collection<NFEConnectivityRule> updatedRules)Persists the NFE rules.longregisterRuleHandler(java.lang.String handlerFQClassName, NFEConnectivityRule.ConnectivityRuleType ruleType)Registers the rule handler for the specified rule.voidupdateAttributeConstraints(java.lang.Long featureClassId, java.lang.String attributeName, java.lang.String newValue)Updates the attribute default value for the specified feature class.voidupdateCatalog(NFECatalog catalog)Updates the catalog values of the specified catalog.voidupdateFeatureClass(NFEFeatureClass featClass)Updates the feature class.voidupdateFeatureLayersZOrder(java.util.Collection<NFEFeatureLayer> featLayers)Updates the feature layers Z-order.-
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
-
JDBCModelIOService
public JDBCModelIOService(NFEIOServiceProvider serviceProvider)
-
-
Method Detail
-
createFromScratchModel
public NFEModel createFromScratchModel(java.lang.String modelName, boolean directedNetwork, NFEGeometryDescriptor geomDescriptor) throws NFEIOException
Description copied from interface:NFEModelIOServiceCreates 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:
createFromScratchModelin interfaceNFEModelIOService- Parameters:
modelName- NFE model namedirectedNetwork- true if the network to create has to be directed, false otherwisegeomDescriptor- 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:NFEModelIOServiceCreates 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:
createOverExistingNetworkModelin interfaceNFEModelIOService- Parameters:
modelName- model namenetworkName- 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:NFEModelIOServiceCreates a feature layer. Version disable the model before to execute this function (NFEWorkspaceIOService.disableAllVersioning) and reload the model after to execute it.- Specified by:
createFeatureLayerin interfaceNFEModelIOService- Parameters:
featureLayerName- feature layer namefeatureTable- feature tablerelationTable- relation tablehierarchyTable- hierarchy tableattrDescriptors- attributes descriptorshierarchyLevel- hierarchy level of the feature layerzOrder- 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 NFEIOExceptionDescription copied from interface:NFEModelIOServiceEnables 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:
enableAnalysisInModelin interfaceNFEModelIOService- Throws:
NFEIOException
-
loadModel
public NFEModel loadModel(java.lang.String modelName) throws NFEIOException
Description copied from interface:NFEModelIOServiceLoads the NFE model. Note that the metadata and information about the feature layers will loaded but not the related features.- Specified by:
loadModelin interfaceNFEModelIOService- 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:NFEModelIOServicePersists a feature class. Version disable the model before to execute this function (NFEWorkspaceIOService.disableAllVersioning) and reload the model after to execute it.- Specified by:
persistFeatureClassin interfaceNFEModelIOService- Parameters:
featClass- feature class- Throws:
NFEIOException- if an NFE error occurs.
-
persistFeatureLayerAttributes
public void persistFeatureLayerAttributes(NFEFeatureLayer featLayer, java.util.Collection<NFEAttributeDescriptor> attrDescriptors) throws NFEIOException
Description copied from interface:NFEModelIOServicePersists the feature layer attributes. Version disable the model before to execute this function (NFEWorkspaceIOService.disableAllVersioning) and reload the model after to execute it.- Specified by:
persistFeatureLayerAttributesin interfaceNFEModelIOService- Parameters:
featLayer- feature layerattrDescriptors- attributes descriptors- Throws:
NFEIOException- if an NFE error occurs.
-
persistCatalog
public void persistCatalog(NFECatalog catalog) throws NFEIOException
Description copied from interface:NFEModelIOServicePersists a catalog.- Specified by:
persistCatalogin interfaceNFEModelIOService- Parameters:
catalog- catalog- Throws:
NFEIOException- if an NFE error occurs.
-
updateFeatureLayersZOrder
public void updateFeatureLayersZOrder(java.util.Collection<NFEFeatureLayer> featLayers) throws NFEIOException
Description copied from interface:NFEModelIOServiceUpdates the feature layers Z-order. The Z-order determines which feature layer appears on top of the other.- Specified by:
updateFeatureLayersZOrderin interfaceNFEModelIOService- Parameters:
featLayers- feature layers to update- Throws:
NFEIOException- if an NFE error occurs.
-
updateFeatureClass
public void updateFeatureClass(NFEFeatureClass featClass) throws NFEIOException
Description copied from interface:NFEModelIOServiceUpdates 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:
updateFeatureClassin interfaceNFEModelIOService- 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 NFEIOExceptionDescription copied from interface:NFEModelIOServiceUpdates 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:
updateAttributeConstraintsin interfaceNFEModelIOService- Parameters:
featureClassId- feature class idattributeName- attribute namenewValue- new attribute default value- Throws:
NFEIOException- if an NFE error occurs.
-
updateCatalog
public void updateCatalog(NFECatalog catalog) throws NFEIOException
Description copied from interface:NFEModelIOServiceUpdates 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:
updateCatalogin interfaceNFEModelIOService- Parameters:
catalog- catalog- Throws:
NFEIOException- if an NFE error occurs.
-
deleteModel
public void deleteModel() throws NFEIOExceptionDescription copied from interface:NFEModelIOServiceDeletes the model. Use carefully since this function will delete all the feature layers, tables and the network related to the model.- Specified by:
deleteModelin interfaceNFEModelIOService- Throws:
NFEIOException- if an NFE error occurs.
-
deleteFeatureLayer
public void deleteFeatureLayer(NFEFeatureLayer featLayer) throws NFEIOException
Description copied from interface:NFEModelIOServiceDeletes 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:
deleteFeatureLayerin interfaceNFEModelIOService- Parameters:
featLayer- feature layer- Throws:
NFEIOException- if an NFE error occurs.
-
deleteFeatureClass
public void deleteFeatureClass(NFEFeatureClass featClass) throws NFEIOException
Description copied from interface:NFEModelIOServiceDeletes 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:
deleteFeatureClassin interfaceNFEModelIOService- Parameters:
featClass- feature class- Throws:
NFEIOException- if an NFE error occurs.
-
deleteFeatureLayerAttributes
public void deleteFeatureLayerAttributes(NFEFeatureLayer featLayer, java.util.Collection<NFEAttributeDescriptor> attrDescriptors) throws NFEIOException
Description copied from interface:NFEModelIOServiceDeletes the feature layer attributes. Version disable the model before to execute this function (NFEWorkspaceIOService.disableAllVersioning) and reload the model after to execute it.- Specified by:
deleteFeatureLayerAttributesin interfaceNFEModelIOService- Parameters:
featLayer- feature layerattrDescriptors- attributes to delete- Throws:
NFEIOException- if an NFE error occurs.
-
deleteCatalog
public void deleteCatalog(long catalogId) throws NFEIOExceptionDescription copied from interface:NFEModelIOServiceDeletes the specified catalog. The function getFeatureLayersAttributesUsingCatalog can be used to ensure that the catalog is not in use.- Specified by:
deleteCatalogin interfaceNFEModelIOService- Parameters:
catalogId- catalog id- Throws:
NFEIOException- if an NFE error occurs.
-
getModelsIdentificators
public java.util.Map<java.lang.Long,java.lang.String> getModelsIdentificators() throws NFEIOExceptionDescription copied from interface:NFEModelIOServiceReturns a map with identifiers and names of all the existing models.- Specified by:
getModelsIdentificatorsin interfaceNFEModelIOService- Returns:
- map with identifiers (key) and names (value) of all the existing models.
- Throws:
NFEIOException- if an NFE error occurs.
-
getCatalogs
public java.util.Collection<NFECatalog> getCatalogs() throws NFEIOException
Description copied from interface:NFEModelIOServiceReturns all the catalogs related to the model.- Specified by:
getCatalogsin interfaceNFEModelIOService- Returns:
- all the catalogs related to the model
- 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 NFEIOExceptionDescription copied from interface:NFEModelIOServiceReturns a map with as key the feature layer identifiers and as values the list of attributes using the catalog.- Specified by:
getFeatureLayersAttributesUsingCatalogin interfaceNFEModelIOService- 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:NFEModelIOServicePersists 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:
persistRulesin interfaceNFEModelIOService- Parameters:
newRules- rules to adddeletedRules- rules to deleteupdatedRules- rules to update- Throws:
NFEIOException- if an NFE error occurs.
-
registerRuleHandler
public long registerRuleHandler(java.lang.String handlerFQClassName, NFEConnectivityRule.ConnectivityRuleType ruleType) throws NFEIOExceptionDescription copied from interface:NFEModelIOServiceRegisters the rule handler for the specified rule.- Specified by:
registerRuleHandlerin interfaceNFEModelIOService- Parameters:
handlerFQClassName- rule handler full qualified class nameruleType- type of rule the handler is for- Returns:
- the id of the registered rule handler
- Throws:
NFEIOException- if an NFE error occurs.
-
-