286N/A/*
286N/A * reserved comment block
286N/A * DO NOT REMOVE OR ALTER!
286N/A */
286N/A/*
286N/A * Copyright 1999-2002,2004 The Apache Software Foundation.
286N/A *
286N/A * Licensed under the Apache License, Version 2.0 (the "License");
286N/A * you may not use this file except in compliance with the License.
286N/A * You may obtain a copy of the License at
286N/A *
286N/A * http://www.apache.org/licenses/LICENSE-2.0
286N/A *
286N/A * Unless required by applicable law or agreed to in writing, software
286N/A * distributed under the License is distributed on an "AS IS" BASIS,
286N/A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
286N/A * See the License for the specific language governing permissions and
286N/A * limitations under the License.
286N/A */
286N/A
286N/Apackage com.sun.org.apache.xerces.internal.dom;
286N/A
286N/A/**
286N/A * Notations are how the Document Type Description (DTD) records hints
286N/A * about the format of an XML "unparsed entity" -- in other words,
286N/A * non-XML data bound to this document type, which some applications
286N/A * may wish to consult when manipulating the document. A Notation
286N/A * represents a name-value pair, with its nodeName being set to the
286N/A * declared name of the notation.
286N/A * <P>
286N/A * Notations are also used to formally declare the "targets" of
286N/A * Processing Instructions.
286N/A * <P>
286N/A * Note that the Notation's data is non-DOM information; the DOM only
286N/A * records what and where it is.
286N/A * <P>
286N/A * See the XML 1.0 spec, sections 4.7 and 2.6, for more info.
286N/A * <P>
286N/A * Level 1 of the DOM does not support editing Notation contents.
286N/A *
286N/A * @xerces.internal
286N/A *
286N/A * @since PR-DOM-Level-1-19980818.
286N/A */
286N/Apublic class DeferredNotationImpl
286N/A extends NotationImpl
286N/A implements DeferredNode {
286N/A
286N/A //
286N/A // Constants
286N/A //
286N/A
286N/A /** Serialization version. */
286N/A static final long serialVersionUID = 5705337172887990848L;
286N/A
286N/A //
286N/A // Data
286N/A //
286N/A
286N/A /** Node index. */
286N/A protected transient int fNodeIndex;
286N/A
286N/A //
286N/A // Constructors
286N/A //
286N/A
286N/A /**
286N/A * This is the deferred constructor. Only the fNodeIndex is given here.
286N/A * All other data, can be requested from the ownerDocument via the index.
286N/A */
286N/A DeferredNotationImpl(DeferredDocumentImpl ownerDocument, int nodeIndex) {
286N/A super(ownerDocument, null);
286N/A
286N/A fNodeIndex = nodeIndex;
286N/A needsSyncData(true);
286N/A
286N/A } // <init>(DeferredDocumentImpl,int)
286N/A
286N/A //
286N/A // DeferredNode methods
286N/A //
286N/A
286N/A /** Returns the node index. */
286N/A public int getNodeIndex() {
286N/A return fNodeIndex;
286N/A }
286N/A
286N/A //
286N/A // Protected methods
286N/A //
286N/A
286N/A /**
286N/A * Synchronizes the data. This is special because of the way
286N/A * that the "fast" notation stores its information internally.
286N/A */
286N/A protected void synchronizeData() {
286N/A
286N/A // no need to synchronize again
286N/A needsSyncData(false);
286N/A
286N/A // name
286N/A DeferredDocumentImpl ownerDocument =
286N/A (DeferredDocumentImpl)this.ownerDocument();
286N/A name = ownerDocument.getNodeName(fNodeIndex);
286N/A
286N/A ownerDocument.getNodeType(fNodeIndex);
286N/A // public and system ids
286N/A publicId = ownerDocument.getNodeValue(fNodeIndex);
286N/A systemId = ownerDocument.getNodeURI(fNodeIndex);
286N/A int extraDataIndex = ownerDocument.getNodeExtra(fNodeIndex);
286N/A ownerDocument.getNodeType(extraDataIndex);
286N/A baseURI = ownerDocument.getNodeName(extraDataIndex);
286N/A
286N/A
286N/A } // synchronizeData()
286N/A
286N/A} // class DeferredNotationImpl