ResourceObject

List of resource types »

ResourceObject["name"]

represents a resource with the specified name.

ResourceObject["uuid"]

represents a resource with the specified UUID.

ResourceObject[loc]

imports a resource from the specified location.

ResourceObject[assoc]

gives a resource with content and metadata specified by the association assoc.

Details and Options

  • Resources can be stored locally, in the cloud, or in a global resource repository.
  • ResourceObject[str] searches first locally, then in a user's cloud account, and then in global resource repositories.
  • In ResourceObject["name"], the name must be published in a public repository or registered using ResourceRegister.
  • ResourceObject[loc] accepts locations of previous resource object deployments including LocalObject and CloudObject.
  • Get[ResourceObject[]] typically retrieves the primary content of the resource.
  • Normal[ResourceObject[]] gives the metadata for a resource, as an association.
  • ResourceObject[]["Properties"] gives a list of available metadata items for a resource.
  • Options and SetOptions can be used with settable properties of ResourceObject.
  • DeleteObject[ResourceObject[]] removes the local cache of a resource object.
  • All resource types share the following standard metadata properties:
  • "Name"name of the resource
    "ResourceType"type of resource (e.g. "Data" or "Function")
    "Description"brief description of the resource
    "Details"detailed explanation of the resource and its use
    "UUID"UUID of the resource
    "RepositoryLocation"location of the original repository for the resource
    "ResourceLocations"locations where the resource can be accessed
    "Version"version specification for the resource
    "Keywords"list of search terms for the resource
    "SeeAlso"list of related resource objects
    "SourceMetadata"information about the origin of the resource's content
  • Possible standard values for "ResourceType" include:
  • "Data"data retrievable with ResourceData
    "Function"function retrievable with ResourceFunction
    "NeuralNet"neural net retrievable with NetModel
  • ResourceSubmit submits a user-created resource for publication in a public repository.
  • For resources in public repositories, "SourceMetadata" consists of an association whose keys are based on a subset of properties from the Dublin Core metadata standard:
  • "Creator"any person, organization, or group that is primarily responsible for the creation of the content
    "Contributor"any person, organization, or group that contributed to the creation of the content but was not primarily responsible for it
    "Coverage"spatial and/or temporal coverage of the data
    "Date"date or dates primarily associated with the data, such as creation, publication, or revision dates
    "Description"general description of the original source
    "Language"language of the original source
    "Publisher"publisher, person, or organization that made the source publicly available
    "Rights"description of or link to license information for the original source
    "Source"hyperlink or other reference to the source of the data as a whole
    "Title"title of the original source
  • Data Resources
  • Typical elements in a retrieved data resource include:
  • "ContentElements"names of elements in the resource
    "DefaultContentElement"name of the default element (as retrieved by ResourceData)
    "ContentSize"size of the default element (as retrieved by ResourceData)
    "ContentElementLocations"storage locations (cloud, local, ...) of elements
  • Typical elements that can be used in constructing a data resource include:
  • "Content"explicit expression representing content of the resource
    "ContentElementFunctions"functions to derive additional elements from content

Examples

open all close all

Basic Examples  (4)

Retrieve a data resource from the data repository:

In[1]:=
Click for copyable input
Out[1]=

Import the content using ResourceData:

In[2]:=
Click for copyable input
Out[2]=

Retrieve a neural network from the neural net repository:

In[1]:=
Click for copyable input
Out[1]=

Get the NetChain with ResourceData:

In[2]:=
Click for copyable input
Out[2]=

Get a function resource from the function repository:

In[1]:=
Click for copyable input
Out[1]=

Get the included function with ResourceFunction:

In[2]:=
Click for copyable input
Out[2]=

Use the function:

In[3]:=
Click for copyable input
Out[3]=
In[4]:=
Click for copyable input
Out[4]=

Define a new custom data resource object:

In[1]:=
Click for copyable input
Out[1]=

Retrieve the data:

In[2]:=
Click for copyable input
Out[2]=

Scope  (5)

Properties & Relations  (2)

Introduced in 2016
(11.0)
|
Updated in 2019
(12.0)