Page MenuHomec4science

earlier_version.ts
No OneTemporary

File Metadata

Created
Mon, Sep 9, 01:59

earlier_version.ts

import { BasicResultBindingElement } from './basic_datatype';
/**
* This is the 'earlier version' stub instantiation of an element of {@link /interfaces/FusekiResults.html|FusekiResults}.
* It extends {@link /classes/BasicResultBindingElement.html|BasicResultBindingElement}.
**/
export class TlnEarlierVersionStub extends BasicResultBindingElement {
/**
* the internal default key for replacing {@link /classes/TlnWord.html#query|query} by "id"
* in {@link /classes/TlnWord.html#getQuery|getQuery} if "key" is omitted.
**/
static readonly default_key: string = 'word';
/**
* the public key for replacing {@link /classes/TlnWord.html#query|query} by "id".
**/
static readonly query_key: string = 'word';
/**
* the SPARQL-query of this datatype.
**/
static readonly query: string = `
PREFIX tln: <http://www.nie.org/ontology/nietzsche#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
SELECT ?id ?text WHERE {
?word tln:wordHasEarlierVersion ?id.
?id tln:hasText ?text.
}`;
/**
* text of earlier version
**/
text: string;
/**
* The constructor creates a datatype from the data.
*
* @param id if omitted the id will be retrieved from data
**/
constructor(data: any, id?: string, service?: any){
super(data, id, service)
this.text = this.getData4Key('text');
}
}
export class TlnOverwrittenStub extends TlnEarlierVersionStub {
/**
* the SPARQL-query of this datatype.
**/
static readonly query: string = `
PREFIX tln: <http://www.nie.org/ontology/nietzsche#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
SELECT ?id ?text WHERE {
?word (tln:wordHasWordParts/rdf:rest*/rdf:first/tln:overwritesWord|tln:overwritesWord) ?id.
?id tln:hasText ?text.
}`;
}

Event Timeline