Class ActivityPubStoreDefault
java.lang.Object
org.linkedopenactors.rdfpub.store.rdf4j.ActivityPubStoreDefault
- All Implemented Interfaces:
ActivityPubStore
-
Constructor Summary
ConstructorDescriptionActivityPubStoreDefault
(org.apache.commons.rdf.api.RDF rdf, org.apache.commons.rdf.api.IRI storeOwnerSubject, Store store, ActivityPubObjectFactory activityPubObjectFactory, Vocabularies vocabularies) -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
add
(ActivityPubObject ao1, String logMsg) void
addCollectionItem
(CollectionInfo collectionInfo, org.apache.commons.rdf.api.IRI item, String logMsg) org.apache.commons.rdf.api.Graph
dump
(org.apache.commons.rdf.api.IRI graphName) find
(org.apache.commons.rdf.api.IRI subject) find
(org.apache.commons.rdf.api.IRI subject, int deep) Searches for theActivityPubObject
with the passed subject.find
(org.apache.commons.rdf.api.IRI subject, org.apache.commons.rdf.api.IRI predicate, org.apache.commons.rdf.api.RDFTerm object) Searches for theActivityPubObject
that matches the passed triple.find
(org.apache.commons.rdf.api.IRI predicate, org.apache.commons.rdf.api.RDFTerm object) Finds all subjects that match the passed predicate/object.Find object with the passed subjects in the actors store.Find object with the passed subjects in the actors store and resolve dependencies up to the passed depth.findCollection
(org.apache.commons.rdf.api.IRI member) Searches for Collections, where the passed member is a member of.findLatestRevision
(org.apache.commons.rdf.api.IRI pointerSubject) findWholeGraph
(org.apache.commons.rdf.api.IRI subject) ATTENTION!! This reads the whole grap of the actor !getCollection
(Collection<org.apache.commons.rdf.api.IRI> irisToResolve, org.apache.commons.rdf.api.IRI namedGraphToUse, Integer pageSize, Integer startIndex, Integer deep) List
<org.apache.commons.rdf.api.IRI> getCollection
(CollectionInfo collectionInfo) Set
<org.apache.commons.rdf.api.BlankNodeOrIRI> org.apache.commons.rdf.api.IRI
getOwner()
void
update
(ActivityPubObject ao1, String logMsg)
-
Constructor Details
-
ActivityPubStoreDefault
public ActivityPubStoreDefault(org.apache.commons.rdf.api.RDF rdf, org.apache.commons.rdf.api.IRI storeOwnerSubject, Store store, ActivityPubObjectFactory activityPubObjectFactory, Vocabularies vocabularies)
-
-
Method Details
-
add
- Specified by:
add
in interfaceActivityPubStore
-
add
- Specified by:
add
in interfaceActivityPubStore
-
update
- Specified by:
update
in interfaceActivityPubStore
-
addCollectionItem
public void addCollectionItem(CollectionInfo collectionInfo, org.apache.commons.rdf.api.IRI item, String logMsg) - Specified by:
addCollectionItem
in interfaceActivityPubStore
-
getCollection
- Specified by:
getCollection
in interfaceActivityPubStore
-
getCollection
public OrderedCollectionPage getCollection(Collection<org.apache.commons.rdf.api.IRI> irisToResolve, org.apache.commons.rdf.api.IRI namedGraphToUse, Integer pageSize, Integer startIndex, Integer deep) - Specified by:
getCollection
in interfaceActivityPubStore
-
findCollection
Description copied from interface:ActivityPubStore
Searches for Collections, where the passed member is a member of.- Specified by:
findCollection
in interfaceActivityPubStore
- Parameters:
member
-- Returns:
- List of Collections, where the passed member is a member of.
-
find
- Specified by:
find
in interfaceActivityPubStore
-
find
Description copied from interface:ActivityPubStore
Searches for theActivityPubObject
with the passed subject.- Specified by:
find
in interfaceActivityPubStore
- Parameters:
subject
-deep
- up to which hierarchy level should object references be resolved ?- Returns:
- found
ActivityPubObject
.
-
find
public Optional<ActivityPubObject> find(org.apache.commons.rdf.api.IRI subject, org.apache.commons.rdf.api.IRI predicate, org.apache.commons.rdf.api.RDFTerm object) Description copied from interface:ActivityPubStore
Searches for theActivityPubObject
that matches the passed triple.- Specified by:
find
in interfaceActivityPubStore
- Parameters:
subject
-predicate
-object
-- Returns:
- found
ActivityPubObject
.
-
find
public Set<ActivityPubObject> find(org.apache.commons.rdf.api.IRI predicate, org.apache.commons.rdf.api.RDFTerm object) Description copied from interface:ActivityPubStore
Finds all subjects that match the passed predicate/object.- Specified by:
find
in interfaceActivityPubStore
- Parameters:
predicate
-object
-- Returns:
- Set of
ActivityPubObject
s that contains the predicate/object. NOTE theActivityPubObject
s have only one predicate!
-
findAll
Description copied from interface:ActivityPubStore
Find object with the passed subjects in the actors store.- Specified by:
findAll
in interfaceActivityPubStore
- Parameters:
subjectsParam
- Subjects to search for.- Returns:
- Found
ActivityPubObject
s
-
findAll
Description copied from interface:ActivityPubStore
Find object with the passed subjects in the actors store and resolve dependencies up to the passed depth.- Specified by:
findAll
in interfaceActivityPubStore
- Parameters:
subjectsParam
- Subjects to search for.deep
- up to which hierarchy level should object references be resolved ?- Returns:
- Found
ActivityPubObject
s
-
findLatestRevision
public Optional<ActivityPubObject> findLatestRevision(org.apache.commons.rdf.api.IRI pointerSubject) - Specified by:
findLatestRevision
in interfaceActivityPubStore
-
findWholeGraph
Description copied from interface:ActivityPubStore
ATTENTION!! This reads the whole grap of the actor !- Specified by:
findWholeGraph
in interfaceActivityPubStore
- Parameters:
subject
-- Returns:
-
getOwner
public org.apache.commons.rdf.api.IRI getOwner()- Specified by:
getOwner
in interfaceActivityPubStore
-
dump
public org.apache.commons.rdf.api.Graph dump(org.apache.commons.rdf.api.IRI graphName) - Specified by:
dump
in interfaceActivityPubStore
-
getGraphNames
- Specified by:
getGraphNames
in interfaceActivityPubStore
- Returns:
Set
of all known graphNames.
-