Hello All,
Based on today's call I believe the following are agreed upon method
names and javadoc comments.
/**
* Returns the non-anyoumous (named) type, 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 getNamedType(String uri, String typeName);
/**
*
Returns true if the type is an anonymous XSD type, that is, a type without a name attribute
* @param type to identify if a global type.
* @return true if the type is an anonymous XSD type, else false.
*/
public boolean isAnonymous(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);
-Blaise
Blaise Doughan wrote:
4B4CBB3E.4070004@oracle.com" type="cite">
Hello All,
Based on today's discussion the following modifications may be
appropriate:
- Type getNamedType(String uri, String typeName)
instead
of Type getGlobalType(String uri, String typeName).
- public boolean isNamedType(Type type) instead of public
boolean isGlobalType(Type type).
Although the use of global/local complex type isn't unheard of:
-Blaise
Blaise Doughan wrote:
4B4B4ADE.4020407@oracle.com" type="cite">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:
- Update section 4.13.3 XSDHelper methods, add the following
items
to the list:
- Access a Types based on XML representation characteristics
- Identify if a Type is represented as a global XML type
- Identify if a Property is represented as a global XML
element
or attribute
- Update section 4.13.4 XSDHelper Interface
- Add the new methods to this graphic.
Java Spec
- Update section 2.17.2 XSDHelper Interface
- Add the new methods to the interface.
-Blaise
|