public class CotEvent
extends java.lang.Object
Constructor and Description |
---|
CotEvent()
Constructs a new CotEvent, setting all required attributes to default values.
|
Modifier and Type | Method and Description |
---|---|
static CotEvent |
copy(CotEvent c)
Returns a deep copy of the CotEvent object
|
java.lang.String |
getAccess()
Returns the String representation of the access level associated with this CotEvent, or null if no value has been assigned.
|
CotDetail |
getDetail()
Gets the CotDetail object associated with the CotEvent
object.
|
java.lang.String |
getHow()
Returns the String representation describing how this CotEvent was generated.
|
java.lang.String |
getOpex()
Returns the String representation of the operation or exercise designator associated with this CotEvent, or null if no value has been assigned.
|
CotPoint |
getPoint()
Gets the CotPoint object associated with the CotEvent object.
|
java.lang.String |
getQos()
Returns the String representation of quality of service level associated with this CotEvent object, or null if no QoS has been assigned
|
java.util.Date |
getStale()
Returns the Date representing the time after which the CotEvent should be considered invalid.
|
java.util.Date |
getStart()
Returns the Date representing the time at which the CotEvent became or will become valid.
|
java.util.Date |
getTime()
Gets the time that the CotEvent object was created.
|
java.lang.String |
getType()
Returns the String representation of this CotEvent's type.
|
java.lang.String |
getUID()
Returns the unique identifier associated with this CotEvent.
|
double |
getVersion()
Returns the version of the CoT message schema associated with this CotEvent.
|
int |
hashCode() |
boolean |
is(Affiliation affiliationType)
Returns true if the CotEvent is of the basic category represented by the
provided Affiliation enumeration (e.g.
|
boolean |
is(Domain domainType)
Returns true if the CotEvent is of the basic category represented by the
provided Domain enumeration (e.g.
|
boolean |
is(RootType rootType)
Returns true if the CotEvent is of the basic category represented by the
provided RootType enumeration (e.g.
|
static CotEvent |
parse(java.lang.String xmlEvent)
Parses an XML markup String into a CoTEvent.
|
void |
setAccess(java.lang.String access)
Replaces the String representation of the operation or exercise designator associated with this CotEvent.
|
void |
setDetail(CotDetail srcDetail)
Replaces the "detail" section of this CotEvent with a copy of the specified CotDetail.
|
void |
setHow(java.lang.String how)
Replaces the designator describing how this CotEvent was generated.
|
void |
setOpex(java.lang.String opex)
Replaces the String representation of the operation or exercise designator associated with this CotEvent.
|
void |
setPoint(CotPoint point)
Sets the CotPoint values for the CotEvent object.
|
void |
setQos(java.lang.String qos)
Replaces the quality of service level for this CotEvent object.
|
void |
setStale(java.util.Date staleTime)
Replaces the Date representing the time after which the CotEvent should be considered invalid.
|
void |
setStart(java.util.Date startTime)
Replaces the Date representing the time that the CotEvent became or will become valid.
|
void |
setTime(java.util.Date time)
Replaces the Date representing the time that the CotEvent object message was created.
|
void |
setType(java.lang.String type)
Replaces the CoT type associated with this CotEvent.
|
void |
setUID(java.lang.String uid)
Replaces the unique identifier associated with this CotEvent.
|
java.lang.String |
toXml()
Returns the XML string representation of the CotEvent object
|
public CotEvent()
public double getVersion()
public java.lang.String getUID()
public void setUID(java.lang.String uid)
uid
- the unique identifier valuejava.lang.NullPointerException
- if the specified uid value is nulljava.lang.IllegalArgumentException
- if the specified uid value consists entirely of whitespacepublic java.lang.String getType()
public void setType(java.lang.String type)
type
- the new CoT type stringjava.lang.NullPointerException
- if the specified type String is nulljava.lang.IllegalArgumentException
- if the specified type String is not a valid CoT Typepublic java.lang.String getHow()
public void setHow(java.lang.String how)
how
- the "how" designationjava.lang.NullPointerException
- if the specified String is nulljava.lang.IllegalArgumentException
- if the specified String is not a valid 'how' attribute valuepublic java.lang.String getQos()
public void setQos(java.lang.String qos)
qos
- a QoS String representation, or a null valuejava.lang.IllegalArgumentException
- if the specified String is not null and fails to match the pattern for valid QoS attribute valuespublic java.lang.String getOpex()
public void setOpex(java.lang.String opex)
Providing a null value effectively removes this optional attribute from the CotEvent
opex
- the 'opex' String value, or nullpublic java.lang.String getAccess()
public void setAccess(java.lang.String access)
Providing a null value effectively removes this optional attribute from the CotEvent
access
- the 'access' stringpublic java.util.Date getTime()
public void setTime(java.util.Date time)
May not be null.
time
- the Date representing the time that the object was createdpublic java.util.Date getStart()
public void setStart(java.util.Date startTime)
May not be null.
startTime
- the Date representing time at which the CotEvent should be considered valid.public java.util.Date getStale()
public void setStale(java.util.Date staleTime)
May not be null.
staleTime
- the Date representing the time after which the CotEvent should be considered invalid.public CotDetail getDetail()
public void setDetail(CotDetail srcDetail)
Providing a null value removes any "detail" section from this CotEvent
srcDetail
- A CotDetail element containing the values to be set in this CotEventCotDetail
public CotPoint getPoint()
public void setPoint(CotPoint point)
point
- A CotPoint with the location values to be copied to this CotEvent.java.lang.NullPointerException
- if the provided CotPoint is nullpublic static CotEvent copy(CotEvent c)
public static CotEvent parse(java.lang.String xmlEvent) throws UnsupportedCotVersionException
xmlEvent
- the XML string to parse into a CotEventUnsupportedCotVersionException
- if the specified XML string contains a version attribute with value other than 2.0java.lang.IllegalArgumentException
- if the specified XML string fails to parse as a CoT event or if the geospatial values are invalidpublic java.lang.String toXml()
public boolean is(Affiliation affiliationType)
affiliationType
- The type Affiliation enumeration used to compare with the type
of the CotEventpublic boolean is(Domain domainType)
domainType
- the type Domain enumeration used to compare with the type of the CotEventpublic boolean is(RootType rootType)
rootType
- a RootType enumeration value to compare with this CotEvent's currently assigned typepublic int hashCode()
hashCode
in class java.lang.Object