com.edustructures.sifworks.common
Class Address

java.lang.Object
  extended by com.edustructures.sifworks.Element
      extended by com.edustructures.sifworks.SIFElement
          extended by com.edustructures.sifworks.SIFKeyedElement
              extended by com.edustructures.sifworks.common.Address
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class Address
extends SIFKeyedElement

This element represents an address. This object occurs within objects and elements such as StaffPersonal and StudentPersonal/StudentAddress, etc.

Since:
1.1
Version:
2.0
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.edustructures.sifworks.Element
CURRENT_SERIALIZE_VERSION
 
Constructor Summary
Address()
          Constructor
Address(AddressType type, Street street, java.lang.String city, StatePrCode stateProvince, CountryCode country, java.lang.String postalCode)
          Constructor that accepts values for all mandatory fields
 
Method Summary
 java.lang.String getCity()
          Gets the value of the <City> element.
 java.lang.String getCountry()
          Gets the value of the <Country> element.
 java.lang.String getCounty()
          Gets the value of the <County> element.
 GridLocation getGridLocation()
          Gets the value of the <GridLocation> element.
 java.lang.String getKey()
          Gets the key of this object
 ElementDef[] getKeyFields()
          Gets the metadata fields that make up the key of this object
 java.lang.String getPostalCode()
          Gets the value of the <PostalCode> element.
 java.lang.String getStateProvince()
          Gets the value of the <StateProvince> element.
 Street getStreet()
          Gets the value of the <Street> element.
 java.lang.String getType()
          Gets the value of the Type attribute.
 void removeGridLocation()
          Removes the GridLocation child element previously created by calling setGridLocation
 void removeStreet()
          Removes the Street child element previously created by calling setStreet
 void setCity(java.lang.String value)
          Sets the value of the <City> element.
 void setCountry(CountryCode value)
          Sets the value of the <Country> element.
 void setCountry(java.lang.String value)
          Sets the value of the <Country> element as a String.
 void setCounty(java.lang.String value)
          Sets the value of the <County> element.
 void setGridLocation(java.math.BigDecimal latitude, java.math.BigDecimal longitude)
          Sets the value of the <GridLocation> child element.
 void setGridLocation(GridLocation value)
          Sets the value of the <GridLocation> element.
 void setPostalCode(java.lang.String value)
          Sets the value of the <PostalCode> element.
 void setStateProvince(StatePrCode value)
          Sets the value of the <StateProvince> element.
 void setStateProvince(java.lang.String value)
          Sets the value of the <StateProvince> element as a String.
 void setStreet(Street value)
          Sets the value of the <Street> element.
 void setStreet(java.lang.String line1)
          Sets the value of the <Street> child element.
 void setType(AddressType value)
          Sets the value of the Type attribute.
 void setType(java.lang.String value)
          Sets the value of the Type attribute as a String.
 
Methods inherited from class com.edustructures.sifworks.SIFElement
addChild, addChild, clone, compareGraphTo, create, effectiveSIFVersion, getChild, getChild, getChild, getChild, getChild, getChildCount, getChildList, getChildList, getChildList, getChildren, getChildren, getContent, getContent, getField, getField, getFieldCount, getFields, getFieldValue, getSIFValue, getSIFVersion, getTextValue, getXmlId, hasTextValue, removeChild, removeChild, removeChild, removeChild, restoreImplementationDef, setChanged, setChildren, setEmpty, setField, setField, setField, setField, setSIFValue, setSIFVersion, setTextValue, setXmlId, tag
 
Methods inherited from class com.edustructures.sifworks.Element
compareTo, getElementDef, getParent, getRoot, isChanged, isDoNotEncode, isEmpty, setChanged, setDoNotEncode, setElementDef, setEmpty, setParent, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Address

public Address()
Constructor


Address

public Address(AddressType type,
               Street street,
               java.lang.String city,
               StatePrCode stateProvince,
               CountryCode country,
               java.lang.String postalCode)
Constructor that accepts values for all mandatory fields

Parameters:
type - Code that defines the location of the address. Note: A subset of specific valid values for each instance in a data object may be listed in that object.
street - The street part of the address
city - The city part of the address.
stateProvince - The state or province code.
country - The country code.
postalCode - The ZIP/postal code.
Method Detail

getKey

public java.lang.String getKey()
Gets the key of this object

Overrides:
getKey in class SIFElement
Returns:
The value of the object's Mandatory or Required attribute. If an object has more than one such attribute, the key is a period- delimited concatenation of the attribute values in sequential order

getKeyFields

public ElementDef[] getKeyFields()
Gets the metadata fields that make up the key of this object

Returns:
an array of metadata fields that make up the object's key

getType

public java.lang.String getType()
Gets the value of the Type attribute.

The SIF specification defines the meaning of this attribute as: "Code that defines the location of the address. Note: A subset of specific valid values for each instance in a data object may be listed in that object."

Returns:
The Type attribute of this object.
Since:
1.1

setType

public void setType(AddressType value)
Sets the value of the Type attribute.

The SIF specification defines the meaning of this attribute as: "Code that defines the location of the address. Note: A subset of specific valid values for each instance in a data object may be listed in that object."

Parameters:
value - A constant defined by the AddressType class
Since:
1.1

setType

public void setType(java.lang.String value)
Sets the value of the Type attribute as a String.

The SIF specification defines the meaning of this attribute as: "Code that defines the location of the address. Note: A subset of specific valid values for each instance in a data object may be listed in that object."

Parameters:
value - The value as a String
Since:
1.1

setStreet

public void setStreet(Street value)
Sets the value of the <Street> element.

The SIF specification defines the meaning of this element as: "The street part of the address"

Parameters:
value - A Street object
Since:
1.1

setStreet

public void setStreet(java.lang.String line1)
Sets the value of the <Street> child element. This form of setStreet is provided as a convenience method that is functionally equivalent to the version of setStreet that accepts a single Street object.

Parameters:
line1 - Address line 1.
Since:
1.1

getStreet

public Street getStreet()
Gets the value of the <Street> element.

The SIF specification defines the meaning of this element as: "The street part of the address"

Returns:
A Street object
Since:
1.1

removeStreet

public void removeStreet()
Removes the Street child element previously created by calling setStreet

Since:
1.1

getCity

public java.lang.String getCity()
Gets the value of the <City> element.

The SIF specification defines the meaning of this element as: "The city part of the address."

Returns:
The City element of this object.
Since:
1.1

setCity

public void setCity(java.lang.String value)
Sets the value of the <City> element.

The SIF specification defines the meaning of this element as: "The city part of the address."

Parameters:
value - A String object
Since:
1.1

getCounty

public java.lang.String getCounty()
Gets the value of the <County> element.

The SIF specification defines the meaning of this element as: "The county part of the address."

Returns:
The County element of this object.
Since:
1.1

setCounty

public void setCounty(java.lang.String value)
Sets the value of the <County> element.

The SIF specification defines the meaning of this element as: "The county part of the address."

Parameters:
value - A String object
Since:
1.1

getStateProvince

public java.lang.String getStateProvince()
Gets the value of the <StateProvince> element.

The SIF specification defines the meaning of this element as: "The state or province code."

This element is known by more than one tag name depending on the version of SIF in use. The ADK will use the tag names shown below when parsing and rendering elements of this kind.

VersionTag
1.1"StatePr"
SIF2.0"StateProvince"

Returns:
The StateProvince element of this object.
Since:
1.1

setStateProvince

public void setStateProvince(StatePrCode value)
Sets the value of the <StateProvince> element.

The SIF specification defines the meaning of this element as: "The state or province code."

This element is known by more than one tag name depending on the version of SIF in use. The ADK will use the tag names shown below when parsing and rendering elements of this kind.

VersionTag
1.1"StatePr"
SIF2.0"StateProvince"

Parameters:
value - A constant defined by the StatePrCode class
Since:
1.1

setStateProvince

public void setStateProvince(java.lang.String value)
Sets the value of the <StateProvince> element as a String.

The SIF specification defines the meaning of this element as: "The state or province code."

This element is known by more than one tag name depending on the version of SIF in use. The ADK will use the tag names shown below when parsing and rendering elements of this kind.

VersionTag
1.1"StatePr"
SIF2.0"StateProvince"

Parameters:
value - The value as a String
Since:
1.1

getCountry

public java.lang.String getCountry()
Gets the value of the <Country> element.

The SIF specification defines the meaning of this element as: "The country code."

Returns:
The Country element of this object.
Since:
1.1

setCountry

public void setCountry(CountryCode value)
Sets the value of the <Country> element.

The SIF specification defines the meaning of this element as: "The country code."

Parameters:
value - A constant defined by the CountryCode class
Since:
1.1

setCountry

public void setCountry(java.lang.String value)
Sets the value of the <Country> element as a String.

The SIF specification defines the meaning of this element as: "The country code."

Parameters:
value - The value as a String
Since:
1.1

getPostalCode

public java.lang.String getPostalCode()
Gets the value of the <PostalCode> element.

The SIF specification defines the meaning of this element as: "The ZIP/postal code."

Returns:
The PostalCode element of this object.
Since:
1.1

setPostalCode

public void setPostalCode(java.lang.String value)
Sets the value of the <PostalCode> element.

The SIF specification defines the meaning of this element as: "The ZIP/postal code."

Parameters:
value - A String object
Since:
1.1

setGridLocation

public void setGridLocation(GridLocation value)
Sets the value of the <GridLocation> element.

The SIF specification defines the meaning of this element as: "The location of the address."

Parameters:
value - A GridLocation object
Since:
1.1

setGridLocation

public void setGridLocation(java.math.BigDecimal latitude,
                            java.math.BigDecimal longitude)
Sets the value of the <GridLocation> child element. This form of setGridLocation is provided as a convenience method that is functionally equivalent to the version of setGridLocation that accepts a single GridLocation object.

Parameters:
latitude - The latitude coordinate of this location expressed in decimal format (e.g. "41.7699657")
longitude - The longitude coordinate of this location expressed in decimal format (e.g. "79.548445")
Since:
1.1

getGridLocation

public GridLocation getGridLocation()
Gets the value of the <GridLocation> element.

The SIF specification defines the meaning of this element as: "The location of the address."

Returns:
A GridLocation object
Since:
1.1

removeGridLocation

public void removeGridLocation()
Removes the GridLocation child element previously created by calling setGridLocation

Since:
1.1


Copyright © 2001-2007 Edustructures LLC. All Rights Reserved. SIFWorks® and ADK® are registered trademarks of Edustructures LLC. SIF™ and Schools Interoperability Framework are trademarks of the Schools Interoperability Framework Association.