org.eclipse.emf.ecore.xmi.impl
Class XMLOptionsImpl

java.lang.Object
  extended by org.eclipse.emf.ecore.xmi.impl.XMLOptionsImpl
All Implemented Interfaces:
XMLOptions

public class XMLOptionsImpl
extends java.lang.Object
implements XMLOptions


Field Summary
protected  boolean anyXML
           
protected  EcoreBuilder ecoreBuilder
           
protected  java.util.Map<java.lang.String,URI> externalSchemaLocation
           
protected  boolean processSchemaLocations
           
 
Constructor Summary
XMLOptionsImpl()
           
 
Method Summary
 EcoreBuilder getEcoreBuilder()
           
 java.util.Map<java.lang.String,URI> getExternalSchemaLocations()
           
 int hashCode()
           
 boolean isProcessAnyXML()
           
 boolean isProcessSchemaLocations()
           
 void setEcoreBuilder(EcoreBuilder ecoreBuilder)
          This option allows the user to specify implementation of EcoreBuilder that will be used to process schema locations to build Ecore dynamically.
 void setExternalSchemaLocations(java.util.Map<java.lang.String,URI> schemaLocations)
          The XML Schema Recommendation explicitly states that the inclusion of schemaLocation/noNamespaceSchemaLocation attributes is only a hint; it does not mandate that these attributes must be used to locate schemas.
 void setProcessAnyXML(boolean anyXML)
          This options allows the user to load and deserialize arbitrary XML (i.e.
 void setProcessSchemaLocations(boolean processSchemaLocations)
          This options allows the user to specify that the schemaLocation/noNamespaceSchemaLocation attributes occurring in the instance document will be processed to convert XSD(s) to Ecore file(s).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ecoreBuilder

protected EcoreBuilder ecoreBuilder

externalSchemaLocation

protected java.util.Map<java.lang.String,URI> externalSchemaLocation

anyXML

protected boolean anyXML

processSchemaLocations

protected boolean processSchemaLocations
Constructor Detail

XMLOptionsImpl

public XMLOptionsImpl()
Method Detail

getEcoreBuilder

public EcoreBuilder getEcoreBuilder()
Specified by:
getEcoreBuilder in interface XMLOptions
Returns:
EcoreBuilder
See Also:
EcoreBuilder

getExternalSchemaLocations

public java.util.Map<java.lang.String,URI> getExternalSchemaLocations()
Specified by:
getExternalSchemaLocations in interface XMLOptions
Returns:
external schema locations

isProcessAnyXML

public boolean isProcessAnyXML()
Specified by:
isProcessAnyXML in interface XMLOptions
Returns:
processAnyXML value

isProcessSchemaLocations

public boolean isProcessSchemaLocations()
Specified by:
isProcessSchemaLocations in interface XMLOptions
Returns:
processSchemaLocations

setEcoreBuilder

public void setEcoreBuilder(EcoreBuilder ecoreBuilder)
Description copied from interface: XMLOptions
This option allows the user to specify implementation of EcoreBuilder that will be used to process schema locations to build Ecore dynamically. If this option is not set and either XMLOptions.getExternalSchemaLocations() is set or XMLOptions.isProcessSchemaLocations() returns true default EcoreBuilder will be created.

Specified by:
setEcoreBuilder in interface XMLOptions
See Also:
EcoreBuilder

setExternalSchemaLocations

public void setExternalSchemaLocations(java.util.Map<java.lang.String,URI> schemaLocations)
Description copied from interface: XMLOptions
The XML Schema Recommendation explicitly states that the inclusion of schemaLocation/noNamespaceSchemaLocation attributes is only a hint; it does not mandate that these attributes must be used to locate schemas. This option allows the user to specify schemas to use. If the targetNamespace of a schema (specified using this property) matches the targetNamespace of a schema occurring in the instance document in schemaLocation attribute, the schema specified by the user using this property will be used (i.e., the schemaLocation attribute in the instance document).

Specified by:
setExternalSchemaLocations in interface XMLOptions
Parameters:
schemaLocations - - map of target namespace to schema location of type URI

setProcessAnyXML

public void setProcessAnyXML(boolean anyXML)
Description copied from interface: XMLOptions
This options allows the user to load and deserialize arbitrary XML (i.e. XML for which schema is not specified). The default is false, unless set to true explicitly. To process schemaLocation/noNamespaceSchemaLocation attributes, user have to set XMLOptions.setProcessSchemaLocations(boolean) to true.

Specified by:
setProcessAnyXML in interface XMLOptions
Parameters:
anyXML - whether to process arbitrary XML.
See Also:
XMLResource.getEObjectToExtensionMap()

setProcessSchemaLocations

public void setProcessSchemaLocations(boolean processSchemaLocations)
Description copied from interface: XMLOptions
This options allows the user to specify that the schemaLocation/noNamespaceSchemaLocation attributes occurring in the instance document will be processed to convert XSD(s) to Ecore file(s). If this option is specified together with externalSchemaLocation option, the schemas specified in externalSchemaLocation will take precedence.

Specified by:
setProcessSchemaLocations in interface XMLOptions

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

Copyright 2001-2006 IBM Corporation and others.
All Rights Reserved.