01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */
17:
18: package org.apache.xerces.impl.xs.identity;
19:
20: import org.apache.xerces.xs.ShortList;
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 520039 2007-03-19 18:34:38Z mrglavas $
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 mayMatch a flag indiciating whether the field may be matched.
55: * @param actualValue The value to add.
56: * @param valueType Type of the value to add.
57: * @param itemValueType If the value is a list, a list of types for each of the values in the list.
58: */
59: public void addValue(Field field, boolean mayMatch,
60: Object actualValue, short valueType, ShortList itemValueType);
61:
62: /**
63: * Since the valueStore will have access to an error reporter, this
64: * allows it to be called appropriately.
65: * @param key the key of the localized error message
66: * @param args the list of arguments for substitution.
67: */
68: public void reportError(String key, Object[] args);
69:
70: } // interface ValueStore
|