Members
(constant) updateOrCreateResource :_updateOrCreateResource
- Source:
Type:
- _updateOrCreateResource
Methods
assertCredentialsTransport(base)
- Description:
Throws if credentials for base would go over plain http to a host other than this machine. Compares the hostname only, without a DNS lookup.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
base |
string |
buildQuery(struct, isAnd) → {string}
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
struct |
object | |
isAnd |
boolean |
Returns:
- Type
- string
contextTypeClause(contextTypes, negate) → {string}
- Description:
Joins from the context entries of the given types to the entries in those contexts. Uses AND rather than + inside the join, as EntryStore URL-decodes a filterQuery twice and a + would then become a space.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
contextTypes |
Array.<string> | expanded URIs |
negate |
boolean |
Returns:
the URL-encoded clause
- Type
- string
createSearchList(entryStore, query) → {SearchList}
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
entryStore |
EntryStore | |
query |
object |
Returns:
- Type
- SearchList
extractSearchResults(data, list, entryStore) → {Array.<Entry>}
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
data |
object | |
list |
SearchList | |
entryStore |
EntryStore |
Returns:
- Type
- Array.<Entry>
fixNameAndDisabled(resObj, data)
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
resObj |
Resource | |
data |
object |
getCachedExternalMetadataURI(entryURI) → {string}
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
entryURI |
string |
Returns:
- Type
- string
getContext(entryStore, contextEntryURI) → {Context}
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
entryStore |
EntryStore | |
contextEntryURI |
string |
Returns:
- Type
- Context
getContextForEntry(entryURI, entryStore) → {Context}
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
entryURI |
string | |
entryStore |
EntryStore |
Returns:
- Type
- Context
getContextId(uri, base) → {string|undefined}
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
uri |
string | |
base |
string |
Returns:
- Type
- string | undefined
getDefaultLimit() → {number}
- Source:
Returns:
- Type
- number
getEntryCreatePostData(prototypeEntry) → {string}
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
prototypeEntry |
PrototypeEntry |
Returns:
- Type
- string
getEntryCreateURI(prototypeEntry, parentListEntry) → {string}
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
prototypeEntry |
PrototypeEntry | |
parentListEntry |
Entry |
Returns:
- Type
- string
getEntryId(uri, base) → {string|undefined}
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
uri |
string | |
base |
string |
Returns:
- Type
- string | undefined
getEntryLoadURI(entryURI, params) → {string}
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
entryURI |
string | |
params |
object |
Returns:
- Type
- string
getEntryURI(entryStore, contextId, entryId) → {string}
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
entryStore |
EntryStore | |
contextId |
string | |
entryId |
string |
Returns:
- Type
- string
getEntryURIFromURI(entryStore, uri) → {string}
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
entryStore |
EntryStore | |
uri |
string |
Returns:
- Type
- string
getId(uri) → {string}
- Source:
- Deprecated:
- in favor of factory#getEntryId
Parameters:
| Name | Type | Description |
|---|---|---|
uri |
string |
Returns:
- Type
- string
getLegacyStatusParams(include) → {string}
- Description:
EntryStore 5.x has no extended status path; it reads the extended status and its statistics from query flags on the plain status path instead. Only one includeRelationStats flag is sent, since 5.x keeps the last one.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
include |
Array.<string> |
Returns:
- Type
- string
getList(entryStore, entryURI) → {List}
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
entryStore |
EntryStore | |
entryURI |
string |
Returns:
- Type
- List
getMergedMetadataURI(entryURI) → {string}
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
entryURI |
string |
Returns:
- Type
- string
getMetadataURI(entryStore, contextId, entryId) → {string}
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
entryStore |
EntryStore | |
contextId |
string | |
entryId |
string |
Returns:
- Type
- string
getMetadataURIFromURI(entryStore, uri) → {string}
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
entryStore |
EntryStore | |
uri |
string |
Returns:
- Type
- string
getMoveURI(entry, fromListEntry, toListEntry, baseURI) → {string}
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
entry |
Entry | |
fromListEntry |
Entry | |
toListEntry |
Entry | |
baseURI |
string |
Returns:
- Type
- string
getOrigin(uri) → {string|undefined}
Parameters:
| Name | Type | Description |
|---|---|---|
uri |
string |
Returns:
undefined if uri is not an absolute URL
- Type
- string | undefined
getPreventCacheNumber() → {number}
Returns:
- Type
- number
getProxyURI(baseURI, uri, formatHint) → {string}
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
baseURI |
string | |
uri |
string | |
formatHint |
string |
Returns:
- Type
- string
getResourceBase(entryStore, contextId) → {string}
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
entryStore |
EntryStore | |
contextId |
string |
Returns:
- Type
- string
getResourceTypeHelper(entry, vocab) → {string}
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
entry |
EntryInfo | |
vocab |
object |
Returns:
- Type
- string
getResourceURI(entryStore, contextId, entryId) → {string}
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
entryStore |
EntryStore | |
contextId |
string | |
entryId |
string |
Returns:
- Type
- string
getSort() → {Object}
- Source:
Returns:
- Type
- Object
getURIFromCreated(data, context) → {string}
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
data |
object | |
context |
Context |
Returns:
- Type
- string
sameOrigin(url) → {boolean}
- Description:
Check if requests will be to the same domain, i.e. no CORS. Must be used in a browser environment.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
url |
string |
Returns:
- Type
- boolean
setDefaultLimit(limit)
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
limit |
number |
setSort(sortObject)
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
sortObject |
object |
solrFriendly(key, term, isFacet) → {string}
- Description:
Empty spaces in search term should be interpreted as AND instead of the default OR. In addition, fields indexed as text_ngram will have to be shortened to the ngram max limit as they will not match otherwise.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
key |
string | |
term |
string | |
isFacet |
boolean |
Returns:
- Type
- string
transformRights(rights) → {object}
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
rights |
Array.<string> |
Returns:
- Type
- object
update(entry, data)
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
entry |
Entry | |
data |
object |
updateOrCreate(entryURI, data, entryStore) → {Entry}
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
entryURI |
string | |
data |
object | |
entryStore |
EntryStore |
Returns:
- Type
- Entry