Apache CXF API

org.apache.cxf.javascript
Class AttributeInfo

java.lang.Object
  extended by org.apache.cxf.javascript.AttributeInfo
All Implemented Interfaces:
ItemInfo

public final class AttributeInfo
extends Object
implements ItemInfo

All the information needed to create the JavaScript for an Xml Schema attribute or xs:anyAttribute.


Method Summary
static AttributeInfo forGlobalAttribute(org.apache.ws.commons.schema.XmlSchemaAttribute attribute, org.apache.ws.commons.schema.XmlSchema currentSchema, SchemaCollection schemaCollection, NamespacePrefixAccumulator prefixAccumulator)
          Create an elementInfo that stores information about a global, named, element.
static AttributeInfo forLocalItem(org.apache.ws.commons.schema.XmlSchemaObject sequenceObject, org.apache.ws.commons.schema.XmlSchema currentSchema, SchemaCollection schemaCollection, NamespacePrefixAccumulator prefixAccumulator, QName contextName)
          Fill in an AttributeInfo for an attribute or anyAttribute from a sequence.
 org.apache.ws.commons.schema.XmlSchemaAnnotated getAnnotated()
          Return the object for the Attribute or the anyAttribute.
 org.apache.ws.commons.schema.XmlSchemaType getContainingType()
           
 String getDefaultValue()
          *
 String getFixedValue()
           
 String getJavascriptName()
           
 org.apache.ws.commons.schema.XmlSchemaType getType()
           
 String getXmlName()
           
 boolean isAny()
           
 boolean isAnyType()
           
 boolean isArray()
           
 boolean isGlobal()
          True if this describes a global, named, attribute.
 boolean isNillable()
           
 boolean isOptional()
           
 void setContainingType(org.apache.ws.commons.schema.XmlSchemaType containingType)
           
 void setDefaultValue(String value)
           
 void setFixedValue(String fixedValue)
           
 void setJavascriptName(String name)
           
 void setType(org.apache.ws.commons.schema.XmlSchemaType type)
           
 void setXmlName(String elementXmlName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

forGlobalAttribute

public static AttributeInfo forGlobalAttribute(org.apache.ws.commons.schema.XmlSchemaAttribute attribute,
                                               org.apache.ws.commons.schema.XmlSchema currentSchema,
                                               SchemaCollection schemaCollection,
                                               NamespacePrefixAccumulator prefixAccumulator)
Create an elementInfo that stores information about a global, named, element.

Parameters:
attribute - the element
currentSchema - the schema it came from.
schemaCollection - the collection of all schemas.
prefixAccumulator - the accumulator that assigns prefixes.
Returns:

forLocalItem

public static AttributeInfo forLocalItem(org.apache.ws.commons.schema.XmlSchemaObject sequenceObject,
                                         org.apache.ws.commons.schema.XmlSchema currentSchema,
                                         SchemaCollection schemaCollection,
                                         NamespacePrefixAccumulator prefixAccumulator,
                                         QName contextName)
Fill in an AttributeInfo for an attribute or anyAttribute from a sequence.

Parameters:
sequenceElement -
currentSchema -
schemaCollection -
prefixAccumulator -
Returns:

getAnnotated

public org.apache.ws.commons.schema.XmlSchemaAnnotated getAnnotated()
Return the object for the Attribute or the anyAttribute.

Returns:

getJavascriptName

public String getJavascriptName()
Specified by:
getJavascriptName in interface ItemInfo

setJavascriptName

public void setJavascriptName(String name)

getXmlName

public String getXmlName()

setXmlName

public void setXmlName(String elementXmlName)

getContainingType

public org.apache.ws.commons.schema.XmlSchemaType getContainingType()

setContainingType

public void setContainingType(org.apache.ws.commons.schema.XmlSchemaType containingType)

getType

public org.apache.ws.commons.schema.XmlSchemaType getType()
Specified by:
getType in interface ItemInfo

setType

public void setType(org.apache.ws.commons.schema.XmlSchemaType type)

isAny

public boolean isAny()
Specified by:
isAny in interface ItemInfo

isAnyType

public boolean isAnyType()

getDefaultValue

public String getDefaultValue()
*

Specified by:
getDefaultValue in interface ItemInfo
Returns:
Returns the defaultValue.

isGlobal

public boolean isGlobal()
True if this describes a global, named, attribute.

Returns:

getFixedValue

public String getFixedValue()

setFixedValue

public void setFixedValue(String fixedValue)

isArray

public boolean isArray()
Specified by:
isArray in interface ItemInfo

isNillable

public boolean isNillable()
Specified by:
isNillable in interface ItemInfo

isOptional

public boolean isOptional()
Specified by:
isOptional in interface ItemInfo

setDefaultValue

public void setDefaultValue(String value)
Specified by:
setDefaultValue in interface ItemInfo

Apache CXF API

Apache CXF