01: package net.sf.saxon.type;
02:
03: import net.sf.saxon.value.AtomicValue;
04:
05: /**
06: * Marker interface for atomic types (these are either built-in atomic types
07: * or user-defined atomic types). An AtomicType is both an ItemType (a possible type
08: * for items in a sequence) and a SchemaType (a possible type for validating and
09: * annotating nodes).
10: */
11: public interface AtomicType extends SimpleType, ItemType {
12:
13: /**
14: * Factory method to create values of a derived atomic type. This method
15: * is not used to create values of a built-in type, even one that is not
16: * primitive.
17: * @param primValue the value in the value space of the primitive type
18: * @param lexicalValue the value in the lexical space. If null, the string value of primValue
19: * is used. This value is checked against the pattern facet (if any)
20: * @param validate true if the value is to be validated against the facets of the derived
21: * type; false if the caller knows that the value is already valid.
22: * @return the derived atomic value if validation succeeds, or an ErrorValue otherwise. The ErrorValue
23: * encapsulates the exception that occurred; it is the caller's responsibility to check for this.
24: */
25:
26: public AtomicValue makeDerivedValue(AtomicValue primValue,
27: CharSequence lexicalValue, boolean validate);
28:
29: }
30:
31: //
32: // The contents of this file are subject to the Mozilla Public License Version 1.0 (the "License");
33: // you may not use this file except in compliance with the License. You may obtain a copy of the
34: // License at http://www.mozilla.org/MPL/
35: //
36: // Software distributed under the License is distributed on an "AS IS" basis,
37: // WITHOUT WARRANTY OF ANY KIND, either express or implied.
38: // See the License for the specific language governing rights and limitations under the License.
39: //
40: // The Original Code is: all this file.
41: //
42: // The Initial Developer of the Original Code is Michael H. Kay
43: //
44: // Portions created by (your name) are Copyright (C) (your legal entity). All Rights Reserved.
45: //
46: // Contributor(s): none.
47: //
|