com.sun.org.apache.xerces.internal.dom
public class: NotationImpl [javadoc |
source]
java.lang.Object
com.sun.org.apache.xerces.internal.dom.NodeImpl
com.sun.org.apache.xerces.internal.dom.NotationImpl
All Implemented Interfaces:
Notation, Cloneable, Node, EventTarget, Serializable, NodeList
Direct Known Subclasses:
DeferredNotationImpl
Notations are how the Document Type Description (DTD) records hints
about the format of an XML "unparsed entity" -- in other words,
non-XML data bound to this document type, which some applications
may wish to consult when manipulating the document. A Notation
represents a name-value pair, with its nodeName being set to the
declared name of the notation.
Notations are also used to formally declare the "targets" of
Processing Instructions.
Note that the Notation's data is non-DOM information; the DOM only
records what and where it is.
See the XML 1.0 spec, sections 4.7 and 2.6, for more info.
Level 1 of the DOM does not support editing Notation contents.
- xerces.internal:
- since:
PR-DOM-Level-1-19980818. -
| Field Summary |
|---|
| static final long | serialVersionUID | Serialization version. |
| protected String | name | Notation name. |
| protected String | publicId | Public identifier. |
| protected String | systemId | System identifier. |
| protected String | baseURI | Base URI |
| Fields inherited from com.sun.org.apache.xerces.internal.dom.NodeImpl: |
|---|
| TREE_POSITION_PRECEDING, TREE_POSITION_FOLLOWING, TREE_POSITION_ANCESTOR, TREE_POSITION_DESCENDANT, TREE_POSITION_EQUIVALENT, TREE_POSITION_SAME_NODE, TREE_POSITION_DISCONNECTED, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_PRECEDING, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_IS_CONTAINED, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, serialVersionUID, ELEMENT_DEFINITION_NODE, ownerNode, flags, READONLY, SYNCDATA, SYNCCHILDREN, OWNED, FIRSTCHILD, SPECIFIED, IGNORABLEWS, HASSTRING, NORMALIZED, ID |
| Methods from com.sun.org.apache.xerces.internal.dom.NodeImpl: |
|---|
|
addEventListener, appendChild, changed, changes, cloneNode, compareDocumentPosition, compareTreePosition, dispatchEvent, getAttributes, getBaseURI, getChildNodes, getContainer, getElementAncestor, getFeature, getFirstChild, getLastChild, getLength, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeNumber, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getReadOnly, getTextContent, getTextContent, getUserData, getUserData, getUserDataRecord, hasAttributes, hasChildNodes, hasStringValue, hasStringValue, insertBefore, internalIsIgnorableWhitespace, isDefaultNamespace, isEqualNode, isFirstChild, isFirstChild, isIdAttribute, isIdAttribute, isIgnorableWhitespace, isNormalized, isNormalized, isOwned, isOwned, isReadOnly, isReadOnly, isSameNode, isSpecified, isSpecified, isSupported, item, lookupNamespacePrefix, lookupNamespaceURI, lookupPrefix, needsSyncChildren, needsSyncChildren, needsSyncData, needsSyncData, normalize, ownerDocument, parentNode, previousSibling, removeChild, removeEventListener, replaceChild, setNodeValue, setOwnerDocument, setPrefix, setReadOnly, setTextContent, setUserData, setUserData, synchronizeData, toString |
| Method from com.sun.org.apache.xerces.internal.dom.NotationImpl Detail: |
public String getBaseURI() {
if (needsSyncData()) {
synchronizeData();
}
if (baseURI != null && baseURI.length() != 0 ) {// attribute value is always empty string
try {
return new URI(baseURI).toString();
}
catch (com.sun.org.apache.xerces.internal.util.URI.MalformedURIException e){
// REVISIT: what should happen in this case?
return null;
}
}
return baseURI;
}
Returns the absolute base URI of this node or null if the implementation
wasn't able to obtain an absolute URI. Note: If the URI is malformed, a
null is returned. |
public String getNodeName() {
if (needsSyncData()) {
synchronizeData();
}
return name;
}
Returns the notation name |
public short getNodeType() {
return Node.NOTATION_NODE;
}
A short integer indicating what type of node this is. The named
constants for this value are defined in the org.w3c.dom.Node interface. |
public String getPublicId() {
if (needsSyncData()) {
synchronizeData();
}
return publicId;
}
The Public Identifier for this Notation. If no public identifier
was specified, this will be null. |
public String getSystemId() {
if (needsSyncData()) {
synchronizeData();
}
return systemId;
}
The System Identifier for this Notation. If no system identifier
was specified, this will be null. |
public void setBaseURI(String uri) {
if (needsSyncData()) {
synchronizeData();
}
baseURI = uri;
}
|
public void setPublicId(String id) {
if (isReadOnly()) {
throw new DOMException(
DOMException.NO_MODIFICATION_ALLOWED_ERR,
DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NO_MODIFICATION_ALLOWED_ERR", null));
}
if (needsSyncData()) {
synchronizeData();
}
publicId = id;
}
NON-DOM: The Public Identifier for this Notation. If no public
identifier was specified, this will be null. |
public void setSystemId(String id) {
if(isReadOnly()) {
throw new DOMException(
DOMException.NO_MODIFICATION_ALLOWED_ERR,
DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NO_MODIFICATION_ALLOWED_ERR", null));
}
if (needsSyncData()) {
synchronizeData();
}
systemId = id;
}
NON-DOM: The System Identifier for this Notation. If no system
identifier was specified, this will be null. |