KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > ws > jaxme > xs > xml > XsObject


1 /*
2  * Copyright 2003, 2004 The Apache Software Foundation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15
16  */

17 package org.apache.ws.jaxme.xs.xml;
18
19 import org.xml.sax.Locator JavaDoc;
20 import org.xml.sax.SAXException JavaDoc;
21
22
23 /** Base interface for type, attribute, element, or whatever object.
24  *
25  * @author <a HREF="mailto:joe@ispsoft.de">Jochen Wiedmann</a>
26  */

27 public interface XsObject {
28   /** Returns the objects syntactical schema.
29    */

30   public XsESchema getXsESchema();
31
32   /** Returns whether the object is a top-level object. This is
33    * the case for the XsESchema itself and for all its childs only.
34    */

35   public boolean isTopLevelObject();
36
37   /** Returns information on the parent object.<br>
38    * More precisely, returns either of the following:
39    * <ul>
40    * <li>If the object is the schema itself, returns null. The
41    * schema doesn't have a parent object.</p>
42    * <li>If the object is a top-level object, returns the
43    * schema.</p>
44    * <li>Otherwise returns the object in which the given object
45    * is embedded.</li>
46    * </ul>
47    */

48   public XsObject getParentObject();
49
50   /** Returns the {@link XsObjectFactory object factory}, that
51    * created this instance.
52    */

53   public XsObjectFactory getObjectFactory();
54
55   /** Returns the SAX {@link Locator} with the instances
56    * location.
57    */

58   public Locator JavaDoc getLocator();
59
60   /** Validates the internal state of the type, attribute, element,
61    * or whatever object.
62    */

63   public void validate() throws SAXException JavaDoc;
64 }
65
Popular Tags