public class FeatureDAO extends AbstractDAO
Constructor and Description |
---|
FeatureDAO(java.sql.Connection conn, NFEModel model)
Creates a FeatureDAO with the specified connection and model.
|
Modifier and Type | Method and Description |
---|---|
void |
deleteDanglingFeatureElements(NFEFeatureLayerMetadata metadata)
Deletes feature elements that refer to features that do not exist.
|
void |
deleteFeatureElements(java.util.Collection<NFEFeatureElement> featElems)
Deletes the feature elements from the feature element relationship table.
|
void |
deleteFeatureParentRelationship(NFEFeature feature)
Deletes the feature parent relationship where the feature is parent or child.
|
void |
deleteFeatures(java.util.Collection<NFEFeature> features)
Deletes the features in the feature and hierarchy tables, also deletes the record in the feature class relationship table.
|
java.util.Collection<NFEAttributeDescriptor> |
fetchFeatureLayerAttributeDescriptors(NFEFeatureLayerMetadata featLayerMetadata)
Fetches the attribute descriptors of the specified feature layer.
|
java.util.Collection<NFEFeatureLayerMetadata> |
fetchFeatureLayersMetadata(NFEModelMetadata modelMetadata, java.util.Collection<java.lang.Long> featLayerIds)
Fetches the metadata of the specified feature layers.
|
java.util.List<java.lang.Long> |
findFeaturesIds(NFEModelMetadata nfeModelMetadata, NFESearchParams searchParams)
Searches features.
|
java.util.List<FeatureAttributeDescriptor> |
getAttributesPerFeature(NFEFeatureLayer nfeFeatureLayer, java.lang.Long featureId)
Returns the workspace attribute descriptors related to the specified feature.
|
java.util.List<NFEFeature> |
getChildFeatures(NFEModel nfeModel, NFEFeature nfeFeature)
Returns the children of the specified feature.
|
java.lang.Long |
getFeatureClassIdOfFeature(NFEModelMetadata nfeModelMetadata, java.lang.Long featureId, java.util.Collection<NFEFeatureClass> featureClasses)
Returns the feature class identifier of the specified feature
|
java.lang.String |
getParentForFeature(NFEFeatureLayer nfeFeatureLayer, java.lang.Long featureId)
Returns the value of the column NFE_PARENT$ and NFE_PARENT_LAYER$ that is in the feature table.
|
java.util.List<java.lang.Long> |
getRelatedLinkIdsForFeature(NFEFeatureLayer featureLayer, java.lang.Long featureId)
Returns the links identifiers of links related to the feature.
|
java.util.List<java.lang.Long> |
getRelatedNodeIdsForFeature(NFEFeatureLayer featureLayer, java.lang.Long featureId)
Returns the nodes identifiers of the nodes related to the feature.
|
void |
loadFeatureClasses(NFEFeatureLayer featLayer)
Loads the feature classes of the specified feature layer.
|
void |
loadFeatureLayerContent(NFEFeatureLayer featLayer, java.util.Collection<NFENetworkElement> netElements)
Loads the features and rules instances related to the specified feature layer and network elements.
|
java.util.List<NFEFeature> |
loadNetElementFeatures(NFEFeatureLayer featureLayer, NFENetworkElement networkElement)
Loads the features related to the specified network element.
|
void |
saveFeatureElements(java.util.Collection<NFEFeatureElement> featElems)
Saves the new feature elements in the feature element relationship table.
|
void |
saveFeatures(java.util.Collection<NFEFeature> features)
Saves the new features in the feature and hierarchy tables, also creates a record in the feature class relationship table.
|
void |
updateAttributeForFeatures(NFEModelMetadata nfeModelMetadata, NFEFeatureLayer nfeFeatureLayer, java.lang.Long featureClassId, java.lang.String attributeName, java.lang.String newValue, java.lang.String oldValue)
Updates the attributes for the features having the value oldValue and belonging to the specified feature class to newValue.
|
void |
updateFeatureElements(java.util.Collection<NFEFeatureElement> featElems)
Updates the feature elements in the feature element relationship table.
|
void |
updateFeatureHierarchy(NFEFeature feature)
Updates the feature hierarchy in the feature and hierarchy tables.
|
void |
updateFeatures(java.util.Collection<NFEFeature> features)
Updates the features attributes and parents information.
|
getConnection, getModel, getSQLValidator
public FeatureDAO(java.sql.Connection conn, NFEModel model)
conn
- connectionmodel
- modelpublic void saveFeatures(java.util.Collection<NFEFeature> features) throws NFEIOException
features
- featuresNFEIOException
- if an NFE error occurs.public void updateFeatures(java.util.Collection<NFEFeature> features) throws NFEIOException
features
- featuresNFEIOException
- if an NFE error occurs.public void deleteFeatures(java.util.Collection<NFEFeature> features) throws NFEIOException
features
- featuresNFEIOException
- if an NFE error occurs.public void saveFeatureElements(java.util.Collection<NFEFeatureElement> featElems) throws NFEIOException
featElems
- feature elementsNFEIOException
- if an NFE error occurs.public void updateFeatureElements(java.util.Collection<NFEFeatureElement> featElems) throws NFEIOException
featElems
- feature elementsNFEIOException
- if an NFE error occurs.public void deleteFeatureElements(java.util.Collection<NFEFeatureElement> featElems) throws NFEIOException
featElems
- feature elementsNFEIOException
- if an NFE error occurs.public void loadFeatureLayerContent(NFEFeatureLayer featLayer, java.util.Collection<NFENetworkElement> netElements) throws NFEIOException
featLayer
- feature layernetElements
- network elementsNFEIOException
- if an NFE error occurs.public java.util.Collection<NFEFeatureLayerMetadata> fetchFeatureLayersMetadata(NFEModelMetadata modelMetadata, java.util.Collection<java.lang.Long> featLayerIds) throws NFEIOException
modelMetadata
- model metadatafeatLayerIds
- feature layers identifiersNFEIOException
- if an NFE error occurs.public java.util.Collection<NFEAttributeDescriptor> fetchFeatureLayerAttributeDescriptors(NFEFeatureLayerMetadata featLayerMetadata) throws NFEIOException
featLayerMetadata
- feature layer metadataNFEIOException
- if an NFE error occurs.public void loadFeatureClasses(NFEFeatureLayer featLayer) throws NFEIOException
featLayer
- feature layerNFEIOException
- if an NFE error occurs.public java.lang.Long getFeatureClassIdOfFeature(NFEModelMetadata nfeModelMetadata, java.lang.Long featureId, java.util.Collection<NFEFeatureClass> featureClasses) throws NFEIOException
nfeModelMetadata
- model metadatafeatureId
- feature idfeatureClasses
- the possible feature class the feature could belong to (should be all the feature class of the feature layer the features belongs to)NFEIOException
- if an NFE error occurs.public java.util.List<java.lang.Long> getRelatedNodeIdsForFeature(NFEFeatureLayer featureLayer, java.lang.Long featureId) throws NFEIOException
featureLayer
- feature layerfeatureId
- feature identifierNFEIOException
- if an NFE error occurs.public java.util.List<java.lang.Long> getRelatedLinkIdsForFeature(NFEFeatureLayer featureLayer, java.lang.Long featureId) throws NFEIOException
featureLayer
- feature layerfeatureId
- feature identifierNFEIOException
- if an NFE error occurs.public java.util.List<NFEFeature> loadNetElementFeatures(NFEFeatureLayer featureLayer, NFENetworkElement networkElement) throws NFEIOException
featureLayer
- feature layer of the featurenetworkElement
- network elementNFEIOException
- if an NFE error occurs.public java.util.List<FeatureAttributeDescriptor> getAttributesPerFeature(NFEFeatureLayer nfeFeatureLayer, java.lang.Long featureId) throws NFEIOException
nfeFeatureLayer
- feature layer of the featurefeatureId
- feature identifierNFEIOException
- if an NFE error occurs.public java.lang.String getParentForFeature(NFEFeatureLayer nfeFeatureLayer, java.lang.Long featureId) throws NFEIOException
nfeFeatureLayer
- feature layer of the featurefeatureId
- feature identifierNFEIOException
- if an NFE error occurs.public void deleteFeatureParentRelationship(NFEFeature feature) throws NFEIOException
feature
- featureNFEIOException
- if an NFE error occurs.public void updateFeatureHierarchy(NFEFeature feature) throws NFEIOException
feature
- featureNFEIOException
- if an NFE error occurs.public java.util.List<NFEFeature> getChildFeatures(NFEModel nfeModel, NFEFeature nfeFeature) throws NFEIOException
nfeModel
- modelnfeFeature
- featureNFEIOException
- if an NFE error occurs.public java.util.List<java.lang.Long> findFeaturesIds(NFEModelMetadata nfeModelMetadata, NFESearchParams searchParams) throws NFEIOException
nfeModelMetadata
- model metadatasearchParams
- search parametersNFEIOException
- if an NFE error occurs.public void deleteDanglingFeatureElements(NFEFeatureLayerMetadata metadata) throws NFEIOException
metadata
- feature layer metadataNFEIOException
- if an NFE error occurs.public void updateAttributeForFeatures(NFEModelMetadata nfeModelMetadata, NFEFeatureLayer nfeFeatureLayer, java.lang.Long featureClassId, java.lang.String attributeName, java.lang.String newValue, java.lang.String oldValue) throws NFEIOException
nfeModelMetadata
- model metadatanfeFeatureLayer
- feature layerfeatureClassId
- feature class identifierattributeName
- attribute namenewValue
- new valueoldValue
- old valueNFEIOException
- if an NFE error occurs.