[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Proposal SDO-151: Accessing Global Types and Properties using XSDHelper
Hello All, Below is a proposal for SDO-151: Accessing Global Types and Properties using XSDHelper. New XSDHelper API - Type getGlobalType(String, String): The following method will allow users to look up SDO Types based on the XMLSchema type name and URI. This is useful since through either name mangling or annotations the SDO type name/URI could differ from the XML schema type name/URI. This method is very similar in feel and purpose to the existing API: Property getGlobalProperty(String uri, String propertyName, boolean isElement). /** * Returns the Type defined by the named global type in the targetNamespace * uri, or null if not found. If the SDO name for a type is different than * the XSD name, then only the XSD name is used for the lookup. Passing in * <code>null</code> or <code>""</code> for the <code>uri</code> parameter * means that a type defined in a Schema with no target namespace will be * returned. * @param uri The uri of the targetNamespace. * @param typeName The name of the global type. * @return the Type defined by the named global type in the targetNamespace uri, or null if not found. */ public Type getGlobalType(String uri, String typeName); New XSDHelper APIs - boolean isGlobalType(Type type) & boolean isGlobalProperty(Property property): The following methods will allow users to determine in SDO types and properties correspond to global items in an XML schema. These methods are very similar in feel and purpose to the existing API: boolean isAttribute(Property property), boolean isElement(Property property), boolean isMixed(Type type). /** * Returns true if the type is declared as an global type in the XSD. * @param type to identify if a global type. * @return true if the type is declared as a global type in the XSD. */ public boolean isGlobalType(Type type); /** * Returns true if the property is declared as a global element or attribute in * the XSD. * @param property to identify if a global element or attribute. * @return true if the property is declared as an global element or attribute in the XSD. */ public boolean isGlobalProperty(Property property); Core Spec:
Java Spec
-Blaise |
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]