public class H2FeatureServiceFactory extends JDBCFeatureFactory
| Modifier and Type | Class and Description |
|---|---|
static class |
H2FeatureServiceFactory.NegativeValueException
DOCUMENT ME!
|
FeatureFactory.TooManyFeaturesException| Modifier and Type | Field and Description |
|---|---|
static String |
DB_NAME |
static String |
DEFAULT_DBF_CHARSET |
protected Vector<FeatureServiceAttribute> |
featureServiceAttributes |
static String |
LOCK_TABLE_NAME |
static String |
LR_META_TABLE_NAME |
static String |
META_TABLE_ATTRIBUTES_NAME |
static String |
META_TABLE_NAME |
static String |
SLD_TABLE_NAME |
static String |
SORT_TABLE_NAME |
static int |
STATION |
static int |
STATION_LINE |
crs, databasePath, envelope, tableNameDEBUG, groovyShell, ID, lastCreatedfeatureVector, lastGeom, lastQuery, layerName, layerProperties, logger, maxFeatureCount, styles| Constructor and Description |
|---|
H2FeatureServiceFactory(H2FeatureServiceFactory hff)
Creates a new H2FeatureServiceFactory object.
|
H2FeatureServiceFactory(String name,
String databasePath,
String tableName,
File file,
SwingWorker workerThread,
Map<String,LinkedList<org.deegree.style.se.unevaluated.Style>> styles)
Creates a new H2FeatureServiceFactory object.
|
H2FeatureServiceFactory(String name,
String databasePath,
String tableName,
List<FeatureServiceFeature> featureList,
List<String> orderedAttributeList,
SwingWorker workerThread,
Map<String,LinkedList<org.deegree.style.se.unevaluated.Style>> styles)
Creates a new H2FeatureServiceFactory object.
|
H2FeatureServiceFactory(String name,
String databasePath,
String tableName,
List<FeatureServiceFeature> featureList,
SwingWorker workerThread,
Map<String,LinkedList<org.deegree.style.se.unevaluated.Style>> styles)
Creates a new H2FeatureServiceFactory object.
|
| Modifier and Type | Method and Description |
|---|---|
AbstractFeatureFactory |
clone()
DOCUMENT ME!
|
void |
closeConnection()
DOCUMENT ME!
|
List |
createAttributes(SwingWorker workerThread)
Method that does not create FeatureServiceAttributes.
|
List |
createFeatures(Object query,
BoundingBox boundingBox,
SwingWorker workerThread)
Returns instances of features
FT that match the optional query and that fall into the optional
BoundingBox.Applies layerProperties (if set) on all Features (if the type of the feature implements the interface InheritsLayerProperties). |
List |
createFeatures(Object query,
BoundingBox boundingBox,
SwingWorker workerThread,
int offset,
int limit,
FeatureServiceAttribute[] orderBy)
Returns instances of features
FT that match the optional query and that fall into the optional
BoundingBox.Applies layerProperties (if set) on all Features (if the type of the feature implements the interface InheritsLayerProperties). |
H2AttributeTableRuleSet |
createH2AttributeTableRuleSet()
The properties linRefList, geometryType and featureServiceAttributes must be filled, when this method is called.
|
void |
createLinearReferencingLayer(String fromField,
String tillField,
String routeField,
String routeJoinField,
AbstractFeatureService routeService,
String layerName,
String domain,
String newTableName)
Adds the geometries for linear referenced values to the service.
|
static void |
createLockTableIfNotExist()
Creates the meta table for linear referencing, if it does not exist.
|
FeatureServiceFeature |
createNewFeature()
This method must be implemented, if
AbstractFeatureService.isEditable(). |
void |
createPointGeometryLayer(String xField,
String yField,
String newTableName)
Adds point geometries to the service.
|
static void |
createSortMetaTableIfNotExist()
Creates the meta table for linear referencing, if it does not exist.
|
static org.h2gis.utilities.wrapper.StatementWrapper |
createStatement(org.h2gis.utilities.wrapper.ConnectionWrapper conn)
Creates a new statement on the givven connection.
|
void |
determineEnvelope()
DOCUMENT ME!
|
protected void |
finalize() |
static org.h2gis.utilities.wrapper.ConnectionWrapper |
getDBConnection(String databasePath)
Creates a connection to the internal database.
|
int |
getFeatureCount(Object query,
BoundingBox bb)
DOCUMENT ME!
|
String |
getGeometryType()
DOCUMENT ME!
|
String |
getIdField()
Returns the name of the field, that contains the id.
|
List<LinearReferencingInfo> |
getLinRefList()
DOCUMENT ME!
|
static void |
initDatabase(org.h2gis.utilities.wrapper.ConnectionWrapper conn)
Initialises the database, if this was not already happen.
|
protected boolean |
isGenerateIds()
Determines if the service automatically generates unique IDs for all queryable features.
|
static void |
main(String[] args)
DOCUMENT ME!
|
void |
setFile(File file)
Imports the given file and assign it to the layer.
|
void |
setLayerProperties(LayerProperties layerProperties)
Sets the layerProperties that are applied to all features constructed.
|
void |
setTableFormat(String tableFormat)
DOCUMENT ME!
|
void |
setTableName(String tableName)
DOCUMENT ME!
|
static void |
tryDBConnection(String databasePath)
Tries to create a connection to the internal database.
|
getCrs, getEnvelope, setCrs, setEnvelopecheckCancelled, createFeaturesFromMemory, evaluateBeanShellExpression, evaluateExpressions, evaluateGroovyExpressions, featuresAlreadyInMemory, getLastCreatedFeatures, getLayerProperties, getMaxFeatureCount, getStyle, getStyle, reEvaluteExpressions, setInterruptedAllowed, setInterruptedNotAllowed, setLayerName, setMaxFeatureCount, setSLDStyle, sortFeatureList, updateLastCreatedFeatures, waitUntilInterruptedIsAllowedpublic static final String DEFAULT_DBF_CHARSET
public static final String LR_META_TABLE_NAME
public static final String META_TABLE_NAME
public static final String META_TABLE_ATTRIBUTES_NAME
public static final String SLD_TABLE_NAME
public static final String SORT_TABLE_NAME
public static final String LOCK_TABLE_NAME
public static final int STATION
public static final int STATION_LINE
public static final String DB_NAME
protected Vector<FeatureServiceAttribute> featureServiceAttributes
public H2FeatureServiceFactory(H2FeatureServiceFactory hff)
hff - DOCUMENT ME!public H2FeatureServiceFactory(String name, String databasePath, String tableName, File file, SwingWorker workerThread, Map<String,LinkedList<org.deegree.style.se.unevaluated.Style>> styles) throws Exception
name - DOCUMENT ME!databasePath - DOCUMENT ME!tableName - DOCUMENT ME!file - supported file formats are shp, dbf and csv (really comma separated)workerThread - DOCUMENT ME!styles - DOCUMENT ME!Exception - DOCUMENT ME!public H2FeatureServiceFactory(String name, String databasePath, String tableName, List<FeatureServiceFeature> featureList, SwingWorker workerThread, Map<String,LinkedList<org.deegree.style.se.unevaluated.Style>> styles)
name - DOCUMENT ME!databasePath - DOCUMENT ME!tableName - DOCUMENT ME!featureList - DOCUMENT ME!workerThread - DOCUMENT ME!styles - DOCUMENT ME!public H2FeatureServiceFactory(String name, String databasePath, String tableName, List<FeatureServiceFeature> featureList, List<String> orderedAttributeList, SwingWorker workerThread, Map<String,LinkedList<org.deegree.style.se.unevaluated.Style>> styles)
name - DOCUMENT ME!databasePath - DOCUMENT ME!tableName - DOCUMENT ME!featureList - DOCUMENT ME!orderedAttributeList - DOCUMENT ME!workerThread - DOCUMENT ME!styles - DOCUMENT ME!public void setFile(File file)
file - DOCUMENT ME!public void setTableFormat(String tableFormat)
tableFormat - DOCUMENT ME!public static void initDatabase(org.h2gis.utilities.wrapper.ConnectionWrapper conn)
throws SQLException
conn - the connection to the databaseSQLException - DOCUMENT ME!public static void createSortMetaTableIfNotExist()
throws Exception
Exception - DOCUMENT ME!public static void createLockTableIfNotExist()
throws Exception
Exception - DOCUMENT ME!public void createLinearReferencingLayer(String fromField, String tillField, String routeField, String routeJoinField, AbstractFeatureService routeService, String layerName, String domain, String newTableName)
fromField - The field with the from stationtillField - The field with the till stationrouteField - The field with the route namerouteJoinField - the field of the route service, that is used for the join with this servicerouteService - The service that conains the routeslayerName - The name of the route layerdomain - the domain of the route layernewTableName - DOCUMENT ME!public void createPointGeometryLayer(String xField, String yField, String newTableName) throws H2FeatureServiceFactory.NegativeValueException
xField - The field with the x valueyField - The field with the y valuenewTableName - DOCUMENT ME!H2FeatureServiceFactory.NegativeValueException - DOCUMENT ME!public H2AttributeTableRuleSet createH2AttributeTableRuleSet()
public void setLayerProperties(LayerProperties layerProperties)
FeatureFactorysetLayerProperties in interface FeatureFactorysetLayerProperties in class AbstractFeatureFactorylayerProperties - new LayerPropertiespublic static void main(String[] args)
args - DOCUMENT ME!public static org.h2gis.utilities.wrapper.ConnectionWrapper getDBConnection(String databasePath)
databasePath - the path to the database. if null, DB_NAME will be usedpublic static void tryDBConnection(String databasePath) throws SQLException
databasePath - the path to the database. if null, DB_NAME will be usedSQLException - DOCUMENT ME!public static org.h2gis.utilities.wrapper.StatementWrapper createStatement(org.h2gis.utilities.wrapper.ConnectionWrapper conn)
throws SQLException
conn - the connection, the statement should be created onSQLException - DOCUMENT ME!protected boolean isGenerateIds()
AbstractFeatureFactorytrue, the id expression is not evaluated.isGenerateIds in class AbstractFeatureFactorytrue if the service generates id}public AbstractFeatureFactory clone()
FeatureFactoryclone in interface FeatureFactoryclone in class AbstractFeatureFactorypublic List createFeatures(Object query, BoundingBox boundingBox, SwingWorker workerThread) throws FeatureFactory.TooManyFeaturesException, Exception
FeatureFactoryFT that match the optional query and that fall into the optional
BoundingBox.InheritsLayerProperties). The SwingWorker instance can be used to set the progress of the operation and
to check the worker thread was canceled. The state of the features list after a the operation was canceled is
undefined.query - optional query of type QT to select the features to be returnedboundingBox - optional BoundingBox to restrict the features to be returnedworkerThread - an optional worker thread that is observedFTFeatureFactory.TooManyFeaturesException - if the maximum number of features is reached during processingException - if something went wrong during parsingpublic List createFeatures(Object query, BoundingBox boundingBox, SwingWorker workerThread, int offset, int limit, FeatureServiceAttribute[] orderBy) throws FeatureFactory.TooManyFeaturesException, Exception
FeatureFactoryFT that match the optional query and that fall into the optional
BoundingBox.InheritsLayerProperties). The SwingWorker instance can be used to set the progress of the operation and
to check the worker thread was canceled. The state of the features list after a the operation was canceled is
undefined.query - optional query of type QT to select the features to be returnedboundingBox - optional BoundingBox to restrict the features to be returnedworkerThread - an optional worker thread that is observedoffset - the start indexlimit - a limitorderBy - the attributes, the features should be ordered byFTFeatureFactory.TooManyFeaturesException - if the maximum number of features is reached during processingException - if something went wrong during parsingpublic void setTableName(String tableName)
setTableName in class JDBCFeatureFactorytableName - DOCUMENT ME!public FeatureServiceFeature createNewFeature()
FeatureFactoryAbstractFeatureService.isEditable().createNewFeature in interface FeatureFactorycreateNewFeature in class AbstractFeatureFactorypublic String getIdField()
public void determineEnvelope()
throws Exception
Exception - DOCUMENT ME!public List createAttributes(SwingWorker workerThread) throws FeatureFactory.TooManyFeaturesException, UnsupportedOperationException, Exception
FeatureFactoryworkerThread - DOCUMENT ME!FeatureFactory.TooManyFeaturesException - if the maximum number of features is reached during processingUnsupportedOperationException - if the factory does not support the creation attributesException - if something went wrong during parsingpublic int getFeatureCount(Object query, BoundingBox bb)
FeatureFactoryquery - DOCUMENT ME!bb - DOCUMENT ME!protected void finalize()
throws Throwable
public void closeConnection()
public List<LinearReferencingInfo> getLinRefList()
public String getGeometryType()
Copyright © 2012–2025 cismet GmbH. All rights reserved.