Package org.trellisldp.common
Class SimpleEvent
- java.lang.Object
-
- org.trellisldp.common.SimpleEvent
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<IRI>getAgents()Get the Agents associated with this event.InstantgetCreated()Get the created date for this event.IRIgetIdentifier()Get an identifier for this event.Optional<IRI>getInbox()Get the inbox corresponding to the resource corresponding to this event, if one exists.Optional<IRI>getObject()Get the resource identifier, if one exists.Collection<IRI>getObjectTypes()Get the types for the resource that is the object of this event.Collection<IRI>getTypes()Get types for this event.
-
-
-
Constructor Detail
-
SimpleEvent
public SimpleEvent(String object, IRI agent, List<IRI> activityTypes, List<IRI> objectTypes)
Create a new notification.- Parameters:
object- the resourceagent- the agent associated with this eventactivityTypes- the activity types associated with this eventobjectTypes- the rdf types of the resource
-
-
Method Detail
-
getIdentifier
public IRI getIdentifier()
Description copied from interface:EventGet an identifier for this event.- Specified by:
getIdentifierin interfaceEvent- Returns:
- an IRI for this event
-
getAgents
public Collection<IRI> getAgents()
Description copied from interface:EventGet the Agents associated with this event.
-
getObject
public Optional<IRI> getObject()
Description copied from interface:EventGet the resource identifier, if one exists.
-
getTypes
public Collection<IRI> getTypes()
Description copied from interface:EventGet types for this event.
-
getObjectTypes
public Collection<IRI> getObjectTypes()
Description copied from interface:EventGet the types for the resource that is the object of this event.- Specified by:
getObjectTypesin interfaceEvent- Returns:
- the types for the resource related to this event
-
getCreated
public Instant getCreated()
Description copied from interface:EventGet the created date for this event.- Specified by:
getCreatedin interfaceEvent- Returns:
- the date-time for this event
-
-