Package org.apache.ws.commons.schema
Class XmlSchemaAttribute
java.lang.Object
org.apache.ws.commons.schema.XmlSchemaObject
org.apache.ws.commons.schema.XmlSchemaAnnotated
org.apache.ws.commons.schema.XmlSchemaAttributeOrGroupRef
org.apache.ws.commons.schema.XmlSchemaAttribute
- All Implemented Interfaces:
XmlSchemaNamed,XmlSchemaNamedWithForm,XmlSchemaObjectBase,XmlSchemaAttributeGroupMember,XmlSchemaItemWithRef<XmlSchemaAttribute>,XmlSchemaItemWithRefBase
public class XmlSchemaAttribute
extends XmlSchemaAttributeOrGroupRef
implements XmlSchemaNamedWithForm, XmlSchemaAttributeGroupMember, XmlSchemaItemWithRef<XmlSchemaAttribute>
Class for attributes, representing xs:attribute.
This class represents both global and nested attributes.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Stringprivate Stringprivate XmlSchemaNamedWithFormImplprivate XmlSchemaRef<XmlSchemaAttribute> private XmlSchemaSimpleTypeprivate QNameprivate XmlSchemaUseFields inherited from class org.apache.ws.commons.schema.XmlSchemaObject
lineNumber, linePosition, sourceURI -
Constructor Summary
ConstructorsConstructorDescriptionXmlSchemaAttribute(XmlSchema schema, boolean topLevel) Create a new attribute. -
Method Summary
Modifier and TypeMethodDescriptiongetForm()Get the current form, which may be inherited from the parent schema.getName()Retrieve the name.Retrieve the parent schema.getQName()Get the QName for this object.getRef()getUse()The name of this item as it is sent 'over the wire' or stored in an XML file.booleanbooleanTrue if this item has a specified form, false if it inherits from the parent schema.booleanisRef()booleanvoidsetDefaultValue(String defaultValue) voidsetFixedValue(String fixedValue) voidsetForm(XmlSchemaForm form) Set the schema form.voidSet the name.voidsetSchemaType(XmlSchemaSimpleType schemaType) voidsetSchemaTypeName(QName schemaTypeName) voidsetUse(XmlSchemaUse use) Methods inherited from class org.apache.ws.commons.schema.XmlSchemaAnnotated
getAnnotation, getId, getUnhandledAttributes, setAnnotation, setId, setUnhandledAttributes, toStringMethods inherited from class org.apache.ws.commons.schema.XmlSchemaObject
addMetaInfo, equals, getLineNumber, getLinePosition, getMetaInfoMap, getSourceURI, hashCode, setLineNumber, setLinePosition, setMetaInfoMap, setSourceURI
-
Field Details
-
defaultValue
-
fixedValue
-
schemaType
-
schemaTypeName
-
use
-
namedDelegate
-
ref
-
-
Constructor Details
-
XmlSchemaAttribute
Create a new attribute.- Parameters:
schema- containing scheme.topLevel- true if a global attribute.
-
-
Method Details
-
getDefaultValue
-
setDefaultValue
-
getFixedValue
-
setFixedValue
-
getRef
- Specified by:
getRefin interfaceXmlSchemaItemWithRef<XmlSchemaAttribute>
-
getSchemaType
-
setSchemaType
-
getSchemaTypeName
-
setSchemaTypeName
-
getUse
-
setUse
-
getName
Description copied from interface:XmlSchemaNamedRetrieve the name.- Specified by:
getNamein interfaceXmlSchemaNamed- Returns:
- the local name of this object within its schema.
-
getParent
Description copied from interface:XmlSchemaNamedRetrieve the parent schema.- Specified by:
getParentin interfaceXmlSchemaNamed- Returns:
- the containing schema.
-
getQName
Description copied from interface:XmlSchemaNamedGet the QName for this object. This is always the formal name that identifies this item in the schema. If the item has a form (an element or attribute), and the form is 'unqualified', this is not the appropriate QName in an instance document. For those items, the getWiredName method returns the appropriate QName for an instance document.- Specified by:
getQNamein interfaceXmlSchemaNamed- Returns:
- The qualified name of this object.
- See Also:
-
isAnonymous
public boolean isAnonymous()- Specified by:
isAnonymousin interfaceXmlSchemaNamed- Returns:
- true if this object has no name.
-
isTopLevel
public boolean isTopLevel()- Specified by:
isTopLevelin interfaceXmlSchemaNamed- Returns:
- true if this item is a top-level item of the schema; false if this item is nested inside of some other schema object.
-
setName
Description copied from interface:XmlSchemaNamedSet the name. Set to null to render the object anonymous, or to prepare to change it to refer to some other object.- Specified by:
setNamein interfaceXmlSchemaNamed- Parameters:
name- the name.
-
isFormSpecified
public boolean isFormSpecified()Description copied from interface:XmlSchemaNamedWithFormTrue if this item has a specified form, false if it inherits from the parent schema.- Specified by:
isFormSpecifiedin interfaceXmlSchemaNamedWithForm- Returns:
-
getForm
Description copied from interface:XmlSchemaNamedWithFormGet the current form, which may be inherited from the parent schema. This will never return XmlSchemaForm.NONE.- Specified by:
getFormin interfaceXmlSchemaNamedWithForm- Returns:
-
setForm
Description copied from interface:XmlSchemaNamedWithFormSet the schema form.- Specified by:
setFormin interfaceXmlSchemaNamedWithForm- Parameters:
form- Schema form. Pass in XmlSchemaForm.NONE to inherit from the parent schema.
-
getWireName
Description copied from interface:XmlSchemaNamedWithFormThe name of this item as it is sent 'over the wire' or stored in an XML file. If the form is unqualified, this has "" for a namespaceURI. Otherwise, it is the same as getQName().- Specified by:
getWireNamein interfaceXmlSchemaNamedWithForm- Returns:
-
isRef
public boolean isRef()- Specified by:
isRefin interfaceXmlSchemaItemWithRefBase- Returns:
- true if this object has a non-null ref.
-
getTargetQName
- Specified by:
getTargetQNamein interfaceXmlSchemaItemWithRefBase- Returns:
- the Qualified Name of the target of the ref.
-
getRefBase
- Specified by:
getRefBasein interfaceXmlSchemaItemWithRefBase- Returns:
- the non-generic reference object.
-