|
Humboldt Alignment Editor 2.5.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecteu.esdihumboldt.hale.common.core.io.impl.AbstractIOProvider
eu.esdihumboldt.hale.common.core.io.impl.AbstractExportProvider
eu.esdihumboldt.hale.common.core.io.impl.GZipEnabledExport
eu.esdihumboldt.hale.common.instance.io.impl.AbstractInstanceWriter
eu.esdihumboldt.hale.io.gml.writer.internal.StreamGmlWriter
public class StreamGmlWriter
Writes GML/XML using a XMLStreamWriter
Nested Class Summary |
---|
Nested classes/interfaces inherited from class eu.esdihumboldt.hale.common.core.io.impl.GZipEnabledExport |
---|
GZipEnabledExport.GZipOutputSupplier |
Field Summary | |
---|---|
static String |
PARAM_SIMPLIFY_GEOMETRY
The parameter name for the flag specifying if a geometry should be simplified before writing it, if possible. |
static String |
SCHEMA_INSTANCE_NS
Schema instance namespace (for specifying schema locations) |
Fields inherited from interface eu.esdihumboldt.hale.io.gml.writer.XmlWriterBase |
---|
PARAM_ROOT_ELEMENT_NAME, PARAM_ROOT_ELEMENT_NAMESPACE |
Fields inherited from interface eu.esdihumboldt.hale.common.core.io.IOProvider |
---|
PARAM_CONTENT_TYPE |
Fields inherited from interface eu.esdihumboldt.hale.common.core.io.ExportProvider |
---|
PARAM_TARGET |
Constructor Summary | |
---|---|
StreamGmlWriter(boolean useFeatureCollection)
Create a GML writer |
Method Summary | |
---|---|
void |
checkCompatibility()
Validate the basic InstanceWriter configuration, to determine if
the target schema (and instances if set) are compatible to the writer. |
protected IOReport |
execute(ProgressIndicator progress,
IOReporter reporter)
Execute the I/O provider. |
protected XmlElement |
findDefaultContainter(XmlIndex targetIndex,
IOReporter reporter)
Find the default container element. |
protected DefinitionPath |
findMemberAttribute(TypeDefinition container,
QName containerName,
TypeDefinition memberType)
Find a matching attribute for the given member type in the given container type |
static XmlElement |
getConfiguredContainerElement(IOProvider provider,
XmlIndex targetIndex)
Get the for an I/O provider configured target container element, assuming the I/O provider uses the XmlWriterBase.PARAM_ROOT_ELEMENT_NAMESPACE and
parameters for this. |
protected String |
getDefaultTypeName()
Get the default type name if no content type is provided |
protected StreamGeometryWriter |
getGeometryWriter()
Get the geometry writer |
protected XmlIndex |
getXMLIndex()
Get the XML type index. |
static XmlIndex |
getXMLIndex(SchemaSpace schemas)
Get the XML index from the given schema space |
boolean |
isCancelable()
States if the execution of the provider is cancelable |
protected boolean |
requiresDefaultContainer()
States if the instance writer in all cases requires that the default container is being found. |
void |
validate()
Additionally checks for instances. |
void |
write(InstanceCollection instances,
ProgressIndicator progress,
IOReporter reporter)
Write the given instances. |
protected void |
writeMember(Instance instance,
TypeDefinition type)
Write a given instance |
Methods inherited from class eu.esdihumboldt.hale.common.instance.io.impl.AbstractInstanceWriter |
---|
getInstances, getTargetSchema, getValidationSchemas, setInstances, setTargetSchema |
Methods inherited from class eu.esdihumboldt.hale.common.core.io.impl.GZipEnabledExport |
---|
getTarget |
Methods inherited from class eu.esdihumboldt.hale.common.core.io.impl.AbstractExportProvider |
---|
createReporter, setParameter, setTarget, storeConfiguration |
Methods inherited from class eu.esdihumboldt.hale.common.core.io.impl.AbstractIOProvider |
---|
addSupportedParameter, execute, fail, getContentType, getParameter, getSupportedParameters, getTypeName, loadConfiguration, setContentType |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface eu.esdihumboldt.hale.io.gml.writer.XmlWriterBase |
---|
getTargetSchema |
Methods inherited from interface eu.esdihumboldt.hale.common.core.io.IOProvider |
---|
createReporter, execute, getContentType, getParameter, getSupportedParameters, loadConfiguration, setContentType, setParameter, storeConfiguration |
Methods inherited from interface eu.esdihumboldt.hale.common.core.io.ExportProvider |
---|
getTarget, setTarget |
Field Detail |
---|
public static final String SCHEMA_INSTANCE_NS
public static final String PARAM_SIMPLIFY_GEOMETRY
Constructor Detail |
---|
public StreamGmlWriter(boolean useFeatureCollection)
useFeatureCollection
- if a GML feature collection shall be used to
store the instances (if possible)Method Detail |
---|
protected IOReport execute(ProgressIndicator progress, IOReporter reporter) throws IOProviderConfigurationException, IOException
AbstractIOProvider
execute
in class AbstractIOProvider
progress
- the progress indicatorreporter
- the reporter to use for the execution report
IOProviderConfigurationException
- if the I/O provider was not
configured properly
IOException
- if an I/O operation failsAbstractIOProvider.execute(ProgressIndicator, IOReporter)
public void validate() throws IOProviderConfigurationException
AbstractInstanceWriter
validate
in interface IOProvider
validate
in class AbstractInstanceWriter
IOProviderConfigurationException
- if the I/O provider was not
configured properlyAbstractInstanceWriter.validate()
public void checkCompatibility() throws IOProviderConfigurationException
InstanceWriter
InstanceWriter
configuration, to determine if
the target schema (and instances if set) are compatible to the writer.
Other parameters should be ignored for the check.
checkCompatibility
in interface InstanceWriter
checkCompatibility
in class AbstractInstanceWriter
IOProviderConfigurationException
- if the I/O provider was not
configured properlyAbstractInstanceWriter.checkCompatibility()
protected boolean requiresDefaultContainer()
protected XmlIndex getXMLIndex()
public static XmlIndex getXMLIndex(SchemaSpace schemas)
schemas
- the schema space
null
public boolean isCancelable()
IOProvider
isCancelable
in interface IOProvider
IOProvider.isCancelable()
protected String getDefaultTypeName()
AbstractIOProvider
getDefaultTypeName
in class AbstractIOProvider
AbstractIOProvider.getDefaultTypeName()
public void write(InstanceCollection instances, ProgressIndicator progress, IOReporter reporter) throws XMLStreamException
instances
- the instance collectionreporter
- the reporterprogress
- the progress
XMLStreamException
- if writing the feature collection failspublic static XmlElement getConfiguredContainerElement(IOProvider provider, XmlIndex targetIndex)
XmlWriterBase.PARAM_ROOT_ELEMENT_NAMESPACE
and
parameters for this.
provider
- the I/O providertargetIndex
- the target XML index
null
if it was not foundprotected XmlElement findDefaultContainter(XmlIndex targetIndex, IOReporter reporter)
targetIndex
- the target type indexreporter
- the reporter, may be null
null
protected DefinitionPath findMemberAttribute(TypeDefinition container, QName containerName, TypeDefinition memberType)
container
- the container typecontainerName
- the container element namememberType
- the member type
null
protected void writeMember(Instance instance, TypeDefinition type) throws XMLStreamException
instance
- the instance to writertype
- the feature type definition
XMLStreamException
- if writing the feature failsprotected StreamGeometryWriter getGeometryWriter()
|
Humboldt Alignment Editor 2.5.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |