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.Instant
getCreated()
Get the created date for this event.IRI
getIdentifier()
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:Event
Get an identifier for this event.- Specified by:
getIdentifier
in interfaceEvent
- Returns:
- an IRI for this event
-
getAgents
public Collection<IRI> getAgents()
Description copied from interface:Event
Get the Agents associated with this event.
-
getObject
public Optional<IRI> getObject()
Description copied from interface:Event
Get the resource identifier, if one exists.
-
getTypes
public Collection<IRI> getTypes()
Description copied from interface:Event
Get types for this event.
-
getObjectTypes
public Collection<IRI> getObjectTypes()
Description copied from interface:Event
Get the types for the resource that is the object of this event.- Specified by:
getObjectTypes
in interfaceEvent
- Returns:
- the types for the resource related to this event
-
getCreated
public Instant getCreated()
Description copied from interface:Event
Get the created date for this event.- Specified by:
getCreated
in interfaceEvent
- Returns:
- the date-time for this event
-
-