KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > xerces > xni > Augmentations


1 /*
2  * Copyright 2000-2002,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.xni;
18
19 import java.util.Enumeration JavaDoc;
20
21 /**
22  * The Augmentations interface defines a table of additional data that may
23  * be passed along the document pipeline. The information can contain extra
24  * arguments or infoset augmentations, for example PSVI. This additional
25  * information is identified by a String key.
26  * <p>
27  * <strong>Note:</strong>
28  * Methods that receive Augmentations are required to copy the information
29  * if it is to be saved for use beyond the scope of the method.
30  * The Augmentations content is volatile, and maybe modified by any method in
31  * any component in the pipeline. Therefore, methods passed this structure
32  * should not save any reference to the structure.
33  *
34  * @author Elena Litani, IBM
35  * @version $Id: Augmentations.java,v 1.7 2004/02/24 23:15:54 mrglavas Exp $
36  */

37
38 public interface Augmentations {
39     
40     
41     /**
42      * Add additional information identified by a key to the Augmentations structure.
43      *
44      * @param key Identifier, can't be <code>null</code>
45      * @param item Additional information
46      *
47      * @return the previous value of the specified key in the Augmentations structure,
48      * or <code>null</code> if it did not have one.
49      */

50     public Object JavaDoc putItem (String JavaDoc key, Object JavaDoc item);
51
52
53     /**
54      * Get information identified by a key from the Augmentations structure
55      *
56      * @param key Identifier, can't be <code>null</code>
57      *
58      * @return the value to which the key is mapped in the Augmentations structure;
59      * <code>null</code> if the key is not mapped to any value.
60      */

61     public Object JavaDoc getItem(String JavaDoc key);
62     
63     
64     /**
65      * Remove additional info from the Augmentations structure
66      *
67      * @param key Identifier, can't be <code>null</code>
68      * @return the previous value of the specified key in the Augmentations structure,
69      * or <code>null</code> if it did not have one.
70      */

71     public Object JavaDoc removeItem (String JavaDoc key);
72
73     
74     /**
75      * Returns an enumeration of the keys in the Augmentations structure
76      *
77      */

78     public Enumeration JavaDoc keys ();
79
80
81     /**
82      * Remove all objects from the Augmentations structure.
83      */

84     public void removeAllItems ();
85
86 }
87
Popular Tags