Heracles.ts

@hydra-cg/heracles.ts > TemplatedLink

Class: TemplatedLink

Provides a default implementation of the ITemplatedLink interface.

class:

Hierarchy

TemplatedResource<ILink>

↳ TemplatedLink

Implements

Index

Constructors

Properties

Methods


Constructors

constructor

new TemplatedLink(linkResource: ILink, template: IIriTemplate): TemplatedLink

Overrides TemplatedResource.constructor

Defined in DataModel/TemplatedLink.ts:24

Initializes a new instance of the TemplatedLink class.

Parameters:

Name Type Description
linkResource ILink Original link to create templated one from.
template IIriTemplate IRI template to take template from.

Returns: TemplatedLink


Properties

baseUrl

● baseUrl: string

Implementation of ITemplatedLink.baseUrl

Inherited from TemplatedResource.baseUrl

Defined in DataModel/TemplatedResource.ts:22

Gets a base URL that can be used to resolve target in case it is relative.

readonly:

returns:


collections

● collections: ResourceFilterableCollection<ICollection>

Implementation of ITemplatedLink.collections

Inherited from TemplatedResource.collections

Defined in DataModel/TemplatedResource.ts:40

Gets collections exposed by that resource.

readonly:

returns:


iri

● iri: string

Implementation of ITemplatedLink.iri

Inherited from TemplatedResource.iri

Defined in DataModel/TemplatedResource.ts:25

Gets an Iri of a resource.

readonly:

returns:


● links: LinksCollection

Implementation of ITemplatedLink.links

Inherited from TemplatedResource.links

Defined in DataModel/TemplatedResource.ts:37

Gets links related to that resource.

readonly:

returns:


operations

● operations: OperationsCollection

Implementation of ITemplatedLink.operations

Inherited from TemplatedResource.operations

Defined in DataModel/TemplatedResource.ts:34

Gets operations that can be performed on that resource.

readonly:

returns:


relation

● relation: string

Implementation of ITemplatedLink.relation

Defined in DataModel/TemplatedLink.ts:21

Gets a relation of the link.

readonly:

returns:


supportedOperations

● supportedOperations: OperationsCollection

Implementation of ITemplatedLink.supportedOperations

Defined in DataModel/TemplatedLink.ts:24

Gets a link’s supported operations.

readonly:

returns:


target

● target: IResource

Implementation of ITemplatedLink.target

Inherited from TemplatedResource.target

Defined in DataModel/TemplatedResource.ts:31

Gets a target URL to be called.

readonly:

returns:


type

● type: TypesCollection

Implementation of ITemplatedLink.type

Inherited from TemplatedResource.type

Defined in DataModel/TemplatedResource.ts:28

Gets classes a given resource is of.

readonly:

returns:


<Static><Private> id

● id: number = 0

Defined in DataModel/TemplatedLink.ts:18


Methods

<Protected> createInstance

createInstance(resource: IPointingResource): ILink

Overrides TemplatedResource.createInstance

Defined in DataModel/TemplatedLink.ts:44

Parameters:

Name Type
resource IPointingResource

Returns: ILink


expandTarget

expandTarget(mappedVariables: IDictionary<string> | MappingBuilder): ILink

Implementation of ITemplatedLink.expandTarget

Inherited from TemplatedResource.expandTarget

Defined in DataModel/TemplatedResource.ts:64

Expands an URI template with given variables.

Parameters:

Name Type
mappedVariables IDictionary<string> | MappingBuilder

Returns: ILink


<Protected> getNextIri

getNextIri(): string

Overrides TemplatedResource.getNextIri

Defined in DataModel/TemplatedLink.ts:57

Returns: string