|
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.AbstractImportProvider
eu.esdihumboldt.hale.common.schema.io.impl.AbstractSchemaReader
eu.esdihumboldt.hale.io.xsd.reader.XmlSchemaReader
public class XmlSchemaReader
The main functionality of this class is to load an XML schema file (XSD) and
create a schema with 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.
Field Summary |
---|
Fields inherited from interface eu.esdihumboldt.hale.common.core.io.ImportProvider |
---|
PARAM_RESOURCE_ID, PARAM_SOURCE |
Fields inherited from interface eu.esdihumboldt.hale.common.core.io.IOProvider |
---|
PARAM_CONTENT_TYPE |
Constructor Summary | |
---|---|
XmlSchemaReader()
|
Method Summary | |
---|---|
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 |
Methods inherited from class eu.esdihumboldt.hale.common.schema.io.impl.AbstractSchemaReader |
---|
getSharedTypes, setSharedTypes |
Methods inherited from class eu.esdihumboldt.hale.common.core.io.impl.AbstractImportProvider |
---|
createReporter, execute, generateResourceId, getResourceIdentifier, getSource, setParameter, setSource, storeConfiguration |
Methods inherited from class eu.esdihumboldt.hale.common.core.io.impl.AbstractIOProvider |
---|
addSupportedParameter, 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.common.core.io.ImportProvider |
---|
getResourceIdentifier, getSource, setSource |
Methods inherited from interface eu.esdihumboldt.hale.common.core.io.IOProvider |
---|
createReporter, execute, getContentType, getParameter, getSupportedParameters, loadConfiguration, setContentType, setParameter, storeConfiguration |
Constructor Detail |
---|
public XmlSchemaReader()
Method Detail |
---|
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 report
IOProviderConfigurationException
- if the I/O provider was not
configured properly
IOException
- 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 location
|
Humboldt Alignment Editor 2.5.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |