org.apache.ws.commons.schema.walker
Class XmlSchemaAttrInfo

java.lang.Object
  extended by org.apache.ws.commons.schema.walker.XmlSchemaAttrInfo

public class XmlSchemaAttrInfo
extends Object

This represents a complete XML Schema Attribute, after references are followed and types are defined.


Constructor Summary
XmlSchemaAttrInfo(XmlSchemaAttribute attribute, XmlSchemaTypeInfo attrType)
          Constructs a new XmlSchemaAttrInfo from the provided XmlSchemaAttribute and XmlSchemaTypeInfo.
 
Method Summary
 XmlSchemaAttribute getAttribute()
          The underlying XmlSchemaAttribute.
 XmlSchemaTypeInfo getType()
          The attribute's value type.
 boolean isTopLevel()
          Whether the attribute exists in the global namespace.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlSchemaAttrInfo

public XmlSchemaAttrInfo(XmlSchemaAttribute attribute,
                         XmlSchemaTypeInfo attrType)
Constructs a new XmlSchemaAttrInfo from the provided XmlSchemaAttribute and XmlSchemaTypeInfo.

The XmlSchemaAttribute represents the XML attribute definition after any references have been resolved, and merged with the global definition.

Parameters:
attribute - The underlying XmlSchemaAttribute.
attrType - The attribute's type.
Method Detail

getAttribute

public XmlSchemaAttribute getAttribute()
The underlying XmlSchemaAttribute. If the attribute was originally a reference, this instance is merged with the global attribute it referenced.

The only exception is with XmlSchemaAttribute.isTopLevel(). A copy of the XmlSchemaAttribute may have been made in order to properly merge a local reference with a global definition. When that happens, XmlSchemaAttribute.isTopLevel() may not return the correct result. Use isTopLevel() instead.


getType

public XmlSchemaTypeInfo getType()
The attribute's value type.


isTopLevel

public boolean isTopLevel()
Whether the attribute exists in the global namespace. Because a copy of XmlSchemaAttribute may have been made in order to merge a local reference with the global definition, XmlSchemaAttribute.isTopLevel() may no longer be accurate.



Copyright © 2004-2015 The Apache Software Foundation. All Rights Reserved.