Class SimpleEvent

  • All Implemented Interfaces:
    Event

    public class SimpleEvent
    extends Object
    implements Event
    A simple Event implementation.
    • Constructor Detail

      • SimpleEvent

        public SimpleEvent​(String object,
                           IRI agent,
                           List<IRI> activityTypes,
                           List<IRI> objectTypes)
        Create a new notification.
        Parameters:
        object - the resource
        agent - the agent associated with this event
        activityTypes - the activity types associated with this event
        objectTypes - 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 interface Event
        Returns:
        an IRI for this event
      • getAgents

        public Collection<IRI> getAgents()
        Description copied from interface: Event
        Get the Agents associated with this event.
        Specified by:
        getAgents in interface Event
        Returns:
        the agents associated with this event
      • getObject

        public Optional<IRI> getObject()
        Description copied from interface: Event
        Get the resource identifier, if one exists.
        Specified by:
        getObject in interface Event
        Returns:
        an identifier for the resource that is the object of this event
      • getTypes

        public Collection<IRI> getTypes()
        Description copied from interface: Event
        Get types for this event.
        Specified by:
        getTypes in interface Event
        Returns:
        the 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 interface Event
        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 interface Event
        Returns:
        the date-time for this event
      • getInbox

        public Optional<IRI> getInbox()
        Description copied from interface: Event
        Get the inbox corresponding to the resource corresponding to this event, if one exists.
        Specified by:
        getInbox in interface Event
        Returns:
        the inbox