2
* Copyright (c) 2001 World Wide Web Consortium,
3
* (Massachusetts Institute of Technology, Institut National de
4
* Recherche en Informatique et en Automatique, Keio University). All
5
* Rights Reserved. This program is distributed under the W3C's Software
6
* Intellectual Property License. This program is distributed in the
7
* hope that it will be useful, but WITHOUT ANY WARRANTY; without even
8
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
10
* See W3C License http://www.w3.org/Consortium/Legal/ for more details.
13
package org.apache.xerces.dom3.as;
15
import org.w3c.dom.DOMException;
19
* This interface extends the <code>Document</code> interface with additional
20
* methods for both document and AS editing.
21
* <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
22
and Save Specification</a>.
24
public interface DocumentAS {
26
* The active external ASModel. Note that the active external
27
* <code>ASModel</code> is responsible for consulting the internal
28
* ASModel, so if an attribute is declared in the internal
29
* <code>ASModel</code> and the corresponding <code>ownerElements</code>
30
* points to a <code>ASElementDeclaration</code>s defined in the active
31
* external ASModel, changing the active external ASModel will cause the
32
* <code>ownerElements</code> to be recomputed. If the
33
* <code>ownerElements</code> is not defined in the newly active
34
* external ASModel, the <code>ownerElements</code> will be an empty
37
public ASModel getActiveASModel();
39
* The active external ASModel. Note that the active external
40
* <code>ASModel</code> is responsible for consulting the internal
41
* ASModel, so if an attribute is declared in the internal
42
* <code>ASModel</code> and the corresponding <code>ownerElements</code>
43
* points to a <code>ASElementDeclaration</code>s defined in the active
44
* external ASModel, changing the active external ASModel will cause the
45
* <code>ownerElements</code> to be recomputed. If the
46
* <code>ownerElements</code> is not defined in the newly active
47
* external ASModel, the <code>ownerElements</code> will be an empty
50
public void setActiveASModel(ASModel activeASModel);
53
* A list of <code>ASObject</code>s of type <code>AS_MODEL</code>s
54
* associated with a document. The <code>addAS</code> method associates
55
* a <code>ASModel</code> with a document.
57
public ASObjectList getBoundASModels();
59
* A list of <code>ASObject</code>s of type <code>AS_MODEL</code>s
60
* associated with a document. The <code>addAS</code> method associates
61
* a <code>ASModel</code> with a document.
63
public void setBoundASModels(ASObjectList boundASModels);
66
* Retrieve the internal <code>ASModel</code> of a document.
67
* @return <code>ASModel</code>.
69
public ASModel getInternalAS();
72
* Sets the internal subset <code>ASModel</code> of a document. This could
73
* be null as a mechanism for "removal".
74
* @param as <code>ASModel</code> to be the internal subset of the
77
public void setInternalAS(ASModel as);
80
* Associate a <code>ASModel</code> with a document. Can be invoked
81
* multiple times to result in a list of <code>ASModel</code>s. Note
82
* that only one internal <code>ASModel</code> is associated with the
83
* document, however, and that only one of the possible list of
84
* <code>ASModel</code>s is active at any one time.
85
* @param as <code>ASModel</code> to be associated with the document.
87
public void addAS(ASModel as);
90
* Removes a <code>ASModel</code> associated with a document. Can be
91
* invoked multiple times to remove a number of these in the list of
92
* <code>ASModel</code>s.
93
* @param as The <code>ASModel</code> to be removed.
95
public void removeAS(ASModel as);
98
* Gets the AS editing object describing this elementThis method needs to
99
* be changed and others added.
100
* @return ASElementDeclaration object if the implementation supports "
101
* <code>AS-EDIT</code>" feature. Otherwise <code>null</code>.
102
* @exception DOMException
103
* NOT_FOUND_ERR: Raised if no <code>ASModel</code> is present.
105
public ASElementDeclaration getElementDeclaration()
109
* Validates the document against the <code>ASModel</code>.
110
* @exception DOMASException
113
public void validate()
114
throws DOMASException;