FileDocCategorySizeDatePackage
XSAttributeDecl.javaAPI DocApache Xerces 3.0.16213Fri Sep 14 20:33:52 BST 2007org.apache.xerces.impl.xs

XSAttributeDecl

public class XSAttributeDecl extends Object implements XSAttributeDeclaration
The XML representation for an attribute declaration schema component is an <attribute> element information item
xerces.internal
author
Elena Litani, IBM
author
Sandy Gao, IBM
version
$Id: XSAttributeDecl.java 449424 2006-09-24 16:22:30Z mrglavas $

Fields Summary
public static final short
SCOPE_ABSENT
public static final short
SCOPE_GLOBAL
public static final short
SCOPE_LOCAL
String
fName
String
fTargetNamespace
org.apache.xerces.impl.dv.XSSimpleType
fType
short
fConstraintType
short
fScope
XSComplexTypeDecl
fEnclosingCT
XSObjectList
fAnnotations
org.apache.xerces.impl.dv.ValidatedInfo
fDefault
Constructors Summary
Methods Summary
public java.lang.ObjectgetActualVC()

        return getConstraintType() == XSConstants.VC_NONE ?
               null :
               fDefault.actualValue;
    
public shortgetActualVCType()

        return getConstraintType() == XSConstants.VC_NONE ?
               XSConstants.UNAVAILABLE_DT :
               fDefault.actualValueType;
    
public XSAnnotationgetAnnotation()
Optional. Annotation.

        return (fAnnotations != null) ? (XSAnnotation) fAnnotations.item(0) : null;
    
public XSObjectListgetAnnotations()
Optional. Annotations.

        return (fAnnotations != null) ? fAnnotations : XSObjectListImpl.EMPTY_LIST;
    
public shortgetConstraintType()
Value constraint: one of default, fixed.

        return fConstraintType;
    
public java.lang.StringgetConstraintValue()
Value constraint: The actual value (with respect to the {type definition}) Should we return Object instead of DOMString?

        // REVISIT: SCAPI: what's the proper representation
        return getConstraintType() == XSConstants.VC_NONE ?
               null :
               fDefault.stringValue();
    
public XSComplexTypeDefinitiongetEnclosingCTDefinition()
Locally scoped declarations are available for use only within the complex type definition identified by the scope property.

        return fEnclosingCT;
    
public ShortListgetItemValueTypes()

        return getConstraintType() == XSConstants.VC_NONE ?
               null :
               fDefault.itemValueTypes;
    
public java.lang.StringgetName()
The name of this XSObject depending on the XSObject type.

        return fName;
    
public java.lang.StringgetNamespace()
The namespace URI of this node, or null if it is unspecified. defines how a namespace URI is attached to schema components.

        return fTargetNamespace;
    
public XSNamespaceItemgetNamespaceItem()

see
org.apache.xerces.xs.XSObject#getNamespaceItem()

        // REVISIT: implement
        return null;
    
public shortgetScope()
Optional. Either global or a complex type definition ( ctDefinition). This property is absent in the case of declarations within attribute group definitions: their scope will be determined when they are used in the construction of complex type definitions.

        return fScope;
    
public shortgetType()
Get the type of the object, i.e ELEMENT_DECLARATION.

        return XSConstants.ATTRIBUTE_DECLARATION;
    
public XSSimpleTypeDefinitiongetTypeDefinition()
A simple type definition

        return fType;
    
public org.apache.xerces.impl.dv.ValidatedInfogetValInfo()

        return fDefault;
    
public voidreset()

        fName = null;
        fTargetNamespace = null;
        fType = null;
        fConstraintType = XSConstants.VC_NONE;
        fScope = XSConstants.SCOPE_ABSENT;
        fDefault = null;
        fAnnotations = null;
    
public voidsetValues(java.lang.String name, java.lang.String targetNamespace, org.apache.xerces.impl.dv.XSSimpleType simpleType, short constraintType, short scope, org.apache.xerces.impl.dv.ValidatedInfo valInfo, XSComplexTypeDecl enclosingCT, XSObjectList annotations)


         
                 
               
              
        fName = name;
        fTargetNamespace = targetNamespace;
        fType = simpleType;
        fConstraintType = constraintType;
        fScope = scope;
        fDefault = valInfo;
        fEnclosingCT = enclosingCT;
        fAnnotations = annotations;