This file contains convenience helpers for working with LinkedArt objects
Methods
# static getAccessionNumbers(submittedResource, options) → {Array}
Gets accession number(s) associated with an object if available.
Parameters:
Name | Type | Description |
---|---|---|
submittedResource |
Object
|
JSON-LD object |
options |
Object
|
additional options |
requestedClassifications |
String
|
Array
|
AAT accession numbers (default: aat.ACCESSION_NUMBERS) |
language |
String
|
limits the results to just a specific language (or leave undefined for all results) |
languageOptions |
Object
|
any additional options when working with language(s) @see LanguageHelpers.doesObjectLanguageMatch |
content of AAT accession numbers
Array
Examples
getAccessionNumbers(object) // gets accession numbers using defaults
getAccessionNumbers(object, {language:'hi'}) // gets accession numbers in Hindi
getAccessionNumbers(object, {requestedClassifications: 'http://vocab.getty.edu/aat/300444185'}) // gets accession numbers using a different AAT term
# static getAcknowledgementStatements(submittedResource, options) → {Array}
Gets the acknowledgement statement associated with an object if available.
Parameters:
Name | Type | Description |
---|---|---|
submittedResource |
Object
|
|
options |
Object
|
additional options |
requestedClassifications |
String
|
Array
|
AAT acknowledgement statement (default: aat.ACKNOWLEDGEMENT) |
language |
String
|
limits the results to just a specific language (or leave undefined for all results) |
languageOptions |
Object
|
any additional options when working with language(s) @see LanguageHelpers.doesObjectLanguageMatch |
array of acknowledgement statements
Array
Examples
getAcknowledgementStatements(object) // gets acknowledgements using defaults
getAcknowledgementStatements(object, {language:'ca'}) // gets acknowledgements in Catalan
getAcknowledgementStatements(object, {requestedClassifications: 'http://vocab.getty.edu/aat/300055617'}) // gets acknowledgement using a different AAT term
# static getCarriedOutBy(object, field) → {Array}
gets the creator from the JSON-LD (produced_by / carried_out_by ) and returns the result. This is likely an object which
is a reference to a Person or Group (Id, Type, and Label with nothing else), but could simply be an ID reference as well.
Parameters:
Name | Type | Description |
---|---|---|
object |
Object
|
the JSON-LD Object to look in |
field |
String
|
the field to look for the |
- an array of the references
Array
Example
gets creator object/reference regardless of whether the production has a part or not
getCarriedOutBy({produced_by: { part: [{carried_out_by: {id:123}}}]}), would return an array with one item [{id:123}]
# static getClassifications(submittedResource, options) → {Array}
Gets the classification(s) associated with an object if available.
Parameters:
Name | Type | Description |
---|---|---|
submittedResource |
Object
|
|
options |
Object
|
additional options |
requestedClassifications |
String
|
Array
|
AAT classification (default: aat.CLASSIFICATION) |
language |
String
|
limits the results to just a specific language (or leave undefined for all results) |
languageOptions |
Object
|
any additional options when working with language(s) @see LanguageHelpers.doesObjectLanguageMatch |
array of classification objects
Array
Examples
getClassifications(object) // gets classifications using defaults
getClassifications(object, {language:'hu'}) // gets classifications in Magyar
getClassifications(object, {requestedClassifications: 'http://vocab.getty.edu/aat/300375701'}) // gets classifications using a different AAT term
# static getCopyrightStatements(submittedResource, options) → {Array}
Gets copyright or licensing statements associated with an object if available.
Parameters:
Name | Type | Description |
---|---|---|
submittedResource |
Object
|
|
options |
Object
|
additional options |
requestedClassifications |
String
|
Array
|
AAT copyright (default: aat.COPYRIGHT) |
language |
String
|
limits the results to just a specific language (or leave undefined for all results) |
languageOptions |
Object
|
any additional options when working with language(s) @see LanguageHelpers.doesObjectLanguageMatch |
array of copyright objects
Array
Examples
getCopyright(object) // gets copyright using defaults
getCopyright(object, {language:'ca'}) // gets copyright in Catalan
getCopyright(object, {requestedClassifications: 'http://vocab.getty.edu/aat/300055617'}) // gets copyright using a different AAT term
# static getCultures(submittedResource, options) → {Array}
Gets the culture(s) associated with an object if available.
Parameters:
Name | Type | Description |
---|---|---|
submittedResource |
Object
|
JSON-LD object |
options |
Object
|
additional options |
requestedClassifications |
String
|
Array
|
AAT culture (default: aat.CULTURE) |
language |
String
|
limits the results to just a specific language (or leave undefined for all results) |
languageOptions |
Object
|
any additional options when working with language(s) @see LanguageHelpers.doesObjectLanguageMatch |
content of AAT culture(s)
Array
Examples
getCultures(object) // gets culture(s) using defaults
getCultures(object, {language:'fr'}) // gets culture(s) in French
# static getDigitalImages(submittedResource, options) → {Array}
Gets URLs for digital images associated with an object if available.
Parameters:
Name | Type | Description |
---|---|---|
submittedResource |
Object
|
JSON-LD object |
options |
Object
|
additional options |
requestedClassifications |
String
|
Array
|
AAT digital images (default: aat.DIGITAL_IMAGES) |
urls of AAT digital images
Array
Example
getDigitalImages(object) // gets digital images using defaults
# static getDimensionsDescriptions(submittedResource, options) → {Array}
Gets descriptive statement(s) about the physical extent of an object if available.
Parameters:
Name | Type | Description |
---|---|---|
submittedResource |
Object
|
JSON-LD object |
options |
Object
|
additional options |
requestedClassifications |
String
|
Array
|
AAT dimensions description (default: aat.DIMENSIONS_DESCRIPTION) |
language |
String
|
limits the results to just a specific language (or leave undefined for all results) |
languageOptions |
Object
|
any additional options when working with language(s) @see LanguageHelpers.doesObjectLanguageMatch |
content of AAT dimensions descriptions
Array
Examples
getDimensionsDescriptions(object) // gets dimensions descriptions using defaults
getDimensionsDescriptions(object, {language:'cy'}) // gets dimensions descriptions in Welsh
getDimensionsDescriptions(object, {requestedClassifications: 'http://vocab.getty.edu/aat/300266036'}) // gets dimensions descriptions using a different AAT term
# static getMaterialStatements(submittedResource, options) → {Array}
Gets the material statement(s) associated with an object if available.
Parameters:
Name | Type | Description |
---|---|---|
submittedResource |
Object
|
|
options |
Object
|
additional options |
requestedClassifications |
String
|
Array
|
AAT materials/technique description (default: aat.MATERIALS_DESCRIPTION) |
language |
String
|
limits the results to just a specific language (or leave undefined for all results) |
languageOptions |
Object
|
any additional options when working with language(s) @see LanguageHelpers.doesObjectLanguageMatch |
array of material statement(s)
Array
Examples
getMaterialStatements(object) // gets the material statement(s) using defaults
getMaterialStatements(object, {language:'ca'}) // gets the material statement(s) in Catalan
getMaterialsStatements(object, {requestedClassifications: 'http://vocab.getty.edu/aat/300010358'}) // gets the material statement(s) using a different AAT term
# static getProductionTimespans(object) → {Array}
This gets the timespan object(s) for the production information regardless of whether the production has parts or not.
Parameters:
Name | Type | Description |
---|---|---|
object |
Object
|
a JSON-LD Object |
- an array of LinkedArt timespan objects
Array
Example
gets the timespan
getProductionTimespan({produced_by: { "timespan": {
"id": "https://data.getty.edu/museum/collection/object/c88b3df0-de91-4f5b-a9ef-7b2b9a6d8abb/production/timespan",
"type": "TimeSpan",
"begin_of_the_begin": "1889-01-01T00:00:00",
"end_of_the_end": "1889-12-31T23:59:59"
},
}}}) returns [{"id": "https://data.getty.edu/museum/collection/object/c88b3df0-de91-4f5b-a9ef-7b2b9a6d8abb/production/timespan",
"type": "TimeSpan",
"begin_of_the_begin": "1889-01-01T00:00:00",
"end_of_the_end": "1889-12-31T23:59:59"
}]
# static getRightsAssertions(submittedResource) → {Array}
Gets URLs for rights assertions an object is subject to if available.
Parameters:
Name | Type | Description |
---|---|---|
submittedResource |
Object
|
array of urls of assertions of rights the resource is subject to
Array
Example
getRightsAssertions(object) // gets rights assertions
# static getRightsStatements(submittedResource, options) → {Array}
Gets rights statements associated with an object if available. Returns values from objects classified as "legal concepts" or "rights".
Parameters:
Name | Type | Description |
---|---|---|
submittedResource |
Object
|
|
options |
Object
|
additional options |
requestedClassifications |
String
|
Array
|
AAT legal concepts OR AAT rights (legal concept) (default: [aat.LEGAL_CONCEPTS, aat.RIGHTS]) |
language |
String
|
limits the results to just a specific language (or leave undefined for all results) |
languageOptions |
Object
|
any additional options when working with language(s) @see LanguageHelpers.doesObjectLanguageMatch |
array of rights statements
Array
Examples
getRightsStatements(object) // gets rights statements using defaults
getRightsStatements(object, {language:'ca'}) // gets rights statements in Catalan
getRightsStatements(object, {requestedClassifications: 'http://vocab.getty.edu/aat/300055617'}) // gets rights statements using a different AAT term
# static getWorkTypes(submittedResource, options) → {Array}
Gets the kind(s) of object or work associated with an object if available.
Parameters:
Name | Type | Description |
---|---|---|
submittedResource |
Object
|
|
options |
Object
|
additional options |
requestedClassifications |
String
|
Array
|
AAT object/work type (default: aat.WORK_TYPE) |
language |
String
|
limits the results to just a specific language (or leave undefined for all results) |
languageOptions |
Object
|
any additional options when working with language(s) @see LanguageHelpers.doesObjectLanguageMatch |
array of work types
Array
Examples
getWorkTypes(object) // gets types using defaults
getWorkTypes(object, {language:'mk'}) // gets types in Macedonian
getWorkTypes(object, {requestedClassifications: 'http://vocab.getty.edu/aat/300375701'}) // gets types using a different AAT term