|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.bea.schema.SOMObject com.bea.schema.SOMBasic
Abstract base class for SOMElement and SOMAttribute. SOMBasic provides the functionality common to both SOMElement and SOMAttribute.
SOMAttribute
,
SOMElement
,
SOMSchema
,
Serialized FormConstructor Summary | |
SOMBasic(SOMBasic ref)
Construct an element using another element as a reference. |
|
SOMBasic(String name)
|
Method Summary | |
SOMAnnotation |
addAnnotation()
create a new empty annotation element for this element. |
SOMAnnotation |
addAnnotation(SOMAnnotation annotation)
add an annotation to the schema tree. |
SOMComplexType |
addComplexType()
sets the element type to a newly constructed complexType. |
SOMDocumentation |
addDocumentation(String info)
adds a documentation element to a new annotation element for this element. |
SOMSequence |
addSequence()
adds a SOMSequence to this element. |
SOMSimpleType |
addSimpleType()
sets the element type to a newly constructed simpleType. |
boolean |
contains(SOMObject child)
Determine if an object is child of this element. |
void |
createDefault(DefaultDocumentOptions options,
Element current)
create a default org.w3c.dom.Element. |
SOMAnnotation |
getAnnotation()
return the associated Annotation object |
Map |
getAttributes(boolean getAll)
retrieve the attributes for this schema element. |
String |
getDefault()
get the "default" attribute. |
String |
getFixed()
get the "fixed" attribute. |
String |
getForm()
get the "form" attribute. |
String |
getName()
get the "name" attribute. |
SOMReference |
getRef()
get the "ref" attribute. |
SOMType |
getType()
get the "type" attribute as a SOMType object. |
String |
getTypeName()
get the "type" attribute as a String. |
boolean |
isRef()
Is this element a reference to another element. |
boolean |
isValidatingContent()
get the current validation setting |
SOMAnnotation |
removeAnnotation()
set the annotation for this type to null. |
void |
setDefault(String p_default)
The default attribute for an schema element. |
void |
setFixed(String fixed)
The fixed attribute for an schema element. |
void |
setForm(String form)
set the "form" attribute. |
void |
setName(String name)
set the "name" attribute. |
void |
setRef(SOMReference ref)
set the element to which this element should reference. |
void |
setRef(SOMUnresolvedReference ref)
set the element to which this element should reference. |
SOMType |
setType(SOMType type)
sets the type attribute or complexType/simpleType for the element. |
void |
toXML(Writer rtn,
int indent)
Outputs a formatted XML representation of SOMObject. |
Methods inherited from class com.bea.schema.SOMObject |
addPrefixMapping, getContainmentXPath, getEffectivePrefixMappings, getID_UQ, getID, getParent, getParentName, getParentSchema, getPrefixForTargetNamespace, getPrefixMapping, getTargetNamespace, getURIForPrefix, isCircularReference, isSchemaChild, msg, msg, removeNamespaceQualifier, removePrefixMapping, setIndent, setParent, setTargetNamespace, toString, toXML, toXML, toXML |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.bea.schema.SOMReference |
getID |
Constructor Detail |
public SOMBasic(String name)
public SOMBasic(SOMBasic ref)
<element name="name" type="xsd:string"> <element ref="name"> SOMElement name = new SOMElement("name", SOMType.STRING); SOMElement name_reference = new SOMElement(name);
ref
- the element to be used as a reference pointMethod Detail |
public void setName(String name)
name
- the element namepublic void setForm(String form)
If form is present and its actual value is qualified, or if form is absent and the actual value of attributeFormDefault on the <schema>ancestor is qualified, then the actual value of the targetNamespace [attribute] of the parent <schema> element information item, or absent if there is none, otherwise absent.
Valid values for form:
form
- qualified or unqualifiedpublic void setFixed(String fixed)
Setting the fixed attribute causes the default attribute to be erased. fixed and default must not both be present.
fixed
- the value for this instance document elementpublic void setDefault(String p_default)
Setting the default attribute causes the fixed attribute to be erased. fixed and "default" must not both be present.
p_default
- The default value for this elementpublic void setRef(SOMReference ref)
setRef
in interface SOMReference
ref
- the element to be referencedpublic void setRef(SOMUnresolvedReference ref)
ref
- the element to be referencedpublic SOMType setType(SOMType type)
type
- The type value for this element
public String getName()
getName
in interface SOMReference
public String getForm()
public String getDefault()
public String getFixed()
public boolean isRef()
public SOMReference getRef()
public SOMType getType()
public String getTypeName()
public SOMDocumentation addDocumentation(String info)
SOMAttribute myAttr ... ... SOMAnnotation note = myAttr.addAnnotation(); note.addDocumentation(info);
info
- The documentation string to be added
public SOMAnnotation addAnnotation()
public SOMAnnotation addAnnotation(SOMAnnotation annotation)
annotation
- a previously created annotation
public SOMAnnotation removeAnnotation()
public SOMComplexType addComplexType()
public SOMSimpleType addSimpleType()
public SOMSequence addSequence()
public boolean contains(SOMObject child)
contains
in interface SOMReference
child
- the object in question
public SOMAnnotation getAnnotation()
public Map getAttributes(boolean getAll)
getAll
- get all attributes
public void toXML(Writer rtn, int indent) throws IOException
SOMObject
toXML
in class SOMObject
rtn
- printable XML Schemaindent
- the indent level for formatting at which to start this schema object.
IOException
- if IOExcpetion is thrown by underlying java.io.Writerpublic void createDefault(DefaultDocumentOptions options, Element current)
options
- Default optionscurrent
- the current Element to be modifiedSOMSchema
public boolean isValidatingContent()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |