de.bsvrz.kex.bwsin.konfig.okstra
Class Okstra

java.lang.Object
  extended by de.bsvrz.kex.bwsin.konfig.okstra.Okstra
All Implemented Interfaces:
org.geotools.data.DataStore

public class Okstra
extends Object
implements org.geotools.data.DataStore

Modul OKSTRA.

Version:
$Id: Okstra.java 10427 2008-07-10 12:09:37Z gieseler $
Author:
BitCtrl Systems GmbH, Gieseler

Constructor Summary
Okstra(Properties prop)
          Erzeugt eine Instanz zum Zugriff auf die OKSTRA-Datenbasis.
 
Method Summary
 void createSchema(org.geotools.feature.FeatureType arg0)
          
 org.geotools.feature.Feature findAoA(String iD)
          Findet das 'echte' Feature zu einer Abschnitt-oder-Ast Referenz.
 double getDoubleAttribute(org.geotools.feature.Feature f, String name)
          Gibt ein Attribut eines Features als double-Wert zurück.
 org.geotools.feature.Feature getFeature(OkstraFeature ofeature, String fid)
          Gibt ein Feature eines abgefragten Types zurück.
 org.geotools.feature.Feature getFeature(String ftype, String fid)
          Gibt ein Features eines abgefragten Types zurück.
static de.bsvrz.sys.funclib.bitctrl.geolib.WGS84Polygon getFeatureKoordinatenAlsWGS84Polygon(org.geotools.feature.Feature f)
          Gibt die Koordinatenliste eines Features als WGS84-Polygon zurück.
static com.vividsolutions.jts.geom.Coordinate[] getFeatureKoordinatenWGS84(org.geotools.feature.Feature f)
          Gibt die Koordinatenliste eines Features als WGS84-Koordninaten zurück.
 Map<String,org.geotools.feature.Feature> getFeatureMap(String featuretype)
          Bildet eine Map von Features eines abgefragten Typs.
 org.geotools.data.FeatureReader getFeatureReader(org.geotools.data.Query arg0, org.geotools.data.Transaction arg1)
          
static org.geotools.feature.Feature getFeatureReferenz(Object attribute)
          Extrahiert die Feature-Referenz aus dem XLINK-Attribut und gibt das referenzierte Feature zurück.
 org.geotools.data.FeatureSource getFeatureSource(String arg0)
          
 org.geotools.data.FeatureWriter getFeatureWriter(String arg0, org.geotools.filter.Filter arg1, org.geotools.data.Transaction arg2)
          
 org.geotools.data.FeatureWriter getFeatureWriter(String arg0, org.geotools.data.Transaction arg1)
          
 org.geotools.data.FeatureWriter getFeatureWriterAppend(String arg0, org.geotools.data.Transaction arg1)
          
static Okstra getInstance()
          Gibt die Instanz auf das OKSTRA-Objekt zurück.
static int getIntAttribute(org.geotools.feature.Feature f, String name)
          Gibt ein ganzzahliges Attribut eines Features zurück.
 org.geotools.data.LockingManager getLockingManager()
          
static String getRefFeatureId(String xpath)
          Extrahiert die Feature-ID aus dem XPATH-Attribut und gibt diese als String zurück.
static String getRefFeatureType(String xpath)
          Extrahiert den Feature-Typ aus dem XPATH-Attribut und gibt diesen als String zurück.
 org.geotools.feature.FeatureType getSchema(String arg0)
          
 String getSpecialAttribute(OkstraFeature of, String fid, String attname)
          Spezialfunktion zum Lesen von Attributen, die von GeoTools nicht bereitgestellt werden können.
 String getSpecialAttribute2(OkstraFeature of, String fid, String attname)
          Spezialfunktion zum Lesen von Attributen, die von GeoTools nicht bereitgestellt werden können.
 Object[] getSpecialAttributeList(OkstraFeature of, String fid, String attname)
          Spezialfunktion zum Lesen von mehreren Attributen zum gleichen Namen, die von GeoTools nicht bereitgestellt werden können.
 Object[] getSpecialAttributeList2(OkstraFeature of, String fid, String attname)
          Spezialfunktion zum Lesen von mehreren Attributen zum gleichen Namen, die von GeoTools nicht bereitgestellt werden können.
 String[] getTypeNames()
          
 org.geotools.data.FeatureSource getView(org.geotools.data.Query arg0)
          
 void updateSchema(String arg0, org.geotools.feature.FeatureType arg1)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Okstra

public Okstra(Properties prop)
       throws ImportException
Erzeugt eine Instanz zum Zugriff auf die OKSTRA-Datenbasis.

Parameters:
prop - Properties
Throws:
ImportException - bei Ausnahmen
Method Detail

getFeatureKoordinatenAlsWGS84Polygon

public static de.bsvrz.sys.funclib.bitctrl.geolib.WGS84Polygon getFeatureKoordinatenAlsWGS84Polygon(org.geotools.feature.Feature f)
Gibt die Koordinatenliste eines Features als WGS84-Polygon zurück.

Parameters:
f - Feature
Returns:
WGS84Polygon

getFeatureKoordinatenWGS84

public static com.vividsolutions.jts.geom.Coordinate[] getFeatureKoordinatenWGS84(org.geotools.feature.Feature f)
Gibt die Koordinatenliste eines Features als WGS84-Koordninaten zurück.

Parameters:
f - Feature
Returns:
Array von Koordinaten

getFeatureReferenz

public static org.geotools.feature.Feature getFeatureReferenz(Object attribute)
                                                       throws ImportException
Extrahiert die Feature-Referenz aus dem XLINK-Attribut und gibt das referenzierte Feature zurück.

Parameters:
attribute - ein eine Feature-Referenz enthaltendes Feature-Attribut
Returns:
Feature
Throws:
ImportException - bei Ausnahmen

getInstance

public static Okstra getInstance()
Gibt die Instanz auf das OKSTRA-Objekt zurück.

Returns:
Instanz

getIntAttribute

public static int getIntAttribute(org.geotools.feature.Feature f,
                                  String name)
                           throws IllegalAttributeConversionException
Gibt ein ganzzahliges Attribut eines Features zurück.

Parameters:
f - Feature
name - Name des Attributes
Returns:
Wert
Throws:
IllegalAttributeConversionException - wenn der Wert des Attributes nicht in eine Ganzzahl konvertiert werden kann

getRefFeatureId

public static String getRefFeatureId(String xpath)
Extrahiert die Feature-ID aus dem XPATH-Attribut und gibt diese als String zurück.

Parameters:
xpath - ein eine Feature-Referenz enthaltendes Feature-Attribut
Returns:
der referenzierte Feature-Typ

getRefFeatureType

public static String getRefFeatureType(String xpath)
Extrahiert den Feature-Typ aus dem XPATH-Attribut und gibt diesen als String zurück.

Parameters:
xpath - ein eine Feature-Referenz enthaltendes Feature-Attribut
Returns:
der referenzierte Feature-Typ

createSchema

public void createSchema(org.geotools.feature.FeatureType arg0)
                  throws IOException

Specified by:
createSchema in interface org.geotools.data.DataStore
Throws:
IOException
See Also:
DataStore.createSchema(org.geotools.feature.FeatureType)

findAoA

public org.geotools.feature.Feature findAoA(String iD)
                                     throws ImportException
Findet das 'echte' Feature zu einer Abschnitt-oder-Ast Referenz.

Parameters:
iD - Abschnitt-oder-Ast
Returns:
Abschnitt- bzw. Ast-Feature
Throws:
ImportException - bei Ausnahmen

getDoubleAttribute

public double getDoubleAttribute(org.geotools.feature.Feature f,
                                 String name)
                          throws IllegalAttributeConversionException
Gibt ein Attribut eines Features als double-Wert zurück.

Parameters:
f - Feature
name - Name des Attributes
Returns:
Wert
Throws:
IllegalAttributeConversionException - wenn der Wert des Attributes nicht in double konvertiert werden kann

getFeature

public org.geotools.feature.Feature getFeature(OkstraFeature ofeature,
                                               String fid)
                                        throws ImportException
Gibt ein Feature eines abgefragten Types zurück.

Parameters:
ofeature - das abzufragende Feature
fid - Feature-ID
Returns:
Feature
Throws:
ImportException - bei Ausnahmen

getFeature

public org.geotools.feature.Feature getFeature(String ftype,
                                               String fid)
                                        throws ImportException
Gibt ein Features eines abgefragten Types zurück.

Parameters:
ftype - der Name des Feature-Typs
fid - Feature-ID
Returns:
Feature
Throws:
ImportException - bei Ausnahmen

getFeatureMap

public Map<String,org.geotools.feature.Feature> getFeatureMap(String featuretype)
                                                       throws ImportException
Bildet eine Map von Features eines abgefragten Typs.

Parameters:
featuretype - der abgefragte Feature-Typ
Returns:
Feature-Tabelle
Throws:
ImportException - bei Ausnahmen

getFeatureReader

public org.geotools.data.FeatureReader getFeatureReader(org.geotools.data.Query arg0,
                                                        org.geotools.data.Transaction arg1)
                                                 throws IOException

Specified by:
getFeatureReader in interface org.geotools.data.DataStore
Throws:
IOException
See Also:
DataStore.getFeatureReader(org.geotools.data.Query, org.geotools.data.Transaction)

getFeatureSource

public org.geotools.data.FeatureSource getFeatureSource(String arg0)
                                                 throws IOException

Specified by:
getFeatureSource in interface org.geotools.data.DataStore
Throws:
IOException
See Also:
DataStore.getFeatureSource(java.lang.String)

getFeatureWriter

public org.geotools.data.FeatureWriter getFeatureWriter(String arg0,
                                                        org.geotools.filter.Filter arg1,
                                                        org.geotools.data.Transaction arg2)
                                                 throws IOException

Specified by:
getFeatureWriter in interface org.geotools.data.DataStore
Throws:
IOException
See Also:
DataStore.getFeatureWriter(java.lang.String, org.geotools.filter.Filter, org.geotools.data.Transaction)

getFeatureWriter

public org.geotools.data.FeatureWriter getFeatureWriter(String arg0,
                                                        org.geotools.data.Transaction arg1)
                                                 throws IOException

Specified by:
getFeatureWriter in interface org.geotools.data.DataStore
Throws:
IOException
See Also:
DataStore.getFeatureWriter(java.lang.String, org.geotools.data.Transaction)

getFeatureWriterAppend

public org.geotools.data.FeatureWriter getFeatureWriterAppend(String arg0,
                                                              org.geotools.data.Transaction arg1)
                                                       throws IOException

Specified by:
getFeatureWriterAppend in interface org.geotools.data.DataStore
Throws:
IOException
See Also:
DataStore.getFeatureWriterAppend(java.lang.String, org.geotools.data.Transaction)

getLockingManager

public org.geotools.data.LockingManager getLockingManager()

Specified by:
getLockingManager in interface org.geotools.data.DataStore
See Also:
DataStore.getLockingManager()

getSchema

public org.geotools.feature.FeatureType getSchema(String arg0)
                                           throws IOException

Specified by:
getSchema in interface org.geotools.data.DataStore
Throws:
IOException
See Also:
DataStore.getSchema(java.lang.String)

getSpecialAttribute

public String getSpecialAttribute(OkstraFeature of,
                                  String fid,
                                  String attname)
Spezialfunktion zum Lesen von Attributen, die von GeoTools nicht bereitgestellt werden können.

Parameters:
of - OKSTRA-Feature
fid - Feature-ID
attname - Attributname
Returns:
Attributwert

getSpecialAttribute2

public String getSpecialAttribute2(OkstraFeature of,
                                   String fid,
                                   String attname)
                            throws ImportException
Spezialfunktion zum Lesen von Attributen, die von GeoTools nicht bereitgestellt werden können.

Parameters:
of - OKSTRA-Feature
fid - Feature-ID
attname - Attributname
Returns:
Attributwert
Throws:
ImportException - bei Ausnahmen

getSpecialAttributeList

public Object[] getSpecialAttributeList(OkstraFeature of,
                                        String fid,
                                        String attname)
Spezialfunktion zum Lesen von mehreren Attributen zum gleichen Namen, die von GeoTools nicht bereitgestellt werden können.

Parameters:
of - OKSTRA-Feature
fid - Feature-ID
attname - Attributname
Returns:
Attributwert

getSpecialAttributeList2

public Object[] getSpecialAttributeList2(OkstraFeature of,
                                         String fid,
                                         String attname)
Spezialfunktion zum Lesen von mehreren Attributen zum gleichen Namen, die von GeoTools nicht bereitgestellt werden können.

Parameters:
of - OKSTRA-Feature
fid - Feature-ID
attname - Attributname
Returns:
Attributwert

getTypeNames

public String[] getTypeNames()
                      throws IOException

Specified by:
getTypeNames in interface org.geotools.data.DataStore
Throws:
IOException
See Also:
DataStore.getTypeNames()

getView

public org.geotools.data.FeatureSource getView(org.geotools.data.Query arg0)
                                        throws IOException,
                                               org.geotools.feature.SchemaException

Specified by:
getView in interface org.geotools.data.DataStore
Throws:
IOException
org.geotools.feature.SchemaException
See Also:
DataStore.getView(org.geotools.data.Query)

updateSchema

public void updateSchema(String arg0,
                         org.geotools.feature.FeatureType arg1)
                  throws IOException

Specified by:
updateSchema in interface org.geotools.data.DataStore
Throws:
IOException
See Also:
DataStore.updateSchema(java.lang.String, org.geotools.feature.FeatureType)