|
Oxygen XML Editor 11.2 Author API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectro.sync.contentcompletion.xml.Context
public class Context
The context for a node contains:
ContextElement up to the root.
These represent the ancestors of the element for which the Context was built.ContextElement representing the siblings
of the element for which the Context was built. Context was built.
| Field Summary | |
|---|---|
protected Stack<ContextElement> |
elementStack
The stack with the ContextElement objects,
ancestors of the element for which the Context was built. |
protected ProxyNamespaceMapping |
prefixNamespaceMapping
The mapping between namespace prefixes and URI's determined to the point where the Context was built. |
protected List<ContextElement> |
previousSiblingElements
The list of ContextElement objects representing the previous siblings
(in document order) of the element for which the Context was built. |
protected XMLReader |
xmlReader
The XMLReader used to create sources
for executing XPath expressions in the Context. |
| Constructor Summary | |
|---|---|
Context()
|
|
| Method Summary | |
|---|---|
Object |
clone()
|
List<String> |
executeXPath(String expression,
String[] prefixNamespaceMappings)
Executes an XPath expression over the entire document. |
Stack<ContextElement> |
getElementStack()
Gets the stack of ContextElement representing the ancestors of the element
for which the Context was built. |
ProxyNamespaceMapping |
getPrefixNamespaceMapping()
Gets the mapping between namespace prefixes and URI's to the point the Context was built. |
List<ContextElement> |
getPreviousSiblingElements()
Get the list of previous sibling elements of the element the Context was built for. |
Attribute[] |
getRootAttributes()
Get the list with the attributes of the root element. |
void |
pushContextElement(ContextElement element,
List<ContextElement> previousSiblingElements)
Updates the context by adding the given element in the context. |
void |
setElementStack(Stack<ContextElement> elementStack)
Sets the stack consisting of ContextElement representing the ancestor elements
of the element for which the Context was built. |
void |
setPrefixNamespaceMapping(ProxyNamespaceMapping prefixNamespaceMapping)
Sets the mapping between the namespace prefixes and URI's to the point where the Context was built. |
void |
setPreviousSiblingElements(List<ContextElement> previousSiblingElements)
Sets the list of ContextElement representing the previous siblings (in document order)
of the element the Context was built for. |
void |
setXMLReader(XMLReader xmlReader)
Set the XMLReader used for creating a SAX source. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Stack<ContextElement> elementStack
ContextElement objects,
ancestors of the element for which the Context was built.
protected ProxyNamespaceMapping prefixNamespaceMapping
Context was built.
protected List<ContextElement> previousSiblingElements
ContextElement objects representing the previous siblings
(in document order) of the element for which the Context was built.
protected XMLReader xmlReader
XMLReader used to create sources
for executing XPath expressions in the Context.
| Constructor Detail |
|---|
public Context()
| Method Detail |
|---|
public void setElementStack(Stack<ContextElement> elementStack)
ContextElement representing the ancestor elements
of the element for which the Context was built.
The root is always added the first on the stack.
elementStack - The stack of ancestor ContextElement.public Stack<ContextElement> getElementStack()
ContextElement representing the ancestors of the element
for which the Context was built.
The root is always added the first on the stack.
ContextElement.public void setPrefixNamespaceMapping(ProxyNamespaceMapping prefixNamespaceMapping)
Context was built.
prefixNamespaceMapping - The new mapping to be set.public ProxyNamespaceMapping getPrefixNamespaceMapping()
Context was built.
public Attribute[] getRootAttributes()
Attribute objects
representing the attributes of the root element.public void setPreviousSiblingElements(List<ContextElement> previousSiblingElements)
ContextElement representing the previous siblings (in document order)
of the element the Context was built for.
previousSiblingElements - The list of previous sibling ContextElement.public List<ContextElement> getPreviousSiblingElements()
Context was built for.
ContextElement, or null if no previous siblings
exist for the current element.
public List<String> executeXPath(String expression,
String[] prefixNamespaceMappings)
expression - The XPath expression to be executed.prefixNamespaceMappings - An array of prefixes followed by namespace URI's
representing the namespace mappings to the point of the Context.
null.public void setXMLReader(XMLReader xmlReader)
XMLReader used for creating a SAX source. The content completion
proposals for XSD and XSL documents are obtained by running XPath queries
on this SAX source.
xmlReader - The new XMLReader.
public void pushContextElement(ContextElement element,
List<ContextElement> previousSiblingElements)
element - Context element to be added.previousSiblingElements - Previous siblings for the new insert position. They are children of the given element
and the insertion position is after them.public Object clone()
clone in class ObjectObject.clone()
|
Oxygen XML Editor 11.2 Author API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||