|
Oxygen XML Editor 12.2 Author API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface AuthorNode
Base interface for all Author nodes.
The Author nodes model is similar with the DOM model with the difference
that the TEXT nodes do not exists in this model. The text from the document
is kept separately into a data structure similar to Content from Swing.
The nodes have start and end pointers into the Content, see
and getStartOffset()
methods.
getEndOffset()
The author content contains the entire XML document text and special marker characters.
Each author node points in the content to the start and end marker characters which are used to
delimit it's range.
The image represents part of the document content and red markers represent special control
characters which represent the node ranges.
Field Summary | |
---|---|
static java.lang.String |
NODE_NAME_CDATA
Name of CDATA node. |
static java.lang.String |
NODE_NAME_COMMENT
Name of COMMENT node. |
static java.lang.String |
NODE_NAME_DOCUMENT
Name of DOCUMENT node. |
static java.lang.String |
NODE_NAME_PI
Name of PI node. |
static int |
NODE_TYPE_CDATA
CDATA node type. |
static int |
NODE_TYPE_COMMENT
Comment node type. |
static int |
NODE_TYPE_DOCUMENT
Document node type. |
static int |
NODE_TYPE_ELEMENT
Element node type. |
static int |
NODE_TYPE_PI
Processing instruction node type. |
static int |
NODE_TYPE_PSEUDO_DOCTYPE
Pseudo DOCTYPE node type. |
static int |
NODE_TYPE_PSEUDO_ELEMENT
Pseudo element node type. |
static int |
NODE_TYPE_REFERENCE
Reference node type (entity or other reference nodes, e.g. |
static int |
NODE_TYPE_TEXT
Text node type. |
Method Summary | |
---|---|
java.lang.String |
getDisplayName()
Returns the display name of the node used for visual representation. |
int |
getEndOffset()
Returns the offset in the content which marks the end of the node's range. |
java.lang.String |
getName()
Returns the node name. |
java.lang.String |
getNamespace()
|
AuthorDocument |
getOwnerDocument()
Returns the document to which this element belongs. |
AuthorNode |
getParent()
|
int |
getStartOffset()
Returns the offset in the content which marks the start of the node's range. |
java.lang.String |
getTextContent()
Returns the nodes text content. |
int |
getType()
Returns the node type. |
java.net.URL |
getXMLBaseURL()
The returned URL represents the value of base URL in the current nodes context. |
boolean |
isDescendentOf(AuthorNode ancestor)
See if this node is a descendant of the given node. |
Field Detail |
---|
static final int NODE_TYPE_ELEMENT
static final int NODE_TYPE_TEXT
static final int NODE_TYPE_DOCUMENT
static final int NODE_TYPE_COMMENT
static final int NODE_TYPE_CDATA
static final int NODE_TYPE_PI
static final int NODE_TYPE_PSEUDO_ELEMENT
static final int NODE_TYPE_REFERENCE
xinclude
elements).
The value is 7.
static final int NODE_TYPE_PSEUDO_DOCTYPE
static final java.lang.String NODE_NAME_CDATA
#cdata
.
static final java.lang.String NODE_NAME_COMMENT
#comment
.
static final java.lang.String NODE_NAME_DOCUMENT
#document
.
static final java.lang.String NODE_NAME_PI
#processing-instruction
.
Method Detail |
---|
AuthorDocument getOwnerDocument()
AuthorDocument
to which this element belongs.
Returns null
if this element is part of a document fragment.
For more details see AuthorDocumentFragment
.boolean isDescendentOf(AuthorNode ancestor)
ancestor
- The AuthorNode
tested to see if it is an ancestor of this node.
true
if the given node is an ancestor of this node.int getType()
NODE_TYPE_CDATA
, NODE_TYPE_COMMENT
, NODE_TYPE_DOCUMENT
,
NODE_TYPE_ELEMENT
, NODE_TYPE_PI
, NODE_TYPE_PSEUDO_DOCTYPE
,
NODE_TYPE_PSEUDO_ELEMENT
, NODE_TYPE_REFERENCE
.
int getStartOffset()
int getEndOffset()
java.lang.String getName()
NODE_TYPE_ELEMENT
- the qualified name of the elementNODE_TYPE_CDATA
- the constant NODE_NAME_CDATA
NODE_TYPE_COMMENT
- the constant NODE_NAME_COMMENT
NODE_TYPE_DOCUMENT
- the constant NODE_NAME_DOCUMENT
NODE_TYPE_REFERENCE
- the name of the entityNODE_TYPE_PI
- the constant NODE_NAME_PI
AuthorNode getParent()
AuthorNode
representing the parent of this element,
or null
if this is the root element.java.lang.String getDisplayName()
java.net.URL getXMLBaseURL()
'xml:base'
attributes from the ancestors and the document URL if necessary.
If no 'xml:base'
attribute is present, the document system ID
will be returned.
See specification: http://www.w3.org/TR/xmlbase/.
java.lang.String getTextContent() throws javax.swing.text.BadLocationException
javax.swing.text.BadLocationException
- If the text content cannot be obtained.java.lang.String getNamespace()
|
Oxygen XML Editor 12.2 Author API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |