|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--org.wkb4j.factories.AbstractWKBFactory
Classes implementing WKBFactory should extend this class. In particular, this class validates the WKBFormat, making sure that things happen only when they should. Among other things, it checks that geometrical objects are correctly nested: Points can only exist in LineString and LinearRing objects, GeometryCollection can contain any type of objects... This is somehow similar to a "validating" XML parser. Creation date: 6 juil. 2002 22:07:15
| Field Summary | |
protected int |
depthPointer
Points to the top of the stack. |
protected int |
geometryDepth
|
protected boolean |
inUnit
|
protected boolean |
inWork
|
protected static org.apache.log4j.Logger |
log
|
protected int[] |
typeStack
|
protected int[] |
values
|
protected java.lang.String[] |
words
|
| Fields inherited from interface org.wkb4j.engine.WKBGeometryTypes |
linearRing, wkbGeometryCollection, wkbLineString, wkbMultiLineString, wkbMultiPoint, wkbMultiPolygon, wkbPoint, wkbPolygon |
| Constructor Summary | |
AbstractWKBFactory()
|
|
| Method Summary | |
void |
abortGeometryCollection()
Signals a malformed GeometryCollection. |
void |
abortLinearRing()
Signals a malformed LinearRing. |
void |
abortLineString()
Signals a malformed LineString. |
void |
abortMultiLineString()
Signals a malformed MultiLineString. |
void |
abortMultiPoint()
Signals a malformed MultiPoint. |
void |
abortMultiPolygon()
Signals a malformed MultiPolygon. |
void |
abortPoint()
Signals a malformed Point. |
void |
abortPolygon()
Signals a malformed Polygon. |
void |
abortUnit()
Signals the problematic stop of the transcription process for a Geometry. |
void |
abortWork()
Signals the problematic stop of the transcription process for a buffer of WKB data. |
boolean |
addPoints(double[] points)
points is an array of doubles reprensentings coordinates. |
boolean |
addPoints3D(double[] points)
|
private void |
advancePointer(int type)
|
boolean |
beginGeometryCollection(int count)
Signals the beginning of a new GeometryCollection. |
boolean |
beginLinearRing(int count)
Signals the beginning of a new LinearRing. |
boolean |
beginLineString(int count)
Signals the beginning of a new LineString |
boolean |
beginMultiLineString(int count)
Signals the beginning of a new MultiLineString. |
boolean |
beginMultiPoint(int count)
Signals the beginning of a new MultiPoint. |
boolean |
beginMultiPolygon(int count)
Signals the beginning of a new MultiPolygon. |
boolean |
beginPoint()
Signals the beginning of a new Point |
boolean |
beginPolygon(int count)
Signals the beginning of a new Polygon. |
void |
beginUnit(int srid)
Signals the beginning of the transcription process for a Geometry.
|
void |
beginUnit(java.lang.String[] words,
int[] values)
Signals the beginning of the transcription process for a Geometry.
|
void |
beginWork()
Signals the beginning of the transcription process for a buffer of WKB data. |
boolean |
endGeometryCollection()
Signals the end of a GeometryCollection. |
boolean |
endLinearRing()
Signals the end of a LinearRing. |
boolean |
endLineString()
Signals the end of a LineString. |
boolean |
endMultiLineString()
Signals the end of a MultiLineString. |
boolean |
endMultiPoint()
Signals the end of a MultiPoint. |
boolean |
endMultiPolygon()
Signals the end of a MultiPolygon. |
boolean |
endPoint()
Signals the end of a Point. |
boolean |
endPolygon()
Signals the end of a Polygon. |
void |
endUnit()
Signals the end of the transcription process for a Geometry. |
void |
endWork()
Signals the end of the transcription process for a buffer of WKB data. |
int[] |
getValues()
Returns the values. |
java.lang.String[] |
getWords()
Returns the words. |
protected void |
init()
|
boolean |
newGeometryCollectionComponent()
Signals that a new component for the geometry factory is about to processed OR that all components has been used. |
abstract void |
reset()
|
private boolean |
rewindPointer(int type)
|
protected void |
setValues(int[] values)
Sets the values. |
protected void |
setWords(java.lang.String[] words)
Sets the words. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected static org.apache.log4j.Logger log
protected final int geometryDepth
protected int depthPointer
protected int[] typeStack
protected boolean inWork
protected boolean inUnit
protected java.lang.String[] words
protected int[] values
| Constructor Detail |
public AbstractWKBFactory()
| Method Detail |
protected void init()
public void beginWork()
WKBFactory
beginWork in interface WKBFactoryWKBFactory.beginWork()public void endWork()
WKBFactory
endWork in interface WKBFactoryWKBFactory.endWork()public void abortWork()
WKBFactory
abortWork in interface WKBFactoryWKBFactory.abortWork()
public void beginUnit(java.lang.String[] words,
int[] values)
WKBFactoryGeometry.
The submitted values will be available to all the Geometries contained in this Geometry
beginUnit in interface WKBFactoryorg.wkb4j.engine.WKBFactory#beginUnit()public void beginUnit(int srid)
WKBFactoryGeometry.
The submitted SRID will be assigned to all the Geometries contained in this Geometry
beginUnit in interface WKBFactoryorg.wkb4j.engine.WKBFactory#beginUnit()public void endUnit()
WKBFactoryGeometry.
endUnit in interface WKBFactoryWKBFactory.endUnit()public void abortUnit()
WKBFactoryGeometry.
abortUnit in interface WKBFactoryWKBFactory.abortUnit()public boolean beginGeometryCollection(int count)
WKBFactoryGeometryCollection.
beginGeometryCollection in interface WKBFactorycount - the number of elements in the GeometryCollection.org.wkb4j.engine.WKBFactory#beginGeometryCollection()public boolean endGeometryCollection()
WKBFactoryGeometryCollection.
endGeometryCollection in interface WKBFactoryWKBFactory.endGeometryCollection()public void abortGeometryCollection()
WKBFactoryGeometryCollection. This can happen at any time,
and Factories should just skip the malformed Geometry and maybe escalate the error.
abortGeometryCollection in interface WKBFactoryWKBFactory.abortGeometryCollection()public boolean newGeometryCollectionComponent()
WKBFactory
newGeometryCollectionComponent in interface WKBFactoryWKBFactory.abortGeometryCollection()public boolean beginLineString(int count)
WKBFactoryLineString.
* @param count the number of elements in the LineString
beginLineString in interface WKBFactoryorg.wkb4j.engine.WKBFactory#beginLineString()public boolean endLineString()
WKBFactoryLineString.
endLineString in interface WKBFactoryWKBFactory.endLineString()public void abortLineString()
WKBFactoryLineString. This can happen at any time,
and Factories should just skip the malformed
abortLineString in interface WKBFactoryWKBFactory.abortLineString()public boolean beginMultiLineString(int count)
WKBFactoryMultiLineString.
beginMultiLineString in interface WKBFactorycount - the number of elements in the MultiLineString.org.wkb4j.engine.WKBFactory#beginMultiLineString()public boolean endMultiLineString()
WKBFactoryMultiLineString.
endMultiLineString in interface WKBFactoryWKBFactory.endMultiLineString()public void abortMultiLineString()
WKBFactoryMultiLineString. This can happen at any time,
and Factories should just skip the malformed Geometry and maybe escalate the error.
abortMultiLineString in interface WKBFactoryWKBFactory.abortMultiLineString()public boolean beginMultiPolygon(int count)
WKBFactoryMultiPolygon.
beginMultiPolygon in interface WKBFactorycount - the number of elements in the MultiPolygon.org.wkb4j.engine.WKBFactory#beginMultiPolygon()public boolean endMultiPolygon()
WKBFactoryMultiPolygon.
endMultiPolygon in interface WKBFactoryWKBFactory.endMultiPolygon()public void abortMultiPolygon()
WKBFactoryMultiPolygon. This can happen at any time,
and Factories should just skip the malformed Geometry and maybe escalate the error.
abortMultiPolygon in interface WKBFactoryWKBFactory.abortMultiPolygon()public boolean beginPolygon(int count)
WKBFactoryPolygon.
beginPolygon in interface WKBFactorycount - the number of elements in the Polygon.org.wkb4j.engine.WKBFactory#beginPolygon()public boolean endPolygon()
WKBFactoryPolygon.
endPolygon in interface WKBFactoryWKBFactory.endPolygon()public void abortPolygon()
WKBFactoryPolygon. This can happen at any time,
and Factories should just skip the malformed Geometry and maybe escalate the error.
abortPolygon in interface WKBFactoryWKBFactory.abortPolygon()public boolean beginMultiPoint(int count)
WKBFactoryMultiPoint.
beginMultiPoint in interface WKBFactorycount - the number of elements in the MultiPoint.org.wkb4j.engine.WKBFactory#beginMultiPoint()public boolean endMultiPoint()
WKBFactoryMultiPoint.
endMultiPoint in interface WKBFactoryWKBFactory.endMultiPoint()public void abortMultiPoint()
WKBFactoryMultiPoint. This can happen at any time,
and Factories should just skip the malformed Geometry and maybe escalate the error.
abortMultiPoint in interface WKBFactoryWKBFactory.abortMultiPoint()public boolean beginPoint()
WKBFactoryPoint.
* @param count the number of elements in the Point
beginPoint in interface WKBFactoryWKBFactory.beginPoint()public boolean endPoint()
WKBFactoryPoint.
endPoint in interface WKBFactoryWKBFactory.endPoint()public void abortPoint()
WKBFactoryPoint. This can happen at any time,
and Factories should just skip the malformed
abortPoint in interface WKBFactoryWKBFactory.abortPoint()public boolean beginLinearRing(int count)
WKBFactoryLinearRing.
beginLinearRing in interface WKBFactorycount - the number of elements in the LinearRing.org.wkb4j.engine.WKBFactory#beginLineString()public boolean endLinearRing()
WKBFactoryLinearRing.
endLinearRing in interface WKBFactoryWKBFactory.endLinearRing()public void abortLinearRing()
WKBFactoryLinearRing. This can happen at any time,
and Factories should just skip the malformed Geometry and maybe escalate the error.
abortLinearRing in interface WKBFactoryWKBFactory.abortLinearRing()public boolean addPoints(double[] points)
WKBFactory
addPoints in interface WKBFactoryWKBFactory.addPoints(double[])public boolean addPoints3D(double[] points)
WKBFactory.addPoints(double[])private final void advancePointer(int type)
private final boolean rewindPointer(int type)
public int[] getValues()
public java.lang.String[] getWords()
protected void setValues(int[] values)
values - The values to setprotected void setWords(java.lang.String[] words)
words - The words to setpublic abstract void reset()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||