org.apache.tuscany.sdo.helper
Class XSDHelperImpl

java.lang.Object
  extended by org.apache.tuscany.sdo.helper.XSDHelperImpl
All Implemented Interfaces:
commonj.sdo.helper.XSDHelper

public class XSDHelperImpl
extends java.lang.Object
implements commonj.sdo.helper.XSDHelper

Provides access to additional information when the Type or Property is defined by an XML Schema (XSD). Methods return null/false otherwise or if the information is unavailable. Defines Types from an XSD.


Field Summary
 
Fields inherited from interface commonj.sdo.helper.XSDHelper
INSTANCE
 
Constructor Summary
XSDHelperImpl(org.eclipse.emf.ecore.util.ExtendedMetaData extendedMetaData)
           
XSDHelperImpl(commonj.sdo.helper.TypeHelper typeHelper)
           
 
Method Summary
protected  java.util.List define(org.xml.sax.InputSource inputSource, java.lang.String schemaLocation)
           
 java.util.List define(java.io.InputStream xsdInputStream, java.lang.String schemaLocation)
           
 java.util.List define(java.io.Reader xsdReader, java.lang.String schemaLocation)
           
 java.util.List define(java.lang.String xsd)
           
 java.lang.String generate(java.util.List types)
           
 java.lang.String generate(java.util.List types, java.util.Map namespaceToSchemaLocation)
           
protected  java.lang.String getAppinfo(org.eclipse.emf.ecore.EModelElement eModelElement, java.lang.String source)
           
 java.lang.String getAppinfo(commonj.sdo.Property property, java.lang.String source)
           
 java.lang.String getAppinfo(commonj.sdo.Type type, java.lang.String source)
           
 commonj.sdo.Property getGlobalProperty(java.lang.String uri, java.lang.String propertyName, boolean isElement)
           
 java.lang.String getLocalName(commonj.sdo.Property property)
           
 java.lang.String getLocalName(commonj.sdo.Type type)
           
 java.lang.String getNamespaceURI(commonj.sdo.Property property)
           
 boolean isAttribute(commonj.sdo.Property property)
           
 boolean isElement(commonj.sdo.Property property)
           
 boolean isMixed(commonj.sdo.Type type)
           
 boolean isXSD(commonj.sdo.Type type)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XSDHelperImpl

public XSDHelperImpl(org.eclipse.emf.ecore.util.ExtendedMetaData extendedMetaData)

XSDHelperImpl

public XSDHelperImpl(commonj.sdo.helper.TypeHelper typeHelper)
Method Detail

getLocalName

public java.lang.String getLocalName(commonj.sdo.Type type)
Specified by:
getLocalName in interface commonj.sdo.helper.XSDHelper

getLocalName

public java.lang.String getLocalName(commonj.sdo.Property property)
Specified by:
getLocalName in interface commonj.sdo.helper.XSDHelper

getNamespaceURI

public java.lang.String getNamespaceURI(commonj.sdo.Property property)
Specified by:
getNamespaceURI in interface commonj.sdo.helper.XSDHelper

isAttribute

public boolean isAttribute(commonj.sdo.Property property)
Specified by:
isAttribute in interface commonj.sdo.helper.XSDHelper

isElement

public boolean isElement(commonj.sdo.Property property)
Specified by:
isElement in interface commonj.sdo.helper.XSDHelper

isMixed

public boolean isMixed(commonj.sdo.Type type)
Specified by:
isMixed in interface commonj.sdo.helper.XSDHelper

isXSD

public boolean isXSD(commonj.sdo.Type type)
Specified by:
isXSD in interface commonj.sdo.helper.XSDHelper

getGlobalProperty

public commonj.sdo.Property getGlobalProperty(java.lang.String uri,
                                              java.lang.String propertyName,
                                              boolean isElement)
Specified by:
getGlobalProperty in interface commonj.sdo.helper.XSDHelper

getAppinfo

public java.lang.String getAppinfo(commonj.sdo.Type type,
                                   java.lang.String source)
Specified by:
getAppinfo in interface commonj.sdo.helper.XSDHelper

getAppinfo

public java.lang.String getAppinfo(commonj.sdo.Property property,
                                   java.lang.String source)
Specified by:
getAppinfo in interface commonj.sdo.helper.XSDHelper

getAppinfo

protected java.lang.String getAppinfo(org.eclipse.emf.ecore.EModelElement eModelElement,
                                      java.lang.String source)

define

public java.util.List define(java.lang.String xsd)
Specified by:
define in interface commonj.sdo.helper.XSDHelper

define

public java.util.List define(java.io.Reader xsdReader,
                             java.lang.String schemaLocation)
Specified by:
define in interface commonj.sdo.helper.XSDHelper

define

public java.util.List define(java.io.InputStream xsdInputStream,
                             java.lang.String schemaLocation)
Specified by:
define in interface commonj.sdo.helper.XSDHelper

define

protected java.util.List define(org.xml.sax.InputSource inputSource,
                                java.lang.String schemaLocation)

generate

public java.lang.String generate(java.util.List types)
                          throws java.lang.IllegalArgumentException
Specified by:
generate in interface commonj.sdo.helper.XSDHelper
Throws:
java.lang.IllegalArgumentException

generate

public java.lang.String generate(java.util.List types,
                                 java.util.Map namespaceToSchemaLocation)
                          throws java.lang.IllegalArgumentException
Specified by:
generate in interface commonj.sdo.helper.XSDHelper
Throws:
java.lang.IllegalArgumentException


Copyright © 2006 Apache Software Foundation. All Rights Reserved.