|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.norther.tammi.core.rt.vdeml.KMLWriter
public class KMLWriter
A KML document writer.
Field Summary |
---|
Fields inherited from interface org.norther.tammi.core.rt.vdeml.KMLConstants |
---|
BALLOON_STYLE_ELEMENT, COORDINATES_ELEMENT, DATA_ELEMENT, DESCRIPTION_ELEMENT, DISPLAY_NAME_ELEMENT, DOCUMENT_ELEMENT, EXTENDED_DATA_ELEMENT, KML_ID_ATTRIBUTE, KML_NAME_ATTRIBUTE, KML_SCHEMA_URL_ATTRIBUTE, KML_TYPE_ATTRIBUTE, KML_XMLNS_PREFIX_ATTRIBUTE, LINE_STRING_ELEMENT, LINEAR_RING_ELEMENT, NAME_ELEMENT, PLACEMARK_ELEMENT, POINT_ELEMENT, SCHEMA_DATA_ELEMENT, SCHEMA_ELEMENT, SIMPLE_DATA_ELEMENT, SIMPLE_FIELD_ELEMENT, STYLE_ELEMENT, STYLE_URL_ELEMENT, TEXT_ELEMENT, VALUE_ELEMENT |
Fields inherited from interface org.norther.tammi.core.rt.vdeml.ResConstants |
---|
ATTRIBUTE_ELEMENT, AUTHENTICATED_ELEMENT, MESSAGE_ELEMENT, RES_NAME_ATTRIBUTE, RES_NAMESPACE, RES_STATE_ATTRIBUTE, RES_STATUS_ATTRIBUTE, RES_TYPE_ATTRIBUTE, RES_VALUE_ATTRIBUTE, RESPONSE_ELEMENT, VDEML_URL, XMLNS_ATTRIBUTE |
Constructor Summary | |
---|---|
KMLWriter(Introspector intro,
String... ns)
Constructs a new writer. |
Method Summary | |
---|---|
protected void |
appendAttribute(CharSequence value,
String name,
String encodings,
StringBuilder buffer)
Appends the named attribute. |
protected void |
appendBalloonStyle(Variable var,
StringBuilder buffer)
Appends the balloon style element. |
protected void |
appendLinearRing(Location[] locs,
StringBuilder buffer)
Appends the linear ring element. |
protected void |
appendLineString(Location[] locs,
StringBuilder buffer)
Appends the line string element. |
protected void |
appendLocation(Variable var,
StringBuilder buffer)
Appends the location element. |
protected void |
appendPlacemark(Variable var,
int index,
VariableValidity validity,
SortedMap<String,Exception> validation,
StringBuilder buffer,
boolean... options)
Appends the placemark element. |
protected void |
appendPoint(Location loc,
StringBuilder buffer)
Appends the point element. |
protected void |
appendResponse(StringBuilder buffer)
Appends the response element. |
protected void |
appendSchema(Variable var,
StringBuilder buffer)
Appends the schema element. |
protected void |
appendSchemaData(Variable var,
StringBuilder buffer)
Appends the schema data element. |
protected void |
appendSimpleData(Variable var,
VariableAttributeInfo info,
StringBuilder buffer)
Appends the simple data element. |
protected void |
appendSimpleField(Variable var,
VariableAttributeInfo info,
StringBuilder buffer)
Appends the simple field element. |
protected void |
appendStyle(Variable var,
StringBuilder buffer)
Appends the style element. |
void |
write(Iterator<Variable> vars,
Appendable buffer,
boolean... options)
Writes a KML element for an iterator of variables. |
void |
write(List<Variable> vars,
Appendable buffer,
boolean... options)
Writes a KML element for a list of variables. |
void |
write(List<Variable> vars,
List<VariableValidity> validity,
List<SortedMap<String,Exception>> validation,
Appendable buffer,
boolean... options)
Writes a VDEML element for a list of validated variables. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public KMLWriter(Introspector intro, String... ns)
intro
- the intospector.ns
- optional var namespace.Method Detail |
---|
public void write(List<Variable> vars, Appendable buffer, boolean... options) throws IOException
vars
- a list of variables.buffer
- the result buffer.options
- true to include variables, metadata and/or hidden
attributes.
IOException
- in I/O errors.public void write(List<Variable> vars, List<VariableValidity> validity, List<SortedMap<String,Exception>> validation, Appendable buffer, boolean... options) throws IOException
vars
- a list of variables.validity
- a list of validities.validation
- a validation map.buffer
- the result buffer.options
- true to include variables, metadata and/or hidden
attributes.
IOException
- in I/O errors.public void write(Iterator<Variable> vars, Appendable buffer, boolean... options) throws IOException
Note that all variables must be of the same type.
vars
- an iterator of variables.buffer
- the result buffer.options
- true to include variables, metadata and/or hidden
attributes.
IOException
- in I/O errors.protected void appendResponse(StringBuilder buffer)
buffer
- the result buffer.protected void appendStyle(Variable var, StringBuilder buffer)
var
- the variable.buffer
- the result buffer.protected void appendBalloonStyle(Variable var, StringBuilder buffer)
var
- the variable.buffer
- the result buffer.protected void appendSchema(Variable var, StringBuilder buffer)
var
- the variable.buffer
- the result buffer.protected void appendSimpleField(Variable var, VariableAttributeInfo info, StringBuilder buffer)
var
- the variable.info
- the attribute.buffer
- the buffer.protected void appendPlacemark(Variable var, int index, VariableValidity validity, SortedMap<String,Exception> validation, StringBuilder buffer, boolean... options)
var
- the variable.index
- the variable index.validity
- the validity.validation
- the validation.buffer
- the result buffer.options
- true to include variables, metadata and/or hidden
attributes.protected void appendSchemaData(Variable var, StringBuilder buffer)
var
- the variable.buffer
- the result buffer.protected void appendSimpleData(Variable var, VariableAttributeInfo info, StringBuilder buffer)
var
- the variable.info
- the attribute.buffer
- the buffer.protected void appendLocation(Variable var, StringBuilder buffer)
var
- the variable.buffer
- the buffer.protected void appendLineString(Location[] locs, StringBuilder buffer)
locs
- the locations.buffer
- the buffer.protected void appendLinearRing(Location[] locs, StringBuilder buffer)
locs
- the locations.buffer
- the buffer.protected void appendPoint(Location loc, StringBuilder buffer)
loc
- the location.buffer
- the buffer.protected void appendAttribute(CharSequence value, String name, String encodings, StringBuilder buffer)
value
- the value.name
- the atribute name.encodings
- chars to encode.buffer
- the buffer.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |