org.eclipse.emf.ecore.xmi.util
Class DefaultEcoreBuilder

java.lang.Object
  extended by org.eclipse.emf.ecore.xmi.util.DefaultEcoreBuilder
All Implemented Interfaces:
EcoreBuilder

public class DefaultEcoreBuilder
extends java.lang.Object
implements EcoreBuilder

Default implementation of XML Schema to Ecore builder.


Field Summary
protected  ExtendedMetaData extendedMetaData
           
protected static java.lang.Class<?> XSD_ECORE_BUILDER_CLASS
           
protected static java.lang.reflect.Constructor<?> XSD_ECORE_BUILDER_CONSTRUCTOR
           
protected static java.lang.reflect.Method XSD_ECORE_BUILDER_GENERATE_RESOURCES_METHOD
           
 
Constructor Summary
DefaultEcoreBuilder(ExtendedMetaData extendedMetaData)
           
 
Method Summary
 java.util.Collection<? extends Resource> generate(java.util.Collection<URI> uris)
          Given XML Schema location URIs this method creates corresponding Ecore model(s)
 java.util.Collection<? extends Resource> generate(java.util.Map<java.lang.String,URI> targetNamespaceToURI)
          Given a map of XML Schema targetNamespaces (String) to XML Schema location URIs, this method generates corresponding Ecore model(s).
 java.util.Collection<? extends Resource> generate(URI uri)
          Given an XML schema location URI this method creates corresponding Ecore model(s)
 void setExtendedMetaData(ExtendedMetaData extendedMetaData)
          Sets extended meta data to register generated Ecore models.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

XSD_ECORE_BUILDER_CLASS

protected static final java.lang.Class<?> XSD_ECORE_BUILDER_CLASS

XSD_ECORE_BUILDER_CONSTRUCTOR

protected static final java.lang.reflect.Constructor<?> XSD_ECORE_BUILDER_CONSTRUCTOR

XSD_ECORE_BUILDER_GENERATE_RESOURCES_METHOD

protected static final java.lang.reflect.Method XSD_ECORE_BUILDER_GENERATE_RESOURCES_METHOD

extendedMetaData

protected ExtendedMetaData extendedMetaData
Constructor Detail

DefaultEcoreBuilder

public DefaultEcoreBuilder(ExtendedMetaData extendedMetaData)
Method Detail

setExtendedMetaData

public void setExtendedMetaData(ExtendedMetaData extendedMetaData)
Description copied from interface: EcoreBuilder
Sets extended meta data to register generated Ecore models. Note the same extended meta data should be used for loading/saving an instance document.

Specified by:
setExtendedMetaData in interface EcoreBuilder

generate

public java.util.Collection<? extends Resource> generate(URI uri)
                                                  throws java.lang.Exception
Description copied from interface: EcoreBuilder
Given an XML schema location URI this method creates corresponding Ecore model(s)

Specified by:
generate in interface EcoreBuilder
Parameters:
uri - - location of the XML Schema files.
Returns:
Collection of resources containing the generated models.
Throws:
java.lang.Exception
See Also:
URI

generate

public java.util.Collection<? extends Resource> generate(java.util.Map<java.lang.String,URI> targetNamespaceToURI)
                                                  throws java.lang.Exception
Description copied from interface: EcoreBuilder
Given a map of XML Schema targetNamespaces (String) to XML Schema location URIs, this method generates corresponding Ecore model(s).

Specified by:
generate in interface EcoreBuilder
Parameters:
targetNamespaceToURI - - a map of XML Schema targetNamespaces to XML Schema location URIs
Returns:
Collection of resources containing the generated models.
Throws:
java.lang.Exception
See Also:
URI

generate

public java.util.Collection<? extends Resource> generate(java.util.Collection<URI> uris)
                                                  throws java.lang.Exception
Description copied from interface: EcoreBuilder
Given XML Schema location URIs this method creates corresponding Ecore model(s)

Specified by:
generate in interface EcoreBuilder
Parameters:
uris - - locations of the XML Schema files.
Returns:
Collection of resources containing the generated models.
Throws:
java.lang.Exception
See Also:
URI

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