auc.field
Class Field

java.lang.Object
  |
  +--auc.field.FarmDatabaseObject
        |
        +--auc.field.Field

public class Field
extends FarmDatabaseObject

A field class represents the field data structure in the database. The field corresponds to a field in the farm.


Field Summary
protected  JPDPolygon boundaryReference1
          The outer boundary of this field.
protected  JPDPolygon boundaryReference2
          Not documented data from database.
protected  JPDPolygon boundaryReference3
          Not documented data from database.
 
Constructor Summary
Field()
           
 
Method Summary
 void addExclusionZone(ExclusionZone ez)
          Adds the given exclusion zone to the list of exclusion zones and notifies the parent-field if any.
 void addSubField(Field subfield)
          Adds a field reference to the list of sub-fields.
 float calculateArea()
          Not documented, not implemented.
static Field createSample()
          Creates a test sample field with sub-fields and exclusion zones.
 float getArea()
           
 JPDPolygon getBoundaryReference1()
           
 JPDPolygon getBoundaryReference2()
           
 JPDPolygon getBoundaryReference3()
           
 java.awt.Rectangle getBounds()
           
 java.util.Vector getExclusionZones()
           
 long getFieldID()
          Not documented, not implemented.
 short getFieldType()
           
 java.lang.String getGeoRef()
           
 Group getGroup()
           
 java.util.Vector getObstacles()
          Method returns all obstacles met in the field: exclusion zones and field boundary concavities.
 Field getParentField()
           
 long getPartOf()
           
 java.lang.String getPeriod()
           
 java.util.Vector getSubFields()
           
 Group getUnderGroup()
           
 boolean isCurrent()
           
 void setArea(float area)
           
 void setBoundaryReference1(JPDPolygon boundaryreference1)
          Sets the first boundary reference.
 void setBoundaryReference2(JPDPolygon boundaryreference2)
          Sets the second boundary reference.
 void setBoundaryReference3(JPDPolygon boundaryreference3)
          Sets the third boundary reference.
 void setCurrent(boolean current)
           
 void setExclusionZones(java.util.Vector exclusionZones)
          Adds the given exclusion zones to the exclusion zone list.
 void setFieldID(long fieldid)
          Not documented, not implemented.
 void setFieldType(short fieldtype)
           
 void setGeoRef(java.lang.String georef)
           
 void setGroup(Group group)
           
protected  void setParentField(Field field)
          Sets the parent-field for this field.
 void setPartOf(long partof)
           
 void setPeriod(java.lang.String period)
           
 void setSubFields(java.util.Vector subFields)
          Sets the sub-fields for this field.
 void setUnderGroup(Group undergroup)
           
 boolean valid(Vector2D p)
          Checks whether the given point is valid in the means of field boundary and exclusion zones.
 
Methods inherited from class auc.field.FarmDatabaseObject
getName, getNote, getObjectID, setName, setNote, setObjectID
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

boundaryReference1

protected JPDPolygon boundaryReference1
The outer boundary of this field.

boundaryReference2

protected JPDPolygon boundaryReference2
Not documented data from database.

boundaryReference3

protected JPDPolygon boundaryReference3
Not documented data from database.
Constructor Detail

Field

public Field()
Method Detail

calculateArea

public float calculateArea()
Not documented, not implemented.

setFieldID

public void setFieldID(long fieldid)
Not documented, not implemented.

getFieldID

public long getFieldID()
Not documented, not implemented.

setBoundaryReference1

public void setBoundaryReference1(JPDPolygon boundaryreference1)
Sets the first boundary reference.
See Also:
boundaryReference1

getBoundaryReference1

public JPDPolygon getBoundaryReference1()
Returns:
the first boundary reference.
See Also:
boundaryReference1

setBoundaryReference2

public void setBoundaryReference2(JPDPolygon boundaryreference2)
Sets the second boundary reference.
See Also:
boundaryReference2

getBoundaryReference2

public JPDPolygon getBoundaryReference2()
Returns:
the second boundary reference.
See Also:
boundaryReference2

setBoundaryReference3

public void setBoundaryReference3(JPDPolygon boundaryreference3)
Sets the third boundary reference.
See Also:
boundaryReference3

getBoundaryReference3

public JPDPolygon getBoundaryReference3()
Returns:
the third boundary reference.
See Also:
boundaryReference3

setFieldType

public void setFieldType(short fieldtype)

getFieldType

public short getFieldType()

setPartOf

public void setPartOf(long partof)

getPartOf

public long getPartOf()

setGroup

public void setGroup(Group group)

getGroup

public Group getGroup()

setUnderGroup

public void setUnderGroup(Group undergroup)

getUnderGroup

public Group getUnderGroup()

setCurrent

public void setCurrent(boolean current)

isCurrent

public boolean isCurrent()

setPeriod

public void setPeriod(java.lang.String period)

getPeriod

public java.lang.String getPeriod()

setGeoRef

public void setGeoRef(java.lang.String georef)

getGeoRef

public java.lang.String getGeoRef()

setArea

public void setArea(float area)

getArea

public float getArea()

setSubFields

public void setSubFields(java.util.Vector subFields)
Sets the sub-fields for this field.
Parameters:
subFields - the list of fields (all must be of Field type).

getSubFields

public java.util.Vector getSubFields()
Returns:
the list of sub-fields.

setParentField

protected void setParentField(Field field)
Sets the parent-field for this field.

getParentField

public Field getParentField()
Returns:
the reference to the parent field.

addSubField

public void addSubField(Field subfield)
Adds a field reference to the list of sub-fields.
Parameters:
subfield - the reference to the field.

setExclusionZones

public void setExclusionZones(java.util.Vector exclusionZones)
Adds the given exclusion zones to the exclusion zone list.
Parameters:
exclusionZones - the list of references to exclusion zones.

getExclusionZones

public java.util.Vector getExclusionZones()
Returns:
the list of exclusion zones.

addExclusionZone

public void addExclusionZone(ExclusionZone ez)
Adds the given exclusion zone to the list of exclusion zones and notifies the parent-field if any.
Parameters:
ez - the exclusion zone.

getObstacles

public java.util.Vector getObstacles()
Method returns all obstacles met in the field: exclusion zones and field boundary concavities.
Returns:
a list of Polygon2D objects.

getBounds

public java.awt.Rectangle getBounds()
Returns:
the rectangle boundary of this field.

valid

public boolean valid(Vector2D p)
Checks whether the given point is valid in the means of field boundary and exclusion zones.
Parameters:
p - the vector pointing to the given point.
Returns:
true if the point is valid, false otherwise.

createSample

public static Field createSample()
Creates a test sample field with sub-fields and exclusion zones.