|
|||||||||||
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 WKBFactory
WKBFactory.beginWork()
public void endWork()
WKBFactory
endWork
in interface WKBFactory
WKBFactory.endWork()
public void abortWork()
WKBFactory
abortWork
in interface WKBFactory
WKBFactory.abortWork()
public void beginUnit(java.lang.String[] words, int[] values)
WKBFactory
Geometry
.
The submitted values will be available to all the Geometries contained in this Geometry
beginUnit
in interface WKBFactory
org.wkb4j.engine.WKBFactory#beginUnit()
public void beginUnit(int srid)
WKBFactory
Geometry
.
The submitted SRID will be assigned to all the Geometries contained in this Geometry
beginUnit
in interface WKBFactory
org.wkb4j.engine.WKBFactory#beginUnit()
public void endUnit()
WKBFactory
Geometry
.
endUnit
in interface WKBFactory
WKBFactory.endUnit()
public void abortUnit()
WKBFactory
Geometry
.
abortUnit
in interface WKBFactory
WKBFactory.abortUnit()
public boolean beginGeometryCollection(int count)
WKBFactory
GeometryCollection
.
beginGeometryCollection
in interface WKBFactory
count
- the number of elements in the GeometryCollection
.org.wkb4j.engine.WKBFactory#beginGeometryCollection()
public boolean endGeometryCollection()
WKBFactory
GeometryCollection
.
endGeometryCollection
in interface WKBFactory
WKBFactory.endGeometryCollection()
public void abortGeometryCollection()
WKBFactory
GeometryCollection
. This can happen at any time,
and Factories should just skip the malformed Geometry
and maybe escalate the error.
abortGeometryCollection
in interface WKBFactory
WKBFactory.abortGeometryCollection()
public boolean newGeometryCollectionComponent()
WKBFactory
newGeometryCollectionComponent
in interface WKBFactory
WKBFactory.abortGeometryCollection()
public boolean beginLineString(int count)
WKBFactory
LineString
.
* @param count the number of elements in the LineString
beginLineString
in interface WKBFactory
org.wkb4j.engine.WKBFactory#beginLineString()
public boolean endLineString()
WKBFactory
LineString
.
endLineString
in interface WKBFactory
WKBFactory.endLineString()
public void abortLineString()
WKBFactory
LineString
. This can happen at any time,
and Factories should just skip the malformed
abortLineString
in interface WKBFactory
WKBFactory.abortLineString()
public boolean beginMultiLineString(int count)
WKBFactory
MultiLineString
.
beginMultiLineString
in interface WKBFactory
count
- the number of elements in the MultiLineString
.org.wkb4j.engine.WKBFactory#beginMultiLineString()
public boolean endMultiLineString()
WKBFactory
MultiLineString
.
endMultiLineString
in interface WKBFactory
WKBFactory.endMultiLineString()
public void abortMultiLineString()
WKBFactory
MultiLineString
. This can happen at any time,
and Factories should just skip the malformed Geometry
and maybe escalate the error.
abortMultiLineString
in interface WKBFactory
WKBFactory.abortMultiLineString()
public boolean beginMultiPolygon(int count)
WKBFactory
MultiPolygon
.
beginMultiPolygon
in interface WKBFactory
count
- the number of elements in the MultiPolygon
.org.wkb4j.engine.WKBFactory#beginMultiPolygon()
public boolean endMultiPolygon()
WKBFactory
MultiPolygon
.
endMultiPolygon
in interface WKBFactory
WKBFactory.endMultiPolygon()
public void abortMultiPolygon()
WKBFactory
MultiPolygon
. This can happen at any time,
and Factories should just skip the malformed Geometry
and maybe escalate the error.
abortMultiPolygon
in interface WKBFactory
WKBFactory.abortMultiPolygon()
public boolean beginPolygon(int count)
WKBFactory
Polygon
.
beginPolygon
in interface WKBFactory
count
- the number of elements in the Polygon
.org.wkb4j.engine.WKBFactory#beginPolygon()
public boolean endPolygon()
WKBFactory
Polygon
.
endPolygon
in interface WKBFactory
WKBFactory.endPolygon()
public void abortPolygon()
WKBFactory
Polygon
. This can happen at any time,
and Factories should just skip the malformed Geometry
and maybe escalate the error.
abortPolygon
in interface WKBFactory
WKBFactory.abortPolygon()
public boolean beginMultiPoint(int count)
WKBFactory
MultiPoint
.
beginMultiPoint
in interface WKBFactory
count
- the number of elements in the MultiPoint
.org.wkb4j.engine.WKBFactory#beginMultiPoint()
public boolean endMultiPoint()
WKBFactory
MultiPoint
.
endMultiPoint
in interface WKBFactory
WKBFactory.endMultiPoint()
public void abortMultiPoint()
WKBFactory
MultiPoint
. This can happen at any time,
and Factories should just skip the malformed Geometry
and maybe escalate the error.
abortMultiPoint
in interface WKBFactory
WKBFactory.abortMultiPoint()
public boolean beginPoint()
WKBFactory
Point
.
* @param count the number of elements in the Point
beginPoint
in interface WKBFactory
WKBFactory.beginPoint()
public boolean endPoint()
WKBFactory
Point
.
endPoint
in interface WKBFactory
WKBFactory.endPoint()
public void abortPoint()
WKBFactory
Point
. This can happen at any time,
and Factories should just skip the malformed
abortPoint
in interface WKBFactory
WKBFactory.abortPoint()
public boolean beginLinearRing(int count)
WKBFactory
LinearRing
.
beginLinearRing
in interface WKBFactory
count
- the number of elements in the LinearRing
.org.wkb4j.engine.WKBFactory#beginLineString()
public boolean endLinearRing()
WKBFactory
LinearRing
.
endLinearRing
in interface WKBFactory
WKBFactory.endLinearRing()
public void abortLinearRing()
WKBFactory
LinearRing
. This can happen at any time,
and Factories should just skip the malformed Geometry
and maybe escalate the error.
abortLinearRing
in interface WKBFactory
WKBFactory.abortLinearRing()
public boolean addPoints(double[] points)
WKBFactory
addPoints
in interface WKBFactory
WKBFactory.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 |