|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.tractrac.clientmodule.details.Attachments
com.tractrac.clientmodule.details.IdBase
com.tractrac.clientmodule.details.IdBaseNamed
com.tractrac.clientmodule.Event
public class Event
Encapsulates data related to an Event: Races, Competitors, Competitor Classes, Control points, Routes.
Given a key-value configuration source,
KeyValue.setup(java.net.URL)
can be used instead of a manual setup.
KeyValue.setup(java.net.URL),
Race,
Competitor,
CompetitorClass,
ControlPoint,
Route| Constructor Summary | |
|---|---|
Event(java.util.UUID id,
java.lang.String name)
Creates an event with a given unique id and a name. |
|
| Method Summary | |
|---|---|
Competitor |
addCompetitor(java.util.UUID id,
java.lang.String name,
java.lang.String shortName,
java.lang.String nationality,
CompetitorClass compClass)
Adds a new competitor to this event. |
CompetitorClass |
addCompetitorClass(java.util.UUID id,
java.lang.String name)
Adds a new competitor class to this event. |
ControlPoint |
addControlPoint(java.util.UUID id,
java.lang.String name,
boolean hasTwoPoints)
Adds a new control point to this event. |
ControlPoint |
addControlPoint(java.util.UUID id,
java.lang.String name,
boolean hasTwoPoints,
double lat1,
double lat2,
double lon1,
double lon2)
Adds a new control point to this event. |
Race |
addRace(java.util.UUID id,
java.lang.String name)
Adds a new race to this event. |
Route |
addRoute(java.util.UUID id,
java.lang.String name)
Adds a new route to this event. |
Competitor |
getCompetitorById(java.util.UUID id)
Looks up a competitor based on its unique id. |
CompetitorClass |
getCompetitorClassById(java.util.UUID id)
Looks up a competitor class based on its unique id. |
java.util.Collection<CompetitorClass> |
getCompetitorClassList()
Returns a read-only collection of the competitor classes of this event. |
java.util.Collection<Competitor> |
getCompetitorList()
Returns a read-only collection of the competitors of this event. |
ControlPoint |
getControlPointById(java.util.UUID id)
Looks up a control point based on its unique id. |
java.util.Collection<ControlPoint> |
getControlPointList()
Returns a read-only collection of the control points of this event. |
Race |
getRaceById(java.util.UUID id)
Looks up a race based on its unique id. |
java.util.Collection<Race> |
getRaceList()
Returns a read-only collection of the races of this event. |
Route |
getRouteById(java.util.UUID id)
Looks up a route based on its unique id. |
java.util.Collection<Route> |
getRouteList()
Returns a read-only collection of the routes of this event. |
static AttKey |
newAttKey()
Creates a new (static) key to be used to set/get custom data related to events. |
| Methods inherited from class com.tractrac.clientmodule.details.IdBaseNamed |
|---|
getName, toString |
| Methods inherited from class com.tractrac.clientmodule.details.IdBase |
|---|
equals, getId, hashCode |
| Methods inherited from class com.tractrac.clientmodule.details.Attachments |
|---|
getAttachment, setAttachment |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Event(java.util.UUID id,
java.lang.String name)
id - a unique idname - the name of the event, may be null| Method Detail |
|---|
public static AttKey newAttKey()
public Race addRace(java.util.UUID id,
java.lang.String name)
id - a unique identifier.name - the name of the race. May be null or non-unique.
public Competitor addCompetitor(java.util.UUID id,
java.lang.String name,
java.lang.String shortName,
java.lang.String nationality,
CompetitorClass compClass)
id - a unique identifier.name - the name of the competitor. May be null or non-unique.compClass - the competitor class this competitor belongs to. May be null.
public CompetitorClass addCompetitorClass(java.util.UUID id,
java.lang.String name)
id - a unique identifier.name - the name of the competitor class. May be null or non-unique.
public ControlPoint addControlPoint(java.util.UUID id,
java.lang.String name,
boolean hasTwoPoints)
id - a unique identifier.name - the name of the control point. May be null or non-unique.hasTwoPoints - true if this control point represents two marks/buoys,
false if it represents only one.
public ControlPoint addControlPoint(java.util.UUID id,
java.lang.String name,
boolean hasTwoPoints,
double lat1,
double lat2,
double lon1,
double lon2)
id - a unique identifier.name - the name of the control point. May be null or non-unique.hasTwoPoints - true if this control point represents two marks/buoys,
false if it represents only one.lat1 - is the static latitude of control point mark 1.lat2 - is the static latitude of control point mark 2.lon1 - is the static longitude of control point mark 1.lon2 - is the static longitude of control point mark 2.
public Route addRoute(java.util.UUID id,
java.lang.String name)
id - a unique identifier.name - the name of the route. May be null or non-unique.
public java.util.Collection<Race> getRaceList()
public java.util.Collection<Competitor> getCompetitorList()
public java.util.Collection<CompetitorClass> getCompetitorClassList()
public java.util.Collection<ControlPoint> getControlPointList()
public java.util.Collection<Route> getRouteList()
public Race getRaceById(java.util.UUID id)
id - unique id of the race.
null if not found.public Competitor getCompetitorById(java.util.UUID id)
id - unique id of the competitor.
null if not found.public CompetitorClass getCompetitorClassById(java.util.UUID id)
id - unique id of the competitor class.
null if not found.public ControlPoint getControlPointById(java.util.UUID id)
id - unique id of the control point.
null if not found.public Route getRouteById(java.util.UUID id)
id - unique id of the route.
null if not found.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||