@hydra-cg/heracles.ts > TemplatedLink
Provides a default implementation of the ITemplatedLink interface.
class:
↳ TemplatedLink
⊕ 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
● 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: 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: 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: 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: string
Implementation of ITemplatedLink.relation
Defined in DataModel/TemplatedLink.ts:21
Gets a relation of the link.
readonly:
returns:
● supportedOperations: OperationsCollection
Implementation of ITemplatedLink.supportedOperations
Defined in DataModel/TemplatedLink.ts:24
Gets a link’s supported operations.
readonly:
returns:
● 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: 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
<Protected> createInstance▸ createInstance(resource: IPointingResource): ILink
Overrides TemplatedResource.createInstance
Defined in DataModel/TemplatedLink.ts:44
Parameters:
| Name | Type |
|---|---|
| resource | IPointingResource |
Returns: ILink
▸ 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