KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > xerces > xs > XSAnnotation


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.xerces.xs;
18
19 /**
20  * This interface represents the Annotation schema component.
21  */

22 public interface XSAnnotation extends XSObject {
23     // TargetType
24
/**
25      * The object type is <code>org.w3c.dom.Element</code>.
26      */

27     public static final short W3C_DOM_ELEMENT = 1;
28     /**
29      * The object type is <code>org.xml.sax.ContentHandler</code>.
30      */

31     public static final short SAX_CONTENTHANDLER = 2;
32     /**
33      * The object type is <code>org.w3c.dom.Document</code>.
34      */

35     public static final short W3C_DOM_DOCUMENT = 3;
36
37     /**
38      * Write contents of the annotation to the specified object. If the
39      * specified <code>target</code> is a DOM object, in-scope namespace
40      * declarations for <code>annotation</code> element are added as
41      * attribute nodes of the serialized <code>annotation</code>, otherwise
42      * the corresponding events for all in-scope namespace declarations are
43      * sent via the specified document handler.
44      * @param target A target pointer to the annotation target object, i.e.
45      * <code>org.w3c.dom.Document</code>, <code>org.w3c.dom.Element</code>
46      * , <code>org.xml.sax.ContentHandler</code>.
47      * @param targetType A target type.
48      * @return True if the <code>target</code> is a recognized type and
49      * supported by this implementation, otherwise false.
50      */

51     public boolean writeAnnotation(Object JavaDoc target,
52                                    short targetType);
53
54     /**
55      * A text representation of the annotation.
56      */

57     public String JavaDoc getAnnotationString();
58
59 }
60
Popular Tags