Class StacAsset
STAC Asset Object implementing STAC Asset.
Implements
Namespace: Stac
Assembly: DotNetStac.dll
Syntax
public class StacAsset : object, IStacPropertiesContainer
Constructors
| Improve this Doc View SourceStacAsset(IStacObject, Uri)
Initializes a new instance of the StacAsset class.
Declaration
public StacAsset(IStacObject stacObject, Uri uri)
Parameters
Type | Name | Description |
---|---|---|
IStacObject | stacObject | parent stac object |
Uri | uri | uri to the asset |
StacAsset(IStacObject, Uri, IEnumerable<String>, String, ContentType)
Initializes a new instance of the StacAsset class. Initialize a new asset
Declaration
public StacAsset(IStacObject stacObject, Uri uri, IEnumerable<string> roles, string title, ContentType mediaType)
Parameters
Type | Name | Description |
---|---|---|
IStacObject | stacObject | parent stac object |
Uri | uri | uri to the asset |
IEnumerable<System.String> | roles | roles of the asset |
System.String | title | title of the asset |
ContentType | mediaType | media-type of the asset |
StacAsset(StacAsset, IStacObject)
Initializes a new instance of the StacAsset class. Initialize a new asset from an existing one
Declaration
public StacAsset(StacAsset source, IStacObject stacObject)
Parameters
Type | Name | Description |
---|---|---|
StacAsset | source | asset source to be copied |
IStacObject | stacObject | new parent stac object |
Properties
| Improve this Doc View SourceDescription
Gets or sets a description of the Asset providing additional details, such as how it was processed or created.
Declaration
public string Description { get; set; }
Property Value
Type | Description |
---|---|
System.String | A description of the Asset providing additional details, such as how it was processed or created. |
MediaType
Gets or sets media type of the asset
Declaration
public ContentType MediaType { get; set; }
Property Value
Type | Description |
---|---|
ContentType | Media type of the asset |
ParentStacObject
Gets parent stac object
Declaration
public IStacObject ParentStacObject { get; }
Property Value
Type | Description |
---|---|
IStacObject | Parent stac object |
Properties
Gets or sets extended properties
Declaration
public IDictionary<string, object> Properties { get; set; }
Property Value
Type | Description |
---|---|
IDictionary<System.String, System.Object> | Extended properties |
Roles
Gets the semantic roles of the asset
Declaration
public ICollection<string> Roles { get; }
Property Value
Type | Description |
---|---|
ICollection<System.String> | The semantic roles of the asset |
StacObjectContainer
Gets object container
Declaration
public IStacObject StacObjectContainer { get; }
Property Value
Type | Description |
---|---|
IStacObject | Object container |
Title
Gets or sets the displayed title for clients and users.
Declaration
public string Title { get; set; }
Property Value
Type | Description |
---|---|
System.String | The displayed title for clients and users. |
Uri
Gets or sets uRI to the asset object. Relative and absolute URI are both allowed.
Declaration
public Uri Uri { get; set; }
Property Value
Type | Description |
---|---|
Uri | URI to the asset object. Relative and absolute URI are both allowed. |
Methods
| Improve this Doc View SourceCreateDataAsset(IStacObject, Uri, ContentType, String)
Create a data asset
Declaration
public static StacAsset CreateDataAsset(IStacObject stacObject, Uri uri, ContentType mediaType, string title = null)
Parameters
Type | Name | Description |
---|---|---|
IStacObject | stacObject | parent stac object |
Uri | uri | Uri to the data |
ContentType | mediaType | media type of the data |
System.String | title | title of the data (if any) |
Returns
Type | Description |
---|---|
StacAsset | A new Asset describing the data |
CreateMetadataAsset(IStacObject, Uri, ContentType, String)
Create a metadata asset
Declaration
public static StacAsset CreateMetadataAsset(IStacObject stacObject, Uri uri, ContentType mediaType, string title = null)
Parameters
Type | Name | Description |
---|---|---|
IStacObject | stacObject | parent stac object |
Uri | uri | Uri to the metadata |
ContentType | mediaType | media type of the metadata |
System.String | title | title of the metadata (if any) |
Returns
Type | Description |
---|---|
StacAsset | A new Asset describing the metadata |
CreateOverviewAsset(IStacObject, Uri, ContentType, String)
Create an overview asset
Declaration
public static StacAsset CreateOverviewAsset(IStacObject stacObject, Uri uri, ContentType mediaType, string title = null)
Parameters
Type | Name | Description |
---|---|---|
IStacObject | stacObject | parent stac object |
Uri | uri | Uri to the overview |
ContentType | mediaType | media type of the overview |
System.String | title | title of the overview (if any) |
Returns
Type | Description |
---|---|
StacAsset | A new Asset describing the overview |
CreateThumbnailAsset(IStacObject, Uri, ContentType, String)
Create a thumbnail asset
Declaration
public static StacAsset CreateThumbnailAsset(IStacObject stacObject, Uri uri, ContentType mediaType, string title = null)
Parameters
Type | Name | Description |
---|---|---|
IStacObject | stacObject | parent stac object |
Uri | uri | Uri to the thumbnail |
ContentType | mediaType | media type of the thumbnail |
System.String | title | title of the thumbnail (if any) |
Returns
Type | Description |
---|---|
StacAsset | A new Asset describing the thumbnail |
ShouldSerializeStacExtensions()
Declaration
public bool ShouldSerializeStacExtensions()
Returns
Type | Description |
---|---|
System.Boolean |