eu.planets_project.services.datatypes
Class Event

java.lang.Object
  extended by eu.planets_project.services.datatypes.Event
All Implemented Interfaces:
java.io.Serializable

public final class Event
extends java.lang.Object
implements java.io.Serializable

A Planets Event

Event data, based on the Planets conceptual data model.

If the Event corresponds to the invocation of a Service, then most of this can be filled in by the caller.

TODO Should some space be left in this item for a more extensible system, such as name-value pairs implementing [subject, predicate, object] triples? The subject is clearly the Event, so use 'dc.creator', 'dc.terms.isPartOf', 'planets.process.info' etc?

The ProcessLog should usually be returned by the called Service, and allows the Service to pass back some information about what happened.

Instances of this class are immutable and so can be shared freely.

See Also:
Serialized Form

Constructor Summary
Event(java.lang.String summary, java.lang.String datetime, java.lang.Double duration, Agent agent, java.util.List<Property> properties)
           
 
Method Summary
 boolean equals(java.lang.Object obj)
          
 Agent getAgent()
           
 java.lang.String getDatetime()
           
 double getDuration()
           
 java.util.List<Property> getProperties()
           
 java.lang.String getSummary()
           
 int hashCode()
          
 java.lang.String toString()
          
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Event

public Event(java.lang.String summary,
             java.lang.String datetime,
             java.lang.Double duration,
             Agent agent,
             java.util.List<Property> properties)
Parameters:
summary - The event summary
datetime - The event date
duration - The event duration
agent - The event agent
properties - The event properties
Method Detail

getSummary

public java.lang.String getSummary()
Returns:
The event summary

getDatetime

public java.lang.String getDatetime()
Returns:
The event date

getDuration

public double getDuration()
Returns:
The event duration

getAgent

public Agent getAgent()
Returns:
The event agent

getProperties

public java.util.List<Property> getProperties()
Returns:
The event properties, as an unmodifiable defensive copy.

hashCode

public int hashCode()

Overrides:
hashCode in class java.lang.Object
See Also:
Object.hashCode()

equals

public boolean equals(java.lang.Object obj)

Overrides:
equals in class java.lang.Object
See Also:
Object.equals(java.lang.Object)

toString

public java.lang.String toString()

Overrides:
toString in class java.lang.Object
See Also:
Object.toString()


Copyright © 2007-2010 The Planets Consortium. All Rights Reserved.