Class OrderedCollectionPageDefault

java.lang.Object
org.linkedopenactors.rdfpub.domain.commonsrdf.OrderedCollectionPageDefault
All Implemented Interfaces:
ActivityPubObject, OrderedCollectionPage

public class OrderedCollectionPageDefault extends Object implements OrderedCollectionPage
  • Constructor Details

    • OrderedCollectionPageDefault

      public OrderedCollectionPageDefault(org.apache.commons.rdf.api.RDF rdf, org.apache.commons.rdf.api.IRI subject, org.apache.commons.rdf.api.Graph graph, GraphToStringConverter graphToStringConverter, SubjectProvider subjectProvider, Vocabularies vocabularies, InstanceProperties instanceProperties)
  • Method Details

    • partOf

      public org.apache.commons.rdf.api.IRI partOf()
      Specified by:
      partOf in interface OrderedCollectionPage
    • totalItems

      public long totalItems()
      Specified by:
      totalItems in interface OrderedCollectionPage
    • setPartOf

      public void setPartOf(org.apache.commons.rdf.api.IRI partOf)
      Specified by:
      setPartOf in interface OrderedCollectionPage
    • setTotalItems

      public void setTotalItems(int size)
      Specified by:
      setTotalItems in interface OrderedCollectionPage
    • addActivity

      public void addActivity(Activity activity)
      Specified by:
      addActivity in interface OrderedCollectionPage
    • setItems

      public void setItems(Set<org.apache.commons.rdf.api.IRI> items)
      Specified by:
      setItems in interface OrderedCollectionPage
    • getAttributedtTo

      public Set<org.apache.commons.rdf.api.IRI> getAttributedtTo()
      Description copied from interface: ActivityPubObject
      Identifies one or more entities to which this object is attributed. The attributed entities might not be Actors. For instance, an object might be attributed to the completion of another activity. See Also: https://www.w3.org/TR/activitystreams-vocabulary/#dfn-attributedto
      Specified by:
      getAttributedtTo in interface ActivityPubObject
      Returns:
      attributedtTo
    • setAttributedTo

      public void setAttributedTo(Set<org.apache.commons.rdf.api.IRI> attributedtTo)
      Description copied from interface: ActivityPubObject
      Identifies one or more entities to which this object is attributed. The attributed entities might not be Actors. For instance, an object might be attributed to the completion of another activity. See Also: https://www.w3.org/TR/activitystreams-vocabulary/#dfn-attributedto
      Specified by:
      setAttributedTo in interface ActivityPubObject
      Parameters:
      attributedtTo -
    • addAttributedTo

      public void addAttributedTo(org.apache.commons.rdf.api.IRI attributedtTo)
      Description copied from interface: ActivityPubObject
      Identifies one or more entities to which this object is attributed. The attributed entities might not be Actors. For instance, an object might be attributed to the completion of another activity. See Also: https://www.w3.org/TR/activitystreams-vocabulary/#dfn-attributedto
      Specified by:
      addAttributedTo in interface ActivityPubObject
      Parameters:
      attributedtTo -
    • getAudience

      public Set<org.apache.commons.rdf.api.IRI> getAudience()
      Description copied from interface: ActivityPubObject
      Identifies one or more entities that represent the total population of entities for which the object can considered to be relevant. See Also: https://www.w3.org/TR/activitystreams-vocabulary/#dfn-audience
      Specified by:
      getAudience in interface ActivityPubObject
      Returns:
      audience
    • setAudience

      public void setAudience(Set<org.apache.commons.rdf.api.IRI> audience)
      Description copied from interface: ActivityPubObject
      Identifies one or more entities that represent the total population of entities for which the object can considered to be relevant. See Also: https://www.w3.org/TR/activitystreams-vocabulary/#dfn-audience
      Specified by:
      setAudience in interface ActivityPubObject
      Parameters:
      audience -
    • addAudience

      public void addAudience(org.apache.commons.rdf.api.IRI audience)
      Description copied from interface: ActivityPubObject
      Identifies one or more entities that represent the total population of entities for which the object can considered to be relevant. See Also: https://www.w3.org/TR/activitystreams-vocabulary/#dfn-audience
      Specified by:
      addAudience in interface ActivityPubObject
      Parameters:
      audience -
    • getName

      public Optional<String> getName()
      Description copied from interface: ActivityPubObject
      Same as ActivityPubObject.getName() but without or with default language.
      Specified by:
      getName in interface ActivityPubObject
      Returns:
      name
    • setName

      public void setName(com.neovisionaries.i18n.LanguageCode languageCode, String name)
      Description copied from interface: ActivityPubObject
      A simple, human-readable, plain-text name for the object. HTML markup MUST NOT be included. The name MAY be expressed using multiple language-tagged values. See Also: https://www.w3.org/TR/activitystreams-vocabulary/#dfn-name
      Specified by:
      setName in interface ActivityPubObject
      Parameters:
      languageCode -
      name -
    • getContent

      public Optional<String> getContent()
      Specified by:
      getContent in interface ActivityPubObject
    • getName

      public Optional<String> getName(com.neovisionaries.i18n.LanguageCode languageCode)
      Description copied from interface: ActivityPubObject
      A simple, human-readable, plain-text name for the object. HTML markup MUST NOT be included. The name MAY be expressed using multiple language-tagged values. See Also: https://www.w3.org/TR/activitystreams-vocabulary/#dfn-name
      Specified by:
      getName in interface ActivityPubObject
      Parameters:
      languageCode -
      Returns:
      The name
    • setName

      public void setName(String name)
      Description copied from interface: ActivityPubObject
      Same as ActivityPubObject.setName(String) with default language.
      Specified by:
      setName in interface ActivityPubObject
      Parameters:
      name -
    • setContent

      public void setContent(String content)
      Specified by:
      setContent in interface ActivityPubObject
    • getPublished

      public Optional<Instant> getPublished()
      Description copied from interface: ActivityPubObject
      The date and time describing the actual or expected starting time of the object. When used with an Activity object, for instance, the startTime property specifies the moment the activity began or is scheduled to begin. See Also: https://www.w3.org/TR/activitystreams-vocabulary/#dfn-published
      Specified by:
      getPublished in interface ActivityPubObject
      Returns:
      publishing date
    • setPublished

      public void setPublished(Instant instant)
      Description copied from interface: ActivityPubObject
      The date and time describing the actual or expected starting time of the object. When used with an Activity object, for instance, the startTime property specifies the moment the activity began or is scheduled to begin. See Also: https://www.w3.org/TR/activitystreams-vocabulary/#dfn-published
      Specified by:
      setPublished in interface ActivityPubObject
      Parameters:
      instant -
    • setUpdated

      public void setUpdated(Instant instant)
      Specified by:
      setUpdated in interface ActivityPubObject
    • getSummary

      public Optional<String> getSummary()
      Description copied from interface: ActivityPubObject
      Same as ActivityPubObject.getSubject() but without language or with default language.
      Specified by:
      getSummary in interface ActivityPubObject
      Returns:
      summary
    • getSummary

      public Optional<String> getSummary(com.neovisionaries.i18n.LanguageCode languageCode)
      Description copied from interface: ActivityPubObject
      A natural language summarization of the object encoded as HTML. Multiple language tagged summaries MAY be provided.
      Specified by:
      getSummary in interface ActivityPubObject
      Parameters:
      languageCode -
      Returns:
      The summary
    • setSummary

      public void setSummary(com.neovisionaries.i18n.LanguageCode languageCode, String summary)
      Description copied from interface: ActivityPubObject
      A natural language summarization of the object encoded as HTML. Multiple language tagged summaries MAY be provided.
      Specified by:
      setSummary in interface ActivityPubObject
      Parameters:
      languageCode -
      summary -
    • setSummary

      public void setSummary(String summary)
      Description copied from interface: ActivityPubObject
      Same as ActivityPubObject.setSummary(String) but without language or with default language.
      Specified by:
      setSummary in interface ActivityPubObject
      Parameters:
      summary -
    • getTo

      public Set<org.apache.commons.rdf.api.IRI> getTo()
      Description copied from interface: ActivityPubObject
      Identifies an entity considered to be part of the public primary audience of an Object See Also: https://www.w3.org/TR/activitystreams-vocabulary/#dfn-to
      Specified by:
      getTo in interface ActivityPubObject
      Returns:
      to
    • setTo

      public void setTo(Set<org.apache.commons.rdf.api.IRI> to)
      Description copied from interface: ActivityPubObject
      Identifies an entity considered to be part of the public primary audience of an Object See Also: https://www.w3.org/TR/activitystreams-vocabulary/#dfn-to
      Specified by:
      setTo in interface ActivityPubObject
      Parameters:
      to -
    • addTo

      public void addTo(org.apache.commons.rdf.api.IRI to)
      Description copied from interface: ActivityPubObject
      Identifies an entity considered to be part of the public primary audience of an Object See Also: https://www.w3.org/TR/activitystreams-vocabulary/#dfn-to
      Specified by:
      addTo in interface ActivityPubObject
      Parameters:
      to -
    • getBto

      public Set<org.apache.commons.rdf.api.IRI> getBto()
      Description copied from interface: ActivityPubObject
      Identifies an Object that is part of the private primary audience of this Object. See Also: https://www.w3.org/TR/activitystreams-vocabulary/#dfn-bto
      Specified by:
      getBto in interface ActivityPubObject
      Returns:
      bto
    • setBto

      public void setBto(Set<org.apache.commons.rdf.api.IRI> bto)
      Description copied from interface: ActivityPubObject
      Identifies an Object that is part of the private primary audience of this Object. See Also: https://www.w3.org/TR/activitystreams-vocabulary/#dfn-bto
      Specified by:
      setBto in interface ActivityPubObject
      Parameters:
      bto -
    • addBto

      public void addBto(org.apache.commons.rdf.api.IRI bto)
      Description copied from interface: ActivityPubObject
      Identifies an Object that is part of the private primary audience of this Object. See Also: https://www.w3.org/TR/activitystreams-vocabulary/#dfn-bto
      Specified by:
      addBto in interface ActivityPubObject
      Parameters:
      bto -
    • getCc

      public Set<org.apache.commons.rdf.api.IRI> getCc()
      Description copied from interface: ActivityPubObject
      Identifies an Object that is part of the public secondary audience of this Object. See Also: https://www.w3.org/TR/activitystreams-vocabulary/#dfn-cc
      Specified by:
      getCc in interface ActivityPubObject
      Returns:
      cc
    • setCc

      public void setCc(Set<org.apache.commons.rdf.api.IRI> cc)
      Description copied from interface: ActivityPubObject
      Identifies an Object that is part of the public secondary audience of this Object. See Also: https://www.w3.org/TR/activitystreams-vocabulary/#dfn-cc
      Specified by:
      setCc in interface ActivityPubObject
      Parameters:
      cc -
    • addCc

      public void addCc(org.apache.commons.rdf.api.IRI cc)
      Description copied from interface: ActivityPubObject
      Identifies an Object that is part of the public secondary audience of this Object. See Also: https://www.w3.org/TR/activitystreams-vocabulary/#dfn-cc
      Specified by:
      addCc in interface ActivityPubObject
      Parameters:
      cc -
    • getBcc

      public Set<org.apache.commons.rdf.api.IRI> getBcc()
      Description copied from interface: ActivityPubObject
      Identifies one or more Objects that are part of the private secondary audience of this Object. See Also: https://www.w3.org/TR/activitystreams-vocabulary/#dfn-bcc
      Specified by:
      getBcc in interface ActivityPubObject
      Returns:
      bcc
    • setBcc

      public void setBcc(Set<org.apache.commons.rdf.api.IRI> bcc)
      Description copied from interface: ActivityPubObject
      Identifies one or more Objects that are part of the private secondary audience of this Object. See Also: https://www.w3.org/TR/activitystreams-vocabulary/#dfn-bcc
      Specified by:
      setBcc in interface ActivityPubObject
      Parameters:
      bcc -
    • addBcc

      public void addBcc(org.apache.commons.rdf.api.IRI bcc)
      Description copied from interface: ActivityPubObject
      Identifies one or more Objects that are part of the private secondary audience of this Object. See Also: https://www.w3.org/TR/activitystreams-vocabulary/#dfn-bcc
      Specified by:
      addBcc in interface ActivityPubObject
      Parameters:
      bcc -
    • getReceivers

      public Set<org.apache.commons.rdf.api.IRI> getReceivers()
      Description copied from interface: ActivityPubObject
      Specified by:
      getReceivers in interface ActivityPubObject
      Returns:
      Set of all receivers.
    • hideBlindReceivers

      public void hideBlindReceivers()
      Description copied from interface: ActivityPubObject
      Removes AS.bcc() AND AS.bto()
      Specified by:
      hideBlindReceivers in interface ActivityPubObject
    • isAttributedTo

      public boolean isAttributedTo(org.apache.commons.rdf.api.IRI requestedActorId)
      Description copied from interface: ActivityPubObject
      Checks, if the passed ActorId is in the AS.attributedTo() of the ActivityPubObject.
      Specified by:
      isAttributedTo in interface ActivityPubObject
      Parameters:
      requestedActorId -
      Returns:
      True, if the passed ActorId is in the AS.attributedTo() of the ActivityPubObject.
    • isReceiver

      public boolean isReceiver(org.apache.commons.rdf.api.IRI requestedActorId)
      Description copied from interface: ActivityPubObject
      Checks, if the passed ActorId is in ActivityPubObject.getReceivers()
      Specified by:
      isReceiver in interface ActivityPubObject
      Parameters:
      requestedActorId -
      Returns:
      True, if the passed ActorId is in ActivityPubObject.getReceivers()
    • getSubject

      public org.apache.commons.rdf.api.IRI getSubject()
      Specified by:
      getSubject in interface ActivityPubObject
    • setType

      public void setType(Set<org.apache.commons.rdf.api.IRI> type)
      Description copied from interface: ActivityPubObject
      The RDF Type See Also: https://www.w3.org/TR/rdf12-schema/#ch_type
      Specified by:
      setType in interface ActivityPubObject
      Parameters:
      type -
    • setWasAttributedTo

      public void setWasAttributedTo(org.apache.commons.rdf.api.IRI actor)
      Specified by:
      setWasAttributedTo in interface ActivityPubObject
    • getWasAttributedTo

      public Optional<org.apache.commons.rdf.api.IRI> getWasAttributedTo()
      Specified by:
      getWasAttributedTo in interface ActivityPubObject
    • setWasGeneratedBy

      public void setWasGeneratedBy(org.apache.commons.rdf.api.IRI subject)
      Specified by:
      setWasGeneratedBy in interface ActivityPubObject
    • getWasGeneratedBy

      public Optional<org.apache.commons.rdf.api.IRI> getWasGeneratedBy()
      Specified by:
      getWasGeneratedBy in interface ActivityPubObject
    • setWasRevisionOf

      public void setWasRevisionOf(org.apache.commons.rdf.api.IRI subject)
      Specified by:
      setWasRevisionOf in interface ActivityPubObject
    • getWasRevisionOf

      public Optional<org.apache.commons.rdf.api.IRI> getWasRevisionOf()
      Specified by:
      getWasRevisionOf in interface ActivityPubObject
    • getSameAs

      public Optional<org.apache.commons.rdf.api.IRI> getSameAs()
      Specified by:
      getSameAs in interface ActivityPubObject
    • setSameAs

      public void setSameAs(org.apache.commons.rdf.api.IRI subject)
      Specified by:
      setSameAs in interface ActivityPubObject
    • addType

      public void addType(org.apache.commons.rdf.api.IRI type)
      Description copied from interface: ActivityPubObject
      The RDF Type See Also: https://www.w3.org/TR/rdf12-schema/#ch_type
      Specified by:
      addType in interface ActivityPubObject
      Parameters:
      type -
    • getTypes

      public Set<org.apache.commons.rdf.api.IRI> getTypes()
      Description copied from interface: ActivityPubObject
      The RDF Type See Also: https://www.w3.org/TR/rdf12-schema/#ch_type
      Specified by:
      getTypes in interface ActivityPubObject
      Returns:
      The type(s)
    • asGraph

      public org.apache.commons.rdf.api.Graph asGraph()
      Specified by:
      asGraph in interface ActivityPubObject
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toString

      public String toString(RdfFormat format)
      Specified by:
      toString in interface ActivityPubObject
    • toString

      public String toString(RdfFormat format, boolean resolveIris)
      Specified by:
      toString in interface ActivityPubObject
    • asConvertable

      public ActivityPubObjectConvertable asConvertable()
      Specified by:
      asConvertable in interface ActivityPubObject
    • isActivity

      public boolean isActivity()
      Specified by:
      isActivity in interface ActivityPubObject
    • partialUpdate

      public void partialUpdate(ActivityPubObject newOne)
      Specified by:
      partialUpdate in interface ActivityPubObject