01: package org.vfny.geoserver.wms.responses.map.kml;
02:
03: import org.geotools.xml.transform.TransformerBase;
04: import org.xml.sax.ContentHandler;
05:
06: /**
07: * Base class for kml transformers.
08: *
09: * @author Justin Deoliveira, The Open Planning Project, jdeolive@openplans.org
10: *
11: */
12: public abstract class KMLTransformerBase extends TransformerBase {
13:
14: /**
15: * standalone flag.
16: */
17: boolean standAlone = true;
18:
19: /**
20: * Sets flag controlling wether the transformer encodes the document as
21: * a standalone document, or as part of another kml document.
22: * <p>
23: * If <tt>standAlone</tt> is <code>true</code>, the transformer will wrap
24: * its content in <kml> tags.
25: * </p>
26: *
27: * @param standAlone <code>true</code> to set standalone, otherwise <code>false</code>
28: */
29: public void setStandAlone(boolean standAlone) {
30: this .standAlone = standAlone;
31: }
32:
33: /**
34: * Determines if the document is being encoded standalone.
35: *
36: * @see #setStandAlone(boolean)
37: */
38: public boolean isStandAlone() {
39: return standAlone;
40: }
41:
42: public abstract class KMLTranslatorSupport extends
43: TranslatorSupport {
44:
45: public KMLTranslatorSupport(ContentHandler contentHandler) {
46: super(contentHandler, null, null);
47: }
48:
49: }
50:
51: }
|