public abstract class AbstractAdqlExample extends Object implements AdqlExample
Modifier and Type | Class and Description |
---|---|
static class |
AbstractAdqlExample.Breaker
Interface for configurable line breaking.
|
static class |
AbstractAdqlExample.TableWithCols
Encapsulates metadata for a table and a selection of colum names from it.
|
Modifier | Constructor and Description |
---|---|
protected |
AbstractAdqlExample(String name,
String description)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
static AbstractAdqlExample.Breaker |
createBreaker(boolean lineBreaks)
Returns a breaker instance suitable for a given line break policy.
|
static AdqlExample |
createDummyExample()
Returns a dummy example which never provides any text.
|
static AdqlExample |
createSimpleExample(String name,
String description,
String[] textLines)
Creates a static example.
|
static AdqlExample[] |
createSomeExamples()
Returns a selection of examples.
|
static AdqlExample[] |
createTapSchemaExamples()
Returns a selection of examples using the TAP_SCHEMA tables.
|
static String |
formatCoord(double[] skypos,
boolean isDec,
double dflt)
Formats one coordinate from an optional sky position array,
falling back to a given default value if necessary.
|
String |
getDescription()
Returns this example's description.
|
URL |
getInfoUrl()
Returns a documentation URL associated with this example if available.
|
String |
getName()
Returns this example's name.
|
static AbstractAdqlExample.TableWithCols[] |
getRaDecTables(TableMeta[] tables,
int max)
Identifies tables in a given array which contain RA/Dec positional
columns.
|
static boolean |
isAdql21(VersionedLanguage lang)
Indicates if a versioned language represents ADQL 2.1 or later.
|
static TableMeta[] |
toTables(TableMeta table,
TableMeta[] tables)
Utility function to turn a single table and a table array into a
single array.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAdqlText
public String getName()
AdqlExample
getName
in interface AdqlExample
public String getDescription()
AdqlExample
getDescription
in interface AdqlExample
public URL getInfoUrl()
AdqlExample
getInfoUrl
in interface AdqlExample
public static boolean isAdql21(VersionedLanguage lang)
lang
- versioned languagepublic static AbstractAdqlExample.Breaker createBreaker(boolean lineBreaks)
lineBreaks
- whether line breaks are requiredpublic static TableMeta[] toTables(TableMeta table, TableMeta[] tables)
table
- single input table, or nulltables
- input table arraypublic static AbstractAdqlExample.TableWithCols[] getRaDecTables(TableMeta[] tables, int max)
tables
- candidate table listmax
- the maximum number of output tables requiredpublic static AdqlExample createDummyExample()
public static AdqlExample[] createSomeExamples()
public static AdqlExample[] createTapSchemaExamples()
public static AdqlExample createSimpleExample(String name, String description, String[] textLines)
name
- example namedescription
- example short descriptiontextLines
- lines of ADQL textpublic static String formatCoord(double[] skypos, boolean isDec, double dflt)
skypos
- 2-element array giving (RA,Dec) in degrees,
or nullisDec
- false to use RA part (element 0),
true to use Dec part (element 1)dflt
- default value to use if skypos is nullCopyright © 2024 Central Laboratory of the Research Councils. All Rights Reserved.