Class BwLocation

All Implemented Interfaces:
Serializable, Comparable<BwLocation>, Comparator<BwLocation>, CollatableEntity, OwnedEntity, ShareableEntity, SizedEntity, org.bedework.util.logging.Logged

public class BwLocation extends BwEventProperty<BwLocation> implements CollatableEntity, Comparator<BwLocation>, SizedEntity
The location of an Event
Version:
1.0
See Also:
  • Field Details

    • fieldDelimiter

      public static final String fieldDelimiter
      Currently both address and subaddress have a unique constraint. To avoid schema changes we are packing subfields into the address field with a delimiter. The fields in order are: addressField room number subField1 subField2 accessible flag "T"
      See Also:
  • Constructor Details

    • BwLocation

      public BwLocation()
      Constructor
  • Method Details

    • setAddress

      public void setAddress(BwString val)
      Parameters:
      val - the main address value
    • getAddress

      public BwString getAddress()
      Get the main address of the location
      Returns:
      the main address of the location
    • setAddressField

      public void setAddressField(String val)
      Set the building part of the main address of the location. This is up to the room delimiter
      Parameters:
      val - the building part of the location
    • getAddressField

      public String getAddressField()
      Get the main address of the location for json output. This is up to the room delimiter
      Returns:
      the main address of the location
    • setRoomField

      public void setRoomField(String val)
      Set the room part of the main address of the location.
      Parameters:
      val - the room part of the location
    • getRoomField

      public String getRoomField()
      get the room part of the main address of the location.
      Returns:
      the room part of the location
    • setSubField1

      public void setSubField1(String val)
      Set the subfield 1 part of the main address of the location.
      Parameters:
      val - the subfield 1 part of the location
    • getSubField1

      public String getSubField1()
      get the subfield 1 part of the main address of the location.
      Returns:
      the subfield 1 part of the location
    • setSubField2

      public void setSubField2(String val)
      Set the subfield 2 part of the main address of the location.
      Parameters:
      val - the subfield 2 part of the location
    • getSubField2

      public String getSubField2()
      get the subfield 2 part of the main address of the location.
      Returns:
      the subfield 2 part of the location
    • setAccessible

      public void setAccessible(boolean val)
      Set the accessible part of the main address of the location.
      Parameters:
      val - the accessible part of the location
    • getAccessible

      public boolean getAccessible()
      get the accessible part of the main address of the location.
      Returns:
      the accessible part of the location
    • setGeouri

      public void setGeouri(String val)
      Set the geouri part of the main address of the location.
      Parameters:
      val - the geouri part of the location
    • getGeouri

      public String getGeouri()
      get the geouri part of the main address of the location.
      Returns:
      the geouri part of the location
    • setLoctype

      public void setLoctype(String val)
      Set the location type part of the main address of the location.
      Parameters:
      val - the loctype for the location
    • getLoctype

      public String getLoctype()
      get the location type part of the main address of the location.
      Returns:
      the geouri part of the location
    • setCountry

      public void setCountry(String val)
      Set the country part of the main address of the location.
      Parameters:
      val - the country for the location
    • getCountry

      public String getCountry()
      get the country part of the main address of the location.
      Returns:
      the country part of the location
    • setStatus

      public void setStatus(String val)
    • getStatus

      public String getStatus()
      Specified by:
      getStatus in class BwEventProperty<BwLocation>
      Returns:
      String
    • setKeys

      public void setKeys(List<BwLocation.KeyFld> vals)
    • getKeys

      public List<BwLocation.KeyFld> getKeys()
      Returns:
      KeyFld
    • addKey

      public void addKey(String name, String val)
      Add the named key with the value.
      Parameters:
      name - of key - non null
      val - of key - non null
    • updKey

      public void updKey(String name, String val)
      Update the named key with the value. Will add if it is not present
      Parameters:
      name - of key - non null
      val - of key - non null
    • delKey

      public void delKey(String name)
      Delete the named key from the key set (if it exists)
      Parameters:
      name - of key - non null
    • setSubaddress

      public void setSubaddress(BwString val)
      Parameters:
      val - the sub-address
    • getSubaddress

      public BwString getSubaddress()
      Get the secondary address of the location
      Returns:
      the secondary address of the location
    • getSubaddressField

      public String getSubaddressField()
      Get the secondary address of the location as a string
      Returns:
      the secondary address of the location
    • setStreet

      public void setStreet(String val)
      Set the street part of the subaddress of the location.
      Parameters:
      val - the street part of the location
    • getStreet

      public String getStreet()
      get the street part of the sub address of the location.
      Returns:
      the street part of the location
    • setCity

      public void setCity(String val)
      Set the city part of the subaddress of the location.
      Parameters:
      val - the city part of the location
    • getCity

      public String getCity()
      get the city part of the sub address of the location.
      Returns:
      the city part of the location
    • setState

      public void setState(String val)
      Set the state part of the subaddress of the location.
      Parameters:
      val - the state part of the location
    • getState

      public String getState()
      get the state part of the sub address of the location.
      Returns:
      the state part of the location
    • setZip

      public void setZip(String val)
      Set the zip part of the subaddress of the location.
      Parameters:
      val - the zip part of the location
    • getZip

      public String getZip()
      get the zip part of the sub address of the location.
      Returns:
      the zip part of the location
    • setAlternateAddress

      public void setAlternateAddress(String val)
      Set the alternateAddress part of the subaddress of the location.
      Parameters:
      val - the alternateAddress part of the location
    • getAlternateAddress

      public String getAlternateAddress()
      get the alternateAddress part of the sub address of the location.
      Returns:
      the alternateAddress part of the location
    • setCode

      public void setCode(String val)
      Set the code part of the subaddress of the location.
      Parameters:
      val - the code part of the location
    • getCode

      public String getCode()
      get the code part of the sub address of the location.
      Returns:
      the code part of the location
    • setDoNotUse

      public void setDoNotUse(boolean val)
      Set the do not use flag in the subaddress of the location.
      Parameters:
      val - true for do not use
    • getDoNotUse

      public boolean getDoNotUse()
      get the do not use flag in the sub address of the location.
      Returns:
      true for do not use
    • setLink

      public void setLink(String link)
      Set the Location's URL
      Parameters:
      link - The new URL
    • getLink

      public String getLink()
      Get the link for the location
      Returns:
      the link for the location
    • makeLocation

      public static BwLocation makeLocation()
      Returns:
      location with uid filled in.
    • deleteAddress

      public void deleteAddress()
      Delete the address - this must be called rather than setting the value to null.
    • deleteSubaddress

      public void deleteSubaddress()
      Delete the subaddress - this must be called rather than setting the value to null.
    • getFinderKeyValue

      public BwString getFinderKeyValue()
      Specified by:
      getFinderKeyValue in class BwEventProperty<BwLocation>
      Returns:
      Finder Key value from this object.
    • getCollateValue

      public String getCollateValue()
      Description copied from interface: CollatableEntity
      Get the value to collate with
      Specified by:
      getCollateValue in interface CollatableEntity
      Returns:
      String collation value
    • afterDeletion

      public void afterDeletion()
      Description copied from class: BwDbentity
      Called after delete from the db
      Overrides:
      afterDeletion in class BwDbentity<BwLocation>
    • getSize

      public int getSize()
      Specified by:
      getSize in interface SizedEntity
      Returns:
      integer current size of object.
    • updateFrom

      public boolean updateFrom(BwLocation ent)
    • getRestoreCallback

      public static org.bedework.util.xml.FromXmlCallback getRestoreCallback()
    • compare

      public int compare(BwLocation thisone, BwLocation thatone)
      Specified by:
      compare in interface Comparator<BwLocation>
    • compareTo

      public int compareTo(BwLocation that)
      Specified by:
      compareTo in interface Comparable<BwLocation>
      Overrides:
      compareTo in class BwUnversionedDbentity<BwLocation>
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class BwUnversionedDbentity<BwLocation>
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • clone

      public Object clone()
      Description copied from class: BwUnversionedDbentity
      Make visible
      Overrides:
      clone in class BwUnversionedDbentity<BwLocation>
      Returns:
      Object of class T
    • getCombinedValues

      public String getCombinedValues()
      Returns:
      a string for use in the iCalendar LOCATION
    • getCard

      public org.bedework.util.vcard.Card getCard()
      Returns:
      a Card object representing the location.