KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > xerces > impl > xs > identity > ValueStore


1 /*
2  * Copyright 2001, 2002,2004,2005 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.impl.xs.identity;
18
19 import org.apache.xerces.xs.ShortList;
20
21
22 /**
23  * Interface for storing values associated to an identity constraint.
24  * Each value stored corresponds to a field declared for the identity
25  * constraint. One instance of an object implementing this interface
26  * is created for each identity constraint per element declaration in
27  * the instance document to store the information for this identity
28  * constraint.
29  * <p>
30  * <strong>Note:</strong> The component performing identity constraint
31  * collection and validation is responsible for providing an
32  * implementation of this interface. The component is also responsible
33  * for performing the necessary checks required by each type of identity
34  * constraint.
35  *
36  * @xerces.internal
37  *
38  * @author Andy Clark, IBM
39  *
40  * @version $Id: ValueStore.java,v 1.9 2005/05/09 21:03:33 ankitp Exp $
41  */

42 public interface ValueStore {
43     
44     //
45
// ValueStore methods
46
//
47

48     /**
49      * Adds the specified value to the value store.
50      *
51      * @param field The field associated to the value. This reference
52      * is used to ensure that each field only adds a value
53      * once within a selection scope.
54      * @param actualValue The value to add.
55      */

56     public void addValue(Field field, Object JavaDoc actualValue, short valueType, ShortList itemValueType);
57
58     /**
59      * Since the valueStore will have access to an error reporter, this
60      * allows it to be called appropriately.
61      * @param key the key of the localized error message
62      * @param args the list of arguments for substitution.
63      */

64     public void reportError(String JavaDoc key, Object JavaDoc[] args);
65     
66
67 } // interface ValueStore
68
Popular Tags