Class StacLink
A STAC link
Namespace: Stac
Assembly: DotNetStac.dll
Syntax
public class StacLink : ICloneable
Constructors
| Improve this Doc View SourceStacLink()
Initializes a new instance of the StacLink class.
Declaration
public StacLink()
StacLink(StacLink)
Initializes a new instance of the StacLink class.
Declaration
public StacLink(StacLink source)
Parameters
Type | Name | Description |
---|---|---|
StacLink | source | Source StacLink to clone |
StacLink(Uri)
Initializes a new instance of the StacLink class.
Declaration
public StacLink(Uri uri)
Parameters
Type | Name | Description |
---|---|---|
Uri | uri | Uri of the link |
StacLink(Uri, String, String, String, UInt64)
Initializes a new instance of the StacLink class.
Declaration
public StacLink(Uri uri, string relationshipType, string title, string mediaType, ulong contentLength = null)
Parameters
Type | Name | Description |
---|---|---|
Uri | uri | Uri of the link |
System.String | relationshipType | Relationship type of the link |
System.String | title | Title of the link |
System.String | mediaType | Media type of the link |
System.UInt64 | contentLength | Content length of the link |
Properties
| Improve this Doc View SourceAdditionalProperties
Gets or sets the additional properties of the link.
Declaration
public IDictionary<string, object> AdditionalProperties { get; set; }
Property Value
Type | Description |
---|---|
IDictionary<System.String, System.Object> |
ContentType
Gets or sets the Content-Type of the link.
Declaration
public virtual ContentType ContentType { get; set; }
Property Value
Type | Description |
---|---|
ContentType |
Length
Gets or sets the length of the link.
Declaration
public ulong Length { get; set; }
Property Value
Type | Description |
---|---|
System.UInt64 |
Parent
Gets or sets the parent of the link. This is used to resolve relative links.
Declaration
public IStacObject Parent { get; set; }
Property Value
Type | Description |
---|---|
IStacObject |
RelationshipType
Gets or sets the relationship type of the link.
Declaration
public virtual string RelationshipType { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Title
Gets or sets the title of the link.
Declaration
public virtual string Title { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Type
Gets or sets the Content Type of the link using a string.
Declaration
public string Type { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Uri
Gets or sets the URI of the link.
Declaration
public virtual Uri Uri { get; set; }
Property Value
Type | Description |
---|---|
Uri |
Methods
| Improve this Doc View SourceClone()
Declaration
public object Clone()
Returns
Type | Description |
---|---|
System.Object |
CreateAlternateLink(Uri, String, String)
Create an alternate link.
Declaration
public static StacLink CreateAlternateLink(Uri uri, string mediaType = null, string title = null)
Parameters
Type | Name | Description |
---|---|---|
Uri | uri | Uri of the link |
System.String | mediaType | Media type of the link |
System.String | title | Title of the link |
Returns
Type | Description |
---|---|
StacLink | StacLink |
CreateChildLink(Uri, String, String)
Create a child link.
Declaration
public static StacLink CreateChildLink(Uri uri, string mediaType = null, string title = null)
Parameters
Type | Name | Description |
---|---|---|
Uri | uri | Uri of the link |
System.String | mediaType | Media type of the link |
System.String | title | Title of the link |
Returns
Type | Description |
---|---|
StacLink | StacLink |
CreateCollectionLink(Uri, String, String)
Create a collection link.
Declaration
public static StacLink CreateCollectionLink(Uri uri, string mediaType = null, string title = null)
Parameters
Type | Name | Description |
---|---|---|
Uri | uri | Uri of the link |
System.String | mediaType | Media type of the link |
System.String | title | Title of the link |
Returns
Type | Description |
---|---|
StacLink | StacLink |
CreateDerivedFromLink(Uri, String, String)
Create a derived_from link.
Declaration
public static StacLink CreateDerivedFromLink(Uri uri, string mediaType = null, string title = null)
Parameters
Type | Name | Description |
---|---|---|
Uri | uri | Uri of the link |
System.String | mediaType | Media type of the link |
System.String | title | Title of the link |
Returns
Type | Description |
---|---|
StacLink | StacLink |
CreateItemLink(Uri, String, String)
Create an item link.
Declaration
public static StacLink CreateItemLink(Uri uri, string mediaType = null, string title = null)
Parameters
Type | Name | Description |
---|---|---|
Uri | uri | Uri of the link |
System.String | mediaType | Media type of the link |
System.String | title | Title of the link |
Returns
Type | Description |
---|---|
StacLink | StacLink |
CreateObjectLink(IStacObject, Uri)
Create a link from a StacObject.
Declaration
public static StacLink CreateObjectLink(IStacObject stacObject, Uri uri)
Parameters
Type | Name | Description |
---|---|---|
IStacObject | stacObject | StacObject to create a link from |
Uri | uri | Uri of the link |
Returns
Type | Description |
---|---|
StacLink | StacLink |
CreateParentLink(Uri, String, String)
Create a parent link.
Declaration
public static StacLink CreateParentLink(Uri uri, string mediaType = null, string title = null)
Parameters
Type | Name | Description |
---|---|---|
Uri | uri | Uri of the link |
System.String | mediaType | Media type of the link |
System.String | title | Title of the link |
Returns
Type | Description |
---|---|
StacLink | StacLink |
CreateRootLink(Uri, String, String)
Create a root link.
Declaration
public static StacLink CreateRootLink(Uri uri, string mediaType = null, string title = null)
Parameters
Type | Name | Description |
---|---|---|
Uri | uri | Uri of the link |
System.String | mediaType | Media type of the link |
System.String | title | Title of the link |
Returns
Type | Description |
---|---|
StacLink | StacLink |
CreateSelfLink(Uri, String, String)
Create a self link.
Declaration
public static StacLink CreateSelfLink(Uri uri, string mediaType = null, string title = null)
Parameters
Type | Name | Description |
---|---|---|
Uri | uri | Uri of the link |
System.String | mediaType | Media type of the link |
System.String | title | Title of the link |
Returns
Type | Description |
---|---|
StacLink | StacLink |