Class Line

java.lang.Object
org.ivoa.dm.adqlgeom.Line
All Implemented Interfaces:
org.ivoa.vodml.jpa.JPAManipulations

@Embeddable @VoDml(id="adqlgeom:Line", role=dataType) public class Line extends Object implements org.ivoa.vodml.jpa.JPAManipulations
A line defined on the celestial sphere. If the distance between begin and end is 180° (π), this function returns an error because the location of the line is undefined. However, if longitudes of begin and end are equal, pgSphere assumes a meridian and returns the corresponding spherical line. dataType: Line
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    A builder class for Line, mainly for use in the functional builder pattern.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected org.javastro.ivoacore.pgsphere.types.Point
    start point of line.
    protected org.javastro.ivoacore.pgsphere.types.Point
    end point of line.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a new Line
    Line(Line other)
    Copy Constructor.
    Line(org.javastro.ivoacore.pgsphere.types.Point begin, org.javastro.ivoacore.pgsphere.types.Point end)
    full parameter constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    static Line
    create a Line in functional builder style.
    boolean
     
    void
     
    org.javastro.ivoacore.pgsphere.types.Point
    Returns begin Attribute.
    org.javastro.ivoacore.pgsphere.types.Point
    Returns end Attribute.
    int
     
    void
    setBegin(org.javastro.ivoacore.pgsphere.types.Point pBegin)
    Set begin Attribute.
    void
    setEnd(org.javastro.ivoacore.pgsphere.types.Point pEnd)
    Set end Attribute.
    void
    Update this object with the content of the given object.
    withBegin(org.javastro.ivoacore.pgsphere.types.Point pBegin)
    fluent setter for begin Attribute.
    withEnd(org.javastro.ivoacore.pgsphere.types.Point pEnd)
    fluent setter for end Attribute.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • begin

      @VoDml(id="adqlgeom:Line.begin", role=attribute, type="adqlgeom:Point", typeRole=dataType) protected org.javastro.ivoacore.pgsphere.types.Point begin
      start point of line. : Attribute begin : multiplicity 1
    • end

      @VoDml(id="adqlgeom:Line.end", role=attribute, type="adqlgeom:Point", typeRole=dataType) protected org.javastro.ivoacore.pgsphere.types.Point end
      end point of line. : Attribute end : multiplicity 1
  • Constructor Details

    • Line

      public Line()
      Creates a new Line
    • Line

      public Line(org.javastro.ivoacore.pgsphere.types.Point begin, org.javastro.ivoacore.pgsphere.types.Point end)
      full parameter constructor.
      Parameters:
      begin - start point of line.
      end - end point of line.
    • Line

      public Line(Line other)
      Copy Constructor. Note that references will remain as is rather than be copied.
      Parameters:
      other - the object to be copied.
  • Method Details

    • updateUsing

      public void updateUsing(Line other)
      Update this object with the content of the given object. Note that references will remain as is rather than be copied.
      Parameters:
      other - the object to be copied.
    • getBegin

      public org.javastro.ivoacore.pgsphere.types.Point getBegin()
      Returns begin Attribute.
      Returns:
      begin Attribute
    • setBegin

      public void setBegin(org.javastro.ivoacore.pgsphere.types.Point pBegin)
      Set begin Attribute.
      Parameters:
      pBegin - value to set
    • withBegin

      public Line withBegin(org.javastro.ivoacore.pgsphere.types.Point pBegin)
      fluent setter for begin Attribute.
      Parameters:
      pBegin - value to set
      Returns:
      Line
    • getEnd

      public org.javastro.ivoacore.pgsphere.types.Point getEnd()
      Returns end Attribute.
      Returns:
      end Attribute
    • setEnd

      public void setEnd(org.javastro.ivoacore.pgsphere.types.Point pEnd)
      Set end Attribute.
      Parameters:
      pEnd - value to set
    • withEnd

      public Line withEnd(org.javastro.ivoacore.pgsphere.types.Point pEnd)
      fluent setter for end Attribute.
      Parameters:
      pEnd - value to set
      Returns:
      Line
    • createLine

      public static Line createLine(Consumer<Line.LineBuilder> f)
      create a Line in functional builder style.
      Parameters:
      f - the functional builder.
      Returns:
      an object initialized from the builder.
    • forceLoad

      public void forceLoad()
      Specified by:
      forceLoad in interface org.ivoa.vodml.jpa.JPAManipulations
    • equals

      public boolean equals(Object o_)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object