FileDocCategorySizeDatePackage
XSAttributeDecl.javaAPI DocJava SE 6 API5633Tue Jun 10 00:22:44 BST 2008com.sun.org.apache.xerces.internal.impl.xs

XSAttributeDecl

public class XSAttributeDecl extends Object implements XSAttributeDeclaration
The XML representation for an attribute declaration schema component is an element information item
xerces.internal
author
Elena Litani, IBM
author
Sandy Gao, IBM
version
$Id: XSAttributeDecl.java,v 1.2.6.1 2005/09/09 07:30:54 sunithareddy Exp $

Fields Summary
public static final short
SCOPE_ABSENT
public static final short
SCOPE_GLOBAL
public static final short
SCOPE_LOCAL
String
fName
String
fTargetNamespace
XSSimpleType
fType
short
fConstraintType
short
fScope
XSComplexTypeDecl
fEnclosingCT
XSAnnotationImpl
fAnnotation
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 com.sun.org.apache.xerces.internal.xs.XSAnnotationgetAnnotation()
Optional. Annotation.

        return fAnnotation;
    
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 com.sun.org.apache.xerces.internal.xs.XSComplexTypeDefinitiongetEnclosingCTDefinition()
Locally scoped declarations are available for use only within the complex type definition identified by the scope property.

        return fEnclosingCT;
    
public com.sun.org.apache.xerces.internal.xs.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 com.sun.org.apache.xerces.internal.xs.XSNamespaceItemgetNamespaceItem()

see
com.sun.org.apache.xerces.internal.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 com.sun.org.apache.xerces.internal.xs.XSSimpleTypeDefinitiongetTypeDefinition()
A simple type definition

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

        return fDefault;
    
public voidreset()

        fName = null;
        fTargetNamespace = null;
        fType = null;
        fConstraintType = XSConstants.VC_NONE;
        fScope = XSConstants.SCOPE_ABSENT;
        fDefault = null;
        fAnnotation = null;
    
public voidsetValues(java.lang.String name, java.lang.String targetNamespace, com.sun.org.apache.xerces.internal.impl.dv.XSSimpleType simpleType, short constraintType, short scope, com.sun.org.apache.xerces.internal.impl.dv.ValidatedInfo valInfo, com.sun.org.apache.xerces.internal.impl.xs.XSComplexTypeDecl enclosingCT, com.sun.org.apache.xerces.internal.impl.xs.XSAnnotationImpl annotation)


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