FileDocCategorySizeDatePackage
NotationImpl.javaAPI DocApache Xerces 3.0.15901Fri Sep 14 20:33:52 BST 2007org.apache.xerces.dom

NotationImpl

public class NotationImpl extends NodeImpl implements Notation
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
version
$Id: NotationImpl.java 447266 2006-09-18 05:57:49Z mrglavas $
since
PR-DOM-Level-1-19980818.

Fields 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
Constructors Summary
public NotationImpl(CoreDocumentImpl ownerDoc, String name)
Factory constructor.


    //
    // Constructors
    //

       
         
    	super(ownerDoc);
        this.name = name;
    
Methods Summary
public java.lang.StringgetBaseURI()
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.

return
The absolute base URI of this node or null.
since
DOM Level 3

        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.StringgetNodeName()
Returns the notation name

        if (needsSyncData()) {
            synchronizeData();
        }
        return name;
    
public shortgetNodeType()
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.StringgetPublicId()
The Public Identifier for this Notation. If no public identifier was specified, this will be null.


        if (needsSyncData()) {
            synchronizeData();
        }
    	return publicId;

    
public java.lang.StringgetSystemId()
The System Identifier for this Notation. If no system identifier was specified, this will be null.


        if (needsSyncData()) {
            synchronizeData();
        }
    	return systemId;

    
public voidsetBaseURI(java.lang.String uri)
NON-DOM: set base uri

        if (needsSyncData()) {
            synchronizeData();
        }
        baseURI = uri;
    
public voidsetPublicId(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 voidsetSystemId(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;