Debian Codegraph @

net/sf/saxon/lib/URIChecker.java

raw symbols SCIP
1 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
2 // Copyright (c) 2018 Saxonica Limited.
3 // This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
4 // If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 // This Source Code Form is "Incompatible With Secondary Licenses", as defined by the Mozilla Public License, v. 2.0.
6 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
7
8 package net.sf.saxon.lib;
9
10 /**
11 * This interface defines a method for checking whether a string is considered to be a valid URI.
12 * <p>A user-supplied implementation of this class can be set in a customized instance of
13 * {@link ConversionRules}, which can be set in the configuration using
14 * {@link net.sf.saxon.Configuration#setConversionRules(ConversionRules)}</p>
15 * <p>A user-supplied implementation can be written either from scratch, or by reference to the
16 * system-supplied implementation {@link StandardURIChecker}.</p>
17 */
18 public interface URIChecker {
19
20 /**
21 * Check whether a given string is considered valid according to the rules of the xs:anyURI type.
22 * <p>This method is called during schema validation, and when casting string to xs:anyURI. It is not
23 * used when the xs:anyURI type is used as a return value from methods such as namespace-uri() or
24 * namespace-uri-from-QName() - in such cases no checking is applied to the name.</p>
25 *
26 * @param value the string to be checked
27 * @return true if the string is considered to represent a valid URI
28 */
29
30 boolean isValidURI(CharSequence value);
31 }