public class AdqlValidator
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static interface |
AdqlValidator.ValidatorTable
Defines table metadata for tables known to the validator.
|
Constructor and Description |
---|
AdqlValidator(AdqlValidator.ValidatorTable[] vtables,
adql.db.FunctionDef[] udfs,
java.lang.String[] geoFuncs)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
static AdqlValidator |
createValidator(AdqlValidator.ValidatorTable[] vtables,
TapLanguage lang)
Creates an instance given a set of table metadata and a TapLanguage
description object.
|
static void |
main(java.lang.String[] args)
Tests parser.
|
void |
validate(java.lang.String query)
Validates an ADQL string.
|
public AdqlValidator(AdqlValidator.ValidatorTable[] vtables, adql.db.FunctionDef[] udfs, java.lang.String[] geoFuncs)
vtables
- table metadata for database to be checked againstudfs
- array of permitted user-defined-functions,
or null to permit all
(but ignored if vtables is null)geoFuncs
- array of permitted ADQL geometry function names,
or null to permit all those defined by ADQL (sec 2.4)
(but ignored if vtables is null)public void validate(java.lang.String query) throws java.lang.Throwable
query
- ADQL query stringjava.lang.Throwable
- if the string is not valid ADQLpublic static AdqlValidator createValidator(AdqlValidator.ValidatorTable[] vtables, TapLanguage lang)
vtables
- table metadatalang
- language specificspublic static void main(java.lang.String[] args) throws java.lang.Throwable, java.io.IOException, org.xml.sax.SAXException
-h
for usage.java.lang.Throwable
java.io.IOException
org.xml.sax.SAXException
Copyright © 2017 Central Laboratory of the Research Councils. All Rights Reserved.