Constructor
new (require("store/EntryStoreUtil"))(entrystore)
- Source:
Parameters:
Name | Type | Description |
---|---|---|
entrystore |
EntryStore |
Methods
(async) getEntryByGraphType(graphType, context, asyncCallType) → {Promise.<Entry>}
- Source:
Attempting to find one entry for a specific graph type, if multiple entries exists with the same type the returned promise fails. You may restrict to a specific context.
Parameters:
Name | Type | Description |
---|---|---|
graphType |
string | is the graph type for the entry to match, e.g. use {@see types#GT_USER}. |
context |
Context | restrict to finding the entry in this context |
asyncCallType |
string | the callType used when making the search. |
Throws:
Error
Returns:
- Type
- Promise.<Entry>
(async) getEntryByResourceURI(resourceURI, contextopt, asyncCallType) → {Promise.<Entry>}
- Source:
Retrieves an entry for a resource URI, note that if there are several entries that all have the same resource URI it is unclear which of these entries that are returned. Hence, only use this function if you expect there to be a single entry per resource URI.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
resourceURI |
string | is the URI for the resource. |
|
context |
Context |
<optional> |
only look for entries in this context, may be left out. |
asyncCallType |
string | the callType used when making the search. |
Throws:
Error
Returns:
- Type
- Promise.<Entry>
(async) getEntryByType(typeURI, context, asyncCallType) → {Promise.<Entry>}
- Source:
Attempting to find a unique entry for a specific type, if multiple entries exists with the same type the returned promise fails. You may restrict to a specific context.
Parameters:
Name | Type | Description |
---|---|---|
typeURI |
string | is the rdf:type URI for the entry to match. |
context |
Context | restrict to finding the entry in this context |
asyncCallType |
string | the callType used when making the search. |
Throws:
Error
Returns:
- Type
- Promise.<Entry>
getEntryListByResourceURI(resourceURI) → {Entry}
- Source:
Parameters:
Name | Type | Description |
---|---|---|
resourceURI |
string | is the URI for the resource. |
Returns:
- Type
- Entry
getEntryStore() → {EntryStore}
- Source:
Returns:
- Type
- EntryStore
preloadEntries(ofType, context) → {Entry}
- Source:
Preload entries of a specific type. Not strictly needed, used for optimization reasons. Up to a maximum of 100 entries are preloaded.
Parameters:
Name | Type | Description |
---|---|---|
ofType |
string | |
context |
Context | if provided limits the preload to a specific context. |
Returns:
- Type
- Entry
(async) removeAll(list) → {Promise}
- Source:
Removes all entries matched by a search in a serial manner, also empties the cache from loaded entries so it should not overflow if the searchlist is big.
The removal is accomplished by first iterating through the searchlist and collecting uris to all entries that should be removed. After that the entries are removed.
Parameters:
Name | Type | Description |
---|---|---|
list |
SearchList |
Returns:
- Type
- Promise