Class GMLWriter
java.lang.Object
com.vividsolutions.jump.io.GMLWriter
- All Implemented Interfaces:
JUMPWriter, TaskMonitorSupport
- Direct Known Subclasses:
JMLWriter
GMLWriter is a
NOTE: If OutputTemplateFile is unspecified, one will be auto-created (the JCS format).
Programmer details:
This is usually called as follows:
Also, the function "makeOutputTemplate()" is useful for autogenerating the JCS outputtemplate.
Output will be formed from the OutputTeplate like:
JUMPWriter specialized to output GML.
TODO: use a proper XML framework, switch to XML1.1 which supports much broader range of unicode characters
DataProperties for the JCSWriter write(featureSchema,DataProperties) interface:
| Parameter | Meaning |
|---|---|
| OutputFile or DefaultValue | File name for output .xml file |
| OutputTemplateFile | File name for GMLOutputTemplate file |
NOTE: If OutputTemplateFile is unspecified, one will be auto-created (the JCS format).
Programmer details:
This is usually called as follows:
gmlWriter= new GMLWriter(); gmlWriter.write( DriverProperites);or:
gmlWriter.setOutputTemplate( GMLOutputTemplate); gmlWriter.write( <writer>, <stream name>);
Also, the function "makeOutputTemplate()" is useful for autogenerating the JCS outputtemplate.
Output will be formed from the OutputTeplate like:
headerText ==== This section repeated for each feature featureText[0] <evaluate codeText[0]> featureText[1] <evaluate codeText[1]> ... featureTextFooter ==== footerText
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringvoidsetTaskMonitor(TaskMonitor taskMonitor) protected Stringvoidwrite(FeatureCollection featureCollection, DriverProperties dp) Main entry function - write the GML file.voidwrite(FeatureCollection featureCollection, Writer writer) Actual evaluator/writer - you should have already called setOutputTemplate
-
Constructor Details
-
GMLWriter
public GMLWriter()constructor
-
-
Method Details
-
write
Main entry function - write the GML file.- Specified by:
writein interfaceJUMPWriter- Parameters:
featureCollection- features to writedp- specify the 'OuputFile' and 'OuputTemplateFile'- Throws:
Exception
-
write
Actual evaluator/writer - you should have already called setOutputTemplate- Parameters:
featureCollection- features to writewriter- - where to send the output to- Throws:
Exception
-
toString
-
format
-
setTaskMonitor
- Specified by:
setTaskMonitorin interfaceTaskMonitorSupport
-
getTaskMonitor
- Specified by:
getTaskMonitorin interfaceTaskMonitorSupport
-