public class XmlSchemaReader extends AbstractSchemaReader
TypeDefinition
s. This implementation is based on
the Apache XmlSchema library (
"http://ws.apache.org/commons/XmlSchema/").
It is necessary use this library instead of the GeoTools XML schema loader,
because the GeoTools version cannot handle GML 3.2 based files.PARAM_RESOURCE_ID, PARAM_SOURCE
PARAM_CHARSET, PARAM_CONTENT_TYPE
Constructor and Description |
---|
XmlSchemaReader() |
Modifier and Type | Method and Description |
---|---|
protected IOReport |
execute(ProgressIndicator progress,
IOReporter reporter)
Execute the I/O provider.
|
protected String |
getDefaultTypeName()
Get the default type name if no content type is provided
|
XmlIndex |
getSchema()
Get the loaded schema
|
boolean |
isCancelable()
States if the execution of the provider is cancelable
|
protected void |
loadSchema(String schemaLocation,
org.apache.ws.commons.schema.XmlSchema xmlSchema,
Set<String> imports,
ProgressIndicator progress,
boolean mainSchema)
Load the feature types defined by the given schema
|
static void |
setMetadata(AbstractDefinition<?> definition,
org.apache.ws.commons.schema.XmlSchemaAnnotated annotated,
String schemaLocation)
Set the metadata for a definition
|
void |
validate()
Validate the I/O provider configuration
|
getSharedTypes, setSharedTypes
createReporter, execute, generateResourceId, getResourceIdentifier, getSource, setParameter, setSource, storeConfiguration
addSupportedParameter, fail, getCharset, getContentType, getDefaultCharset, getParameter, getSupportedParameters, getTypeName, loadConfiguration, setCharset, setContentType
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getResourceIdentifier, getSource, setSource
createReporter, execute, getCharset, getContentType, getParameter, getSupportedParameters, loadConfiguration, setCharset, setContentType, setParameter, storeConfiguration
public XmlIndex getSchema()
SchemaReader
SchemaReader.getSchema()
public boolean isCancelable()
IOProvider
IOProvider.isCancelable()
public void validate() throws IOProviderConfigurationException
IOProvider
validate
in interface IOProvider
validate
in class AbstractImportProvider
IOProviderConfigurationException
- if the I/O provider was not
configured properlyAbstractImportProvider.validate()
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 reportIOProviderConfigurationException
- if the I/O provider was not
configured properlyIOException
- if an I/O operation failsAbstractIOProvider.execute(ProgressIndicator, IOReporter)
protected void loadSchema(String schemaLocation, org.apache.ws.commons.schema.XmlSchema xmlSchema, Set<String> imports, ProgressIndicator progress, boolean mainSchema)
schemaLocation
- the schema locationxmlSchema
- the schemaimports
- the imports/includes that were already loaded or where
loading has been startedprogress
- the progress indicatormainSchema
- states if this is a main schema and therefore elements
declared here should be flagged mappableprotected String getDefaultTypeName()
AbstractIOProvider
getDefaultTypeName
in class AbstractIOProvider
AbstractIOProvider.getDefaultTypeName()
public static void setMetadata(AbstractDefinition<?> definition, org.apache.ws.commons.schema.XmlSchemaAnnotated annotated, String schemaLocation)
definition
- the definitionannotated
- the XML annotated objectschemaLocation
- the schema locationBuild 2013-10-07_11-27-38
Revision 99b27713a799a59a21b0b166eaaea8aaefbf125a