|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.geotools.data.AbstractAttributeIO
org.geotools.data.jdbc.WKTAttributeIO
An attribute reader/writer for well known text. For now this just reads well known text in result sets, but if there are other cases of wkt that are not in databases we can rethink or adapt this class to them. Result sets should call AsText() when requesting the results, to put it into wkt.
Inserts will not work, should be overriden by the FeatureWriter using this, to make the sql call directly, since right now we can not get resultSet.updateString/Object to work on a geometry.
Field Summary |
Fields inherited from class org.geotools.data.AbstractAttributeIO |
metaData |
Constructor Summary | |
WKTAttributeIO(JDBCDataStore.QueryData queryData,
AttributeType metadata,
int columnIndex)
|
Method Summary | |
void |
close()
Release any resources associated with this reader |
protected java.lang.String |
formatValue(java.lang.Object value)
|
boolean |
hasNext()
Query whether there are other rows in the attribute writer. |
void |
next()
Advance the AttributeWriter, all calls to write will correspond to the same set of attributes until next is called again. |
void |
queryDataClosed(JDBCDataStore.QueryData queryData)
|
java.lang.Object |
read(int i)
Read the attribute at the given index. |
void |
rowDeleted(JDBCDataStore.QueryData queryData)
|
void |
write(int position,
java.lang.Object attribute)
Write the given attribute value at the position indicated. |
Methods inherited from class org.geotools.data.AbstractAttributeIO |
copy, getAttributeCount, getAttributeType |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.geotools.data.AttributeWriter |
getAttributeCount, getAttributeType |
Methods inherited from interface org.geotools.data.AttributeReader |
getAttributeCount, getAttributeType |
Constructor Detail |
public WKTAttributeIO(JDBCDataStore.QueryData queryData, AttributeType metadata, int columnIndex)
Method Detail |
public void close() throws java.io.IOException
AttributeReader
close
in interface AttributeWriter
java.io.IOException
public boolean hasNext() throws java.io.IOException
AttributeWriter
hasNext
in interface AttributeWriter
java.io.IOException
FeatureWriter.hasNext()
public void next() throws java.io.IOException
AttributeWriter
next
in interface AttributeWriter
java.io.IOException
public java.lang.Object read(int i) throws java.io.IOException, java.lang.ArrayIndexOutOfBoundsException
AttributeReader
read
in interface AttributeReader
java.io.IOException
java.lang.ArrayIndexOutOfBoundsException
public void write(int position, java.lang.Object attribute) throws java.io.IOException
AttributeWriter
write
in interface AttributeWriter
java.io.IOException
protected java.lang.String formatValue(java.lang.Object value)
public void queryDataClosed(JDBCDataStore.QueryData queryData)
queryDataClosed
in interface QueryDataListener
public void rowDeleted(JDBCDataStore.QueryData queryData)
rowDeleted
in interface QueryDataListener
queryData
- QueryDataListener.rowDeleted(org.geotools.data.jdbc.JDBCDataStore.QueryData)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |