Class EndpointsDefault
java.lang.Object
org.linkedopenactors.rdfpub.domain.commonsrdf.EndpointsDefault
- All Implemented Interfaces:
ActivityPubObject
,Endpoints
-
Constructor Summary
ConstructorDescriptionEndpointsDefault
(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) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addAttributedTo
(org.apache.commons.rdf.api.IRI attributedtTo) Identifies one or more entities to which this object is attributed.void
addAudience
(org.apache.commons.rdf.api.IRI audience) Identifies one or more entities that represent the total population of entities for which the object can considered to be relevant.void
addBcc
(org.apache.commons.rdf.api.IRI bcc) Identifies one or more Objects that are part of the private secondary audience of this Object.void
addBto
(org.apache.commons.rdf.api.IRI bto) Identifies an Object that is part of the private primary audience of this Object.void
addCc
(org.apache.commons.rdf.api.IRI cc) Identifies an Object that is part of the public secondary audience of this Object.void
addTo
(org.apache.commons.rdf.api.IRI to) 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-tovoid
addType
(org.apache.commons.rdf.api.IRI type) The RDF Type See Also: https://www.w3.org/TR/rdf12-schema/#ch_typeorg.apache.commons.rdf.api.Graph
asGraph()
Set
<org.apache.commons.rdf.api.IRI> Identifies one or more entities to which this object is attributed.Set
<org.apache.commons.rdf.api.IRI> Identifies one or more entities that represent the total population of entities for which the object can considered to be relevant.org.apache.commons.rdf.api.IRI
An ActivityPubObject has Versions, so theActivityPubObject.getSubject()
Method normally returns the subject of the current version.Set
<org.apache.commons.rdf.api.IRI> getBcc()
Identifies one or more Objects that are part of the private secondary audience of this Object.Set
<org.apache.commons.rdf.api.IRI> getBto()
Identifies an Object that is part of the private primary audience of this Object.Set
<org.apache.commons.rdf.api.IRI> getCc()
Identifies an Object that is part of the public secondary audience of this Object.org.apache.commons.rdf.api.IRI
Same asActivityPubObject.getBaseSubject()
but as external url.Set
<org.apache.commons.rdf.api.IRI> Same asActivityPubObject.getReceivers()
, but only the external ones.Set
<org.apache.commons.rdf.api.IRI> Same asActivityPubObject.getReceivers()
, but only the internal ones.getName()
Same asActivityPubObject.getName()
but without or with default language.getName
(com.neovisionaries.i18n.LanguageCode languageCode) A simple, human-readable, plain-text name for the object.Optional
<org.apache.commons.rdf.api.IRI> Optional
<org.apache.commons.rdf.api.IRI> The date and time describing the actual or expected starting time of the object.Set
<org.apache.commons.rdf.api.IRI> Optional
<org.apache.commons.rdf.api.IRI> org.apache.commons.rdf.api.IRI
Same asActivityPubObject.getSubject()
but without language or with default language.getSummary
(com.neovisionaries.i18n.LanguageCode languageCode) A natural language summarization of the object encoded as HTML.Set
<org.apache.commons.rdf.api.IRI> getTo()
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-toSet
<org.apache.commons.rdf.api.IRI> getTypes()
The RDF Type See Also: https://www.w3.org/TR/rdf12-schema/#ch_typeOptional
<org.apache.commons.rdf.api.IRI> Optional
<org.apache.commons.rdf.api.IRI> Optional
<org.apache.commons.rdf.api.IRI> void
boolean
boolean
isAttributedTo
(org.apache.commons.rdf.api.IRI requestedActorId) Checks, if the passed ActorId is in theAS.attributedTo()
of theActivityPubObject
.boolean
isReceiver
(org.apache.commons.rdf.api.IRI requestedActorId) Checks, if the passed ActorId is inActivityPubObject.getReceivers()
void
partialUpdate
(ActivityPubObject newOne) void
setAttributedTo
(Set<org.apache.commons.rdf.api.IRI> attributedtTo) Identifies one or more entities to which this object is attributed.void
setAudience
(Set<org.apache.commons.rdf.api.IRI> audience) Identifies one or more entities that represent the total population of entities for which the object can considered to be relevant.void
Identifies one or more Objects that are part of the private secondary audience of this Object.void
Identifies an Object that is part of the private primary audience of this Object.void
Identifies an Object that is part of the public secondary audience of this Object.void
setContent
(String content) void
A simple, human-readable, plain-text name for the object.void
Same asActivityPubObject.setName(String)
with default language.void
setOauthAuthorizationEndpoint
(org.apache.commons.rdf.api.IRI oauthAuthorizationEndpoint) void
setOauthTokenEndpoint
(org.apache.commons.rdf.api.IRI oauthTokenEndpoint) void
setObjectVersion
(Long objectVersion) void
setPublished
(Instant instant) The date and time describing the actual or expected starting time of the object.void
setSameAs
(org.apache.commons.rdf.api.IRI subject) void
setSummary
(com.neovisionaries.i18n.LanguageCode languageCode, String summary) A natural language summarization of the object encoded as HTML.void
setSummary
(String summary) Same asActivityPubObject.setSummary(String)
but without language or with default language.void
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-tovoid
The RDF Type See Also: https://www.w3.org/TR/rdf12-schema/#ch_typevoid
setUpdated
(Instant instant) void
setWasAttributedTo
(org.apache.commons.rdf.api.IRI actor) void
setWasGeneratedBy
(org.apache.commons.rdf.api.IRI subject) void
setWasRevisionOf
(org.apache.commons.rdf.api.IRI subject) toString()
Converts the passed graph/model iinto a string.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.linkedopenactors.rdfpub.domain.commonsrdf.ActivityPubObject
addAttributedTo, addAudience, addBcc, addBto, addCc, addTo, addType, asConvertable, asGraph, getAttributedtTo, getAudience, getBaseSubject, getBcc, getBto, getCc, getContent, getExternalBaseSubject, getExternalReceivers, getInternalReceivers, getName, getName, getObjectVersion, getPublished, getReceivers, getSameAs, getSubject, getSummary, getSummary, getTo, getTypes, getWasAttributedTo, getWasGeneratedBy, getWasRevisionOf, hideBlindReceivers, isActivity, isAttributedTo, isReceiver, partialUpdate, setAttributedTo, setAudience, setBcc, setBto, setCc, setContent, setName, setName, setObjectVersion, setPublished, setSameAs, setSummary, setSummary, setTo, setType, setUpdated, setWasAttributedTo, setWasGeneratedBy, setWasRevisionOf, toString, toString
-
Constructor Details
-
EndpointsDefault
public EndpointsDefault(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)
-
-
Method Details
-
getOauthAuthorizationEndpoint
- Specified by:
getOauthAuthorizationEndpoint
in interfaceEndpoints
-
getOauthTokenEndpoint
- Specified by:
getOauthTokenEndpoint
in interfaceEndpoints
-
setOauthAuthorizationEndpoint
public void setOauthAuthorizationEndpoint(org.apache.commons.rdf.api.IRI oauthAuthorizationEndpoint) - Specified by:
setOauthAuthorizationEndpoint
in interfaceEndpoints
-
setOauthTokenEndpoint
public void setOauthTokenEndpoint(org.apache.commons.rdf.api.IRI oauthTokenEndpoint) - Specified by:
setOauthTokenEndpoint
in interfaceEndpoints
-
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 interfaceActivityPubObject
- Returns:
- attributedtTo
-
setAttributedTo
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 interfaceActivityPubObject
- 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 interfaceActivityPubObject
- Parameters:
attributedtTo
-
-
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 interfaceActivityPubObject
- Returns:
- audience
-
setAudience
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 interfaceActivityPubObject
- 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 interfaceActivityPubObject
- Parameters:
audience
-
-
getName
Description copied from interface:ActivityPubObject
Same asActivityPubObject.getName()
but without or with default language.- Specified by:
getName
in interfaceActivityPubObject
- Returns:
- name
-
setName
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 interfaceActivityPubObject
- Parameters:
languageCode
-name
-
-
getContent
- Specified by:
getContent
in interfaceActivityPubObject
-
getName
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 interfaceActivityPubObject
- Parameters:
languageCode
-- Returns:
- The name
-
setName
Description copied from interface:ActivityPubObject
Same asActivityPubObject.setName(String)
with default language.- Specified by:
setName
in interfaceActivityPubObject
- Parameters:
name
-
-
setContent
- Specified by:
setContent
in interfaceActivityPubObject
-
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 interfaceActivityPubObject
- Returns:
- publishing date
-
setPublished
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 interfaceActivityPubObject
- Parameters:
instant
-
-
setUpdated
- Specified by:
setUpdated
in interfaceActivityPubObject
-
getSummary
Description copied from interface:ActivityPubObject
Same asActivityPubObject.getSubject()
but without language or with default language.- Specified by:
getSummary
in interfaceActivityPubObject
- Returns:
- summary
-
getSummary
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 interfaceActivityPubObject
- Parameters:
languageCode
-- Returns:
- The summary
-
setSummary
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 interfaceActivityPubObject
- Parameters:
languageCode
-summary
-
-
setSummary
Description copied from interface:ActivityPubObject
Same asActivityPubObject.setSummary(String)
but without language or with default language.- Specified by:
setSummary
in interfaceActivityPubObject
- Parameters:
summary
-
-
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 interfaceActivityPubObject
- Returns:
- to
-
setTo
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 interfaceActivityPubObject
- 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 interfaceActivityPubObject
- Parameters:
to
-
-
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 interfaceActivityPubObject
- Returns:
- bto
-
setBto
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 interfaceActivityPubObject
- 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 interfaceActivityPubObject
- Parameters:
bto
-
-
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 interfaceActivityPubObject
- Returns:
- cc
-
setCc
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 interfaceActivityPubObject
- 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 interfaceActivityPubObject
- Parameters:
cc
-
-
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 interfaceActivityPubObject
- Returns:
- bcc
-
setBcc
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 interfaceActivityPubObject
- 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 interfaceActivityPubObject
- Parameters:
bcc
-
-
getReceivers
Description copied from interface:ActivityPubObject
Collection ofActivityPubObject.getTo()
,ActivityPubObject.getBto()
,ActivityPubObject.getCc()
,ActivityPubObject.getBcc()
,ActivityPubObject.getAudience()
- Specified by:
getReceivers
in interfaceActivityPubObject
- Returns:
Set
of all receivers.
-
getExternalReceivers
Description copied from interface:ActivityPubObject
Same asActivityPubObject.getReceivers()
, but only the external ones.- Specified by:
getExternalReceivers
in interfaceActivityPubObject
- Returns:
Set
of all external receivers.
-
getInternalReceivers
Description copied from interface:ActivityPubObject
Same asActivityPubObject.getReceivers()
, but only the internal ones.- Specified by:
getInternalReceivers
in interfaceActivityPubObject
- Returns:
Set
of all internal receivers.
-
hideBlindReceivers
public void hideBlindReceivers()Description copied from interface:ActivityPubObject
- Specified by:
hideBlindReceivers
in interfaceActivityPubObject
-
isAttributedTo
public boolean isAttributedTo(org.apache.commons.rdf.api.IRI requestedActorId) Description copied from interface:ActivityPubObject
Checks, if the passed ActorId is in theAS.attributedTo()
of theActivityPubObject
.- Specified by:
isAttributedTo
in interfaceActivityPubObject
- Parameters:
requestedActorId
-- Returns:
- True, if the passed ActorId is in the
AS.attributedTo()
of theActivityPubObject
.
-
isReceiver
public boolean isReceiver(org.apache.commons.rdf.api.IRI requestedActorId) Description copied from interface:ActivityPubObject
Checks, if the passed ActorId is inActivityPubObject.getReceivers()
- Specified by:
isReceiver
in interfaceActivityPubObject
- 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 interfaceActivityPubObject
-
getBaseSubject
public org.apache.commons.rdf.api.IRI getBaseSubject()Description copied from interface:ActivityPubObject
An ActivityPubObject has Versions, so theActivityPubObject.getSubject()
Method normally returns the subject of the current version. But sometimes you want the base url without the version 'extension'. Then you can use this method.- Specified by:
getBaseSubject
in interfaceActivityPubObject
- Returns:
- ActivityPubObjects base Subject
-
getExternalBaseSubject
public org.apache.commons.rdf.api.IRI getExternalBaseSubject()Description copied from interface:ActivityPubObject
Same asActivityPubObject.getBaseSubject()
but as external url.- Specified by:
getExternalBaseSubject
in interfaceActivityPubObject
- Returns:
- External url that points to the base of thet object. (TODO link to versioning docs!)
-
getObjectVersion
- Specified by:
getObjectVersion
in interfaceActivityPubObject
-
setObjectVersion
- Specified by:
setObjectVersion
in interfaceActivityPubObject
-
setType
Description copied from interface:ActivityPubObject
The RDF Type See Also: https://www.w3.org/TR/rdf12-schema/#ch_type- Specified by:
setType
in interfaceActivityPubObject
- Parameters:
type
-
-
setWasAttributedTo
public void setWasAttributedTo(org.apache.commons.rdf.api.IRI actor) - Specified by:
setWasAttributedTo
in interfaceActivityPubObject
-
getWasAttributedTo
- Specified by:
getWasAttributedTo
in interfaceActivityPubObject
-
setWasGeneratedBy
public void setWasGeneratedBy(org.apache.commons.rdf.api.IRI subject) - Specified by:
setWasGeneratedBy
in interfaceActivityPubObject
-
getWasGeneratedBy
- Specified by:
getWasGeneratedBy
in interfaceActivityPubObject
-
setWasRevisionOf
public void setWasRevisionOf(org.apache.commons.rdf.api.IRI subject) - Specified by:
setWasRevisionOf
in interfaceActivityPubObject
-
getWasRevisionOf
- Specified by:
getWasRevisionOf
in interfaceActivityPubObject
-
getSameAs
- Specified by:
getSameAs
in interfaceActivityPubObject
-
setSameAs
public void setSameAs(org.apache.commons.rdf.api.IRI subject) - Specified by:
setSameAs
in interfaceActivityPubObject
-
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 interfaceActivityPubObject
- Parameters:
type
-
-
getTypes
Description copied from interface:ActivityPubObject
The RDF Type See Also: https://www.w3.org/TR/rdf12-schema/#ch_type- Specified by:
getTypes
in interfaceActivityPubObject
- Returns:
- The type(s)
-
asGraph
public org.apache.commons.rdf.api.Graph asGraph()- Specified by:
asGraph
in interfaceActivityPubObject
-
toString
-
toString
- Specified by:
toString
in interfaceActivityPubObject
-
toString
Description copied from interface:ActivityPubObject
Converts the passed graph/model iinto a string.- Specified by:
toString
in interfaceActivityPubObject
- Parameters:
format
- The format that the string should have, Turtle, Json-LD, ...resolveIris
- True, if the internal iris should be replaced with external https:// urls.- Returns:
- The graph/model as string in the passed format.
-
asConvertable
- Specified by:
asConvertable
in interfaceActivityPubObject
-
isActivity
public boolean isActivity()- Specified by:
isActivity
in interfaceActivityPubObject
-
partialUpdate
- Specified by:
partialUpdate
in interfaceActivityPubObject
-