NotationImplpublic class NotationImpl extends NodeImpl implements NotationNotations 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. |
Fields Summary |
---|
static final long | serialVersionUIDSerialization version. | protected String | nameNotation name. | protected String | publicIdPublic identifier. | protected String | systemIdSystem identifier. | protected String | baseURIBase URI |
Constructors Summary |
---|
public NotationImpl(CoreDocumentImpl ownerDoc, String name)Factory constructor.
//
// Constructors
//
super(ownerDoc);
this.name = name;
|
Methods Summary |
---|
public java.lang.String | getBaseURI()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.
if (needsSyncData()) {
synchronizeData();
}
if (baseURI != null && baseURI.length() != 0 ) {// attribute value is always empty string
try {
return new URI(baseURI).toString();
}
catch (org.apache.xerces.util.URI.MalformedURIException e){
// REVISIT: what should happen in this case?
return null;
}
}
return baseURI;
| public java.lang.String | getNodeName()Returns the notation name
if (needsSyncData()) {
synchronizeData();
}
return name;
| public short | getNodeType()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.
return Node.NOTATION_NODE;
| public java.lang.String | getPublicId()The Public Identifier for this Notation. If no public identifier
was specified, this will be null.
if (needsSyncData()) {
synchronizeData();
}
return publicId;
| public java.lang.String | getSystemId()The System Identifier for this Notation. If no system identifier
was specified, this will be null.
if (needsSyncData()) {
synchronizeData();
}
return systemId;
| public void | setBaseURI(java.lang.String uri)NON-DOM: set base uri
if (needsSyncData()) {
synchronizeData();
}
baseURI = uri;
| public void | setPublicId(java.lang.String id)NON-DOM: The Public Identifier for this Notation. If no public
identifier was specified, this will be null.
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;
| public void | setSystemId(java.lang.String id)NON-DOM: The System Identifier for this Notation. If no system
identifier was specified, this will be null.
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;
|
|