public class QueryReader extends Object
Modifier and Type | Method and Description |
---|---|
(package private) static void |
checkSchemaNamespaceImported(StaticQueryContext env,
int fingerprint,
Declaration declaration)
Check that the namespace of a given name is the namespace of an imported schema
|
static void |
importModuleContents(StaticQueryContext importedModule,
StaticQueryContext thisModule)
Check the types used in the functions and variables in an imported module
|
static String |
readEncoding(InputStream is)
Read an input stream non-destructively to determine the encoding from the Query Prolog
|
static String |
readInputStream(InputStream is,
String encoding,
NameChecker nameChecker)
Read a query from an InputStream.
|
static String |
readSourceQuery(StreamSource ss,
NameChecker nameChecker)
Read a query module given a StreamSource
|
public static String readSourceQuery(StreamSource ss, NameChecker nameChecker) throws StaticError
ss
- the supplied StreamSource. This must contain a non-null systemID which defines the base
URI of the query module, and either an InputStream or a Reader containing the query text. In the
case of an InputStream the method attempts to infer the encoding; in the case of a Reader, this has
already been done, and the encoding specified within the query itself is ignored.StaticError
public static String readEncoding(InputStream is) throws StaticError
is
- the input stream: this must satisfy the precondition is.markSupported() = true.StaticError
- if the input stream cannot be readpublic static String readInputStream(InputStream is, String encoding, NameChecker nameChecker) throws StaticError
is
- the input streamencoding
- the encoding, or null if the encoding is unknownnameChecker
- the nameChecker to be used for checking charactersStaticError
public static void importModuleContents(StaticQueryContext importedModule, StaticQueryContext thisModule) throws StaticError
importedModule
- the imported modulethisModule
- thus moduleStaticError
static void checkSchemaNamespaceImported(StaticQueryContext env, int fingerprint, Declaration declaration) throws StaticError
StaticError