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
  • Field Details

    • points

      @VoDml(id="adqlgeom:Polygon.points", role=attribute, type="adqlgeom:Point", typeRole=dataType) protected Point[] points
      . : Attribute points : multiplicity 3
  • Constructor Details

    • Polygon

      public Polygon()
      Creates a new Polygon
    • Polygon

      public Polygon(Point[] points)
      full parameter constructor.
      Parameters:
      points - .
    • 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, Point[] points)
      Constructor from supertype instance.
      Parameters:
      superinstance - The supertype.
      points - .
  • 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 Point[] getPoints()
      Returns points Attribute.
      Returns:
      points Attribute
    • setPoints

      public void setPoints(Point[] pPoints)
      Set points Attribute.
      Parameters:
      pPoints - value to set
    • withPoints

      public Polygon withPoints(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