001: /*
002: * Copyright (c) 2001 World Wide Web Consortium,
003: * (Massachusetts Institute of Technology, Institut National de
004: * Recherche en Informatique et en Automatique, Keio University). All
005: * Rights Reserved. This program is distributed under the W3C's Software
006: * Intellectual Property License. This program is distributed in the
007: * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
008: * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
009: * PURPOSE.
010: * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
011: */
012:
013: package org.apache.xerces.dom3.as;
014:
015: import org.w3c.dom.DOMException;
016:
017: /**
018: * @deprecated
019: * This interface extends the <code>Document</code> interface with additional
020: * methods for both document and AS editing.
021: * <p>See also the <a href='http://www.w3.org/TR/2001/WD-DOM-Level-3-ASLS-20011025'>Document Object Model (DOM) Level 3 Abstract Schemas and Load
022: and Save Specification</a>.
023: */
024: public interface DocumentAS {
025: /**
026: * The active external ASModel. Note that the active external
027: * <code>ASModel</code> is responsible for consulting the internal
028: * ASModel, so if an attribute is declared in the internal
029: * <code>ASModel</code> and the corresponding <code>ownerElements</code>
030: * points to a <code>ASElementDeclaration</code>s defined in the active
031: * external ASModel, changing the active external ASModel will cause the
032: * <code>ownerElements</code> to be recomputed. If the
033: * <code>ownerElements</code> is not defined in the newly active
034: * external ASModel, the <code>ownerElements</code> will be an empty
035: * node list.
036: */
037: public ASModel getActiveASModel();
038:
039: /**
040: * The active external ASModel. Note that the active external
041: * <code>ASModel</code> is responsible for consulting the internal
042: * ASModel, so if an attribute is declared in the internal
043: * <code>ASModel</code> and the corresponding <code>ownerElements</code>
044: * points to a <code>ASElementDeclaration</code>s defined in the active
045: * external ASModel, changing the active external ASModel will cause the
046: * <code>ownerElements</code> to be recomputed. If the
047: * <code>ownerElements</code> is not defined in the newly active
048: * external ASModel, the <code>ownerElements</code> will be an empty
049: * node list.
050: */
051: public void setActiveASModel(ASModel activeASModel);
052:
053: /**
054: * A list of <code>ASObject</code>s of type <code>AS_MODEL</code>s
055: * associated with a document. The <code>addAS</code> method associates
056: * a <code>ASModel</code> with a document.
057: */
058: public ASObjectList getBoundASModels();
059:
060: /**
061: * A list of <code>ASObject</code>s of type <code>AS_MODEL</code>s
062: * associated with a document. The <code>addAS</code> method associates
063: * a <code>ASModel</code> with a document.
064: */
065: public void setBoundASModels(ASObjectList boundASModels);
066:
067: /**
068: * Retrieve the internal <code>ASModel</code> of a document.
069: * @return <code>ASModel</code>.
070: */
071: public ASModel getInternalAS();
072:
073: /**
074: * Sets the internal subset <code>ASModel</code> of a document. This could
075: * be null as a mechanism for "removal".
076: * @param as <code>ASModel</code> to be the internal subset of the
077: * document.
078: */
079: public void setInternalAS(ASModel as);
080:
081: /**
082: * Associate a <code>ASModel</code> with a document. Can be invoked
083: * multiple times to result in a list of <code>ASModel</code>s. Note
084: * that only one internal <code>ASModel</code> is associated with the
085: * document, however, and that only one of the possible list of
086: * <code>ASModel</code>s is active at any one time.
087: * @param as <code>ASModel</code> to be associated with the document.
088: */
089: public void addAS(ASModel as);
090:
091: /**
092: * Removes a <code>ASModel</code> associated with a document. Can be
093: * invoked multiple times to remove a number of these in the list of
094: * <code>ASModel</code>s.
095: * @param as The <code>ASModel</code> to be removed.
096: */
097: public void removeAS(ASModel as);
098:
099: /**
100: * Gets the AS editing object describing this elementThis method needs to
101: * be changed and others added.
102: * @return ASElementDeclaration object if the implementation supports "
103: * <code>AS-EDIT</code>" feature. Otherwise <code>null</code>.
104: * @exception DOMException
105: * NOT_FOUND_ERR: Raised if no <code>ASModel</code> is present.
106: */
107: public ASElementDeclaration getElementDeclaration()
108: throws DOMException;
109:
110: /**
111: * Validates the document against the <code>ASModel</code>.
112: * @exception DOMASException
113: *
114: */
115: public void validate() throws DOMASException;
116:
117: }
|