Class DALI

java.lang.Object
adql.db.region.DALI

public final class DALI extends Object
This class helps dealing with the subset of the DALI representation for geometric regions described by the sections 3.3.5, 3.3.6 and 3.3.7 of the "Data Access Layer Interface 1.1" document.

Note: No instance of this class can be created. Its usage is only limited to its static functions and classes.

Parsing a DALI string

A string serialization of a region following the DALI syntax can be parsed thanks to parseRegion(String). If the given string can not be parsed, a ParseException is thrown. Otherwise a Region is returned.

Region serialization

A geometric region can be serialized into a DALI representation with toDALI(Region). The shortcut function Region.toDALI() can also be used.

Supported object types

According to the "Data Access Layer Interface 1.1" document, only the following object types are supported:

  • POINT
  • CIRCLE
  • POLYGON
  • Since:
    2.0
    • Method Details

      • parseRegion

        public static Region parseRegion(String daliRegion) throws ParseException
        Parse the given DALI expression representing a geometric region.
        Parameters:
        daliRegion - DALI expression of a region. Note: MUST be different from NULL.
        Returns:
        The object representation of the specified geometric region.
        Throws:
        ParseException - If the given expression is NULL, empty string or if the DALI syntax is wrong.
      • toDALI

        public static String toDALI(Region region)
        Convert into DALIT the given object representation of a geometric region.
        Parameters:
        region - Region to convert into DALI.
        Returns:
        The corresponding DALI expression.