Class Polygon

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

@Embeddable @VoDml(id="adqlgeom:Polygon", role=dataType) public class Polygon extends Shape implements org.ivoa.vodml.jpa.JPAManipulations
a simple polygon region on the sky defined a sequence of points connected by great-circle segments. dataType: Polygon
  • Nested Class Summary

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

    Fields
    Modifier and Type
    Field
    Description
    protected List<org.javastro.ivoacore.pgsphere.types.Point>
    the points that make up the polygon.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a new Polygon
    Polygon(List<org.javastro.ivoacore.pgsphere.types.Point> points)
    full parameter constructor.
    Copy Constructor.
    Polygon(Shape superinstance, List<org.javastro.ivoacore.pgsphere.types.Point> points)
    Constructor from supertype instance.
  • Method Summary

    Modifier and Type
    Method
    Description
    make a clone of the object taking into account current polymorhic type.
    static Polygon
    create a Polygon in functional builder style.
    boolean
     
    void
     
    List<org.javastro.ivoacore.pgsphere.types.Point>
    Returns points Attribute.
    int
     
    void
    setPoints(List<org.javastro.ivoacore.pgsphere.types.Point> pPoints)
    Set points Attribute.
    void
    Update this object with the content of the given object.
    withPoints(List<org.javastro.ivoacore.pgsphere.types.Point> pPoints)
    fluent setter for points Attribute.

    Methods inherited from class org.ivoa.dm.adqlgeom.Shape

    updateUsing

    Methods inherited from class java.lang.Object

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

    • points

      @VoDml(id="adqlgeom:Polygon.points", role=attribute, type="adqlgeom:Point", typeRole=dataType) protected List<org.javastro.ivoacore.pgsphere.types.Point> points
      the points that make up the polygon. : Attribute points : multiplicity 1..*
  • Constructor Details

    • Polygon

      public Polygon()
      Creates a new Polygon
    • Polygon

      public Polygon(List<org.javastro.ivoacore.pgsphere.types.Point> points)
      full parameter constructor.
      Parameters:
      points - the points that make up the polygon.
    • Polygon

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

      public Polygon(Shape superinstance, List<org.javastro.ivoacore.pgsphere.types.Point> points)
      Constructor from supertype instance.
      Parameters:
      superinstance - The supertype.
      points - the points that make up the polygon.
  • Method Details

    • copyMe

      public Shape copyMe()
      make a clone of the object taking into account current polymorhic type.
      Specified by:
      copyMe in class Shape
      Returns:
      the cloned object.
    • updateUsing

      public void updateUsing(Polygon 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.
    • getPoints

      public List<org.javastro.ivoacore.pgsphere.types.Point> getPoints()
      Returns points Attribute.
      Returns:
      points Attribute
    • setPoints

      public void setPoints(List<org.javastro.ivoacore.pgsphere.types.Point> pPoints)
      Set points Attribute.
      Parameters:
      pPoints - value to set
    • withPoints

      public Polygon withPoints(List<org.javastro.ivoacore.pgsphere.types.Point> pPoints)
      fluent setter for points Attribute.
      Parameters:
      pPoints - value to set
      Returns:
      Polygon
    • createPolygon

      public static Polygon createPolygon(Consumer<Polygon.PolygonBuilder> f)
      create a Polygon 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
      Overrides:
      forceLoad in class Shape
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Shape