1 package net.sf.saxon.type; 2 3 import net.sf.saxon.value.AtomicValue; 4 5 /** 6 * Marker interface for atomic types (these are either built-in atomic types 7 * or user-defined atomic types). An AtomicType is both an ItemType (a possible type 8 * for items in a sequence) and a SchemaType (a possible type for validating and 9 * 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, CharSequence lexicalValue, boolean validate); 27 28 } 29 30 // 31 // The contents of this file are subject to the Mozilla Public License Version 1.0 (the "License"); 32 // you may not use this file except in compliance with the License. You may obtain a copy of the 33 // License at http://www.mozilla.org/MPL/ 34 // 35 // Software distributed under the License is distributed on an "AS IS" basis, 36 // WITHOUT WARRANTY OF ANY KIND, either express or implied. 37 // See the License for the specific language governing rights and limitations under the License. 38 // 39 // The Original Code is: all this file. 40 // 41 // The Initial Developer of the Original Code is Michael H. Kay 42 // 43 // Portions created by (your name) are Copyright (C) (your legal entity). All Rights Reserved. 44 // 45 // Contributor(s): none. 46 // 47 48