|
WebLogic Integration | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.bea.schema.helper.SOMHelper
A helper class for the Schema Object Model (SOM) providing methods that can be used to create XML documents based on an XML Schema.
Constructor Summary | |
SOMHelper(SOMSchema som)
Construct a new SOMHelper Object. |
Method Summary | |
java.util.List |
getAllowedAttributes(org.w3c.dom.Node node,
boolean bExamineExisting)
Obtain a java.util.List of
com.bea.schema.SOMAttribute s available for the given
org.w3c.dom.Node , taking into account the current
attributes, if specified. |
java.util.List |
getAllowedChildren(org.w3c.dom.Node element,
boolean bExamineChildren)
Return a java.util.List of allowable child element nodes
(com.bea.schema.SOMElement) for a given XML node
(org.w3c.dom.Node ) based on this SOM. |
java.util.List |
getAllowedChildren(org.w3c.dom.Node element,
boolean bExamineChildren,
java.util.List allowedChildren)
Return a java.util.List of allowable child element nodes
(com.bea.schema.SOMElement) for a given XML node
(org.w3c.dom.Node ) based on this SOM. |
java.util.List |
getAllowedSiblings(org.w3c.dom.Node element,
boolean bExamineChildren)
A conveniece method that returns a java.util.List of
org.w3c.dom.Nodes allowable as children of the provided
org.w3c.dom.Node 's parent. |
java.util.List |
getAllowedSiblings(org.w3c.dom.Node element,
boolean bExamineChildren,
java.util.List allowedChildren)
A conveniece method that returns a java.util.List of
org.w3c.dom.Nodes allowable as children of the provided
org.w3c.dom.Node 's parent. |
void |
showMap()
For debugging, displays the dom-som mappings. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public SOMHelper(SOMSchema som)
som
- a SOMSchema
object representing the schema being
used.Method Detail |
public java.util.List getAllowedChildren(org.w3c.dom.Node element, boolean bExamineChildren) throws SOMHelperException
java.util.List
of allowable child element nodes
(com.bea.schema.SOMElement) for a given XML node
(org.w3c.dom.Node
) based on this SOM. The list will contain
either all the possible children or just the children allowable taking
into account the current children of the XML node.
element
- the org.w3c.dom.Node
representing the XML
node for which children will be obtained.bExamineChildren
- a boolean
flag that if
true
indicates that the returned list will contain only
those children which are allowed accounting for existing children of
element. If false
the returned list will
contain all possible children of element.List
of allowable children based on the
bExamineChildren flag.public java.util.List getAllowedSiblings(org.w3c.dom.Node element, boolean bExamineChildren) throws SOMHelperException
java.util.List
of
org.w3c.dom.Nodes
allowable as children of the provided
org.w3c.dom.Node
's parent. When siblings are taken into
account the returned list of elements is valid only as the last
child of the parent (i.e. - the sibling used does not change the outcome
of the returned list - this call maps directly to a call of:
getAllowedChildren(element.getParentNode(),
bExamineSiblings)
;)
element
- the org.w3c.dom.Node
representing the XML
node for which siblings will be obtained.bExamineChildren
- a boolean
flag that if
true
indicates that the returned list will contain only
those siblings which are allowed accounting for existing children of
element's parent node. If false
the returned list
will contain all possible children of element's parent node.public java.util.List getAllowedSiblings(org.w3c.dom.Node element, boolean bExamineChildren, java.util.List allowedChildren) throws SOMHelperException
java.util.List
of
org.w3c.dom.Nodes
allowable as children of the provided
org.w3c.dom.Node
's parent. When siblings are taken into
account the returned list of elements is valid only as the last
child of the parent (i.e. - the sibling used does not change the outcome
of the returned list - this call maps directly to a call of:
getAllowedChildren(element.getParentNode(),
bExamineSiblings)
;)
element
- the org.w3c.dom.Node
representing the XML
node for which siblings will be obtained.bExamineChildren
- a boolean
flag that if
true
indicates that the returned list will contain only
those siblings which are allowed accounting for existing children of
element's parent node. If false
the returned list
will contain all possible children of element's parent node.allowedChildren
- a List
to which the allowable
children are appended, if not null
. The object
implementing this List interface must implement the
add(Object)
and
addAll(Collection)
methods.public java.util.List getAllowedChildren(org.w3c.dom.Node element, boolean bExamineChildren, java.util.List allowedChildren) throws SOMHelperException
java.util.List
of allowable child element nodes
(com.bea.schema.SOMElement) for a given XML node
(org.w3c.dom.Node
) based on this SOM. The list will contain
either all the possible children or just the children allowable taking
into account the current children of the XML node.
element
- the orgw3c.dom.Node
representing the XML
node for which children will be obtained.bExamineChildren
- a boolean
flag that if
true
indicates that the returned list will contain only
those children which are allowed accounting for existing children of
element. If false
the returned list will
contain all possible children of element.allowedChildren
- a List
to which the allowable
children are appended, if not null
. The object
implementing this List interface must implement the
add(Object)
and
addAll(Collection)
methods.List
of allowable children based on the
bExamineChildren flag. This will be allowedChildren with
the allowable children appended if allowedChildren was not
null
, if allowedChildren was null
this
will be a new List
.public java.util.List getAllowedAttributes(org.w3c.dom.Node node, boolean bExamineExisting) throws SOMHelperException
java.util.List
of
com.bea.schema.SOMAttribute
s available for the given
org.w3c.dom.Node
, taking into account the current
attributes, if specified.
node
- the XML org.w3c.dom.Node
for which the
attributes will be obtained. null
will result in an empty
Vector
being returned.bExaminExisting
- a flag indicating if node
's current
attributes should be taken into account when returning the list of
available attributes. true
indicates that the exisiting
attributes should be taken into account, false
indicates
that the current attributes should not be accounted for thus providing
all allowable attributes allowable for the node.List
of attributes available for the node based
on the bExamineExisiting
flag. If no attributes are
available for the node an empty List
is returned,
null
is returned if node is null
.public void showMap()
|
WebLogic Integration | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |