Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F75570517
constants.ts
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sat, Aug 3, 01:00
Size
5 KB
Mime Type
text/x-java
Expires
Mon, Aug 5, 01:00 (2 d)
Engine
blob
Format
Raw Data
Handle
19569482
Attached To
rNIETZSCHEBETAAPP Nietzsche-Beta-App
constants.ts
View Options
import {NavTreeDef} from './navigation-list-component/models';
export const CONTENT_VIEW_ROUTE: string = 'contentView';
export const DOCUMENTATION_ROUTE: string = 'doku';
export const HOME_ROUTE: string = 'home';
export const IMPRESSUM_ROUTE: string = 'impressum';
export const PROJECT_ROUTE: string = 'project';
export const NAVTREE_DEFS: NavTreeDef[] = [
{ id: 'manuscript',
idx: 0,
isActive: true,
label: 'Manuskripte',
itemQParam: 'manuscript',
entries: [],
apiDef: {
type: 0, // rdf
dataArray: 'results.bindings',
query: 'manuscripts.rq',
mapping: { // maps the properties of the reponse to tha NavTabDef properties, which are displayed
id: 'manuscript.value', // Short id, iri in most cases
iri: 'manuscript.value', // iri
type: 'type.value',
label: 'title.value',
description: 'gsaSignature.value',
avatar: 'thumbImage.value'
}
}
}, {
id: 'page',
idx: 1,
isActive: false,
label: 'Seiten',
itemQParam: 'page',
entries: [],
apiDef: {
type: 0, // rdf
dataArray: 'results.bindings',
query: 'getPageData.rq',
mapping: {
id: 'page.value', // Short id, iri in most cases
iri: 'page.value', // iri
label: 'pageNumber.value',
thumb: 'thumb.value',
idx: 'pageNumber.value',
svg: 'svgUrl.value',
}
}
}
];
// Queries
export const RQ_CROSSREF_TREE_MANUSCRIPTS: string = `
PREFIX data: <http://rdfh.ch/projects/0068#>
PREFIX tln: <http://www.nie.org/ontology/nietzsche#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
SELECT ?manuscript ?title ?thumbImage ?gsaSignature WHERE {
?manuscript a tln:ManuscriptUnity;
tln:hasTitle ?title;
tln:hasManuscriptType "Mappe";
tln:hasPages/rdf:first/tln:hasFaksimileImage/tln:hasThumburl ?thumbImage ;
tln:hasGsaSignature ?gsaSignature .
}`;
export const RQ_CROSSREF_TREE_PAGES = `
PREFIX tln: <http://www.nie.org/ontology/nietzsche#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
SELECT DISTINCT ?page ?pageNumber ?type WHERE {
?s (tln:hasPages/(rdf:rest*)/rdf:first) ?page.
?page tln:hasNumber ?pageNumber.
?page a tln:Page.
BIND (tln:page AS ?type)
BIND (xsd:integer(REPLACE(?pageNumber, "\\\\D+", "")) AS ?sorting)
}
ORDER BY (?sorting)
`;
export const RQ_CROSSREF_TREE_LINES = `
PREFIX tln: <http://www.nie.org/ontology/nietzsche#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
SELECT DISTINCT ?line ?lNumber ?type WHERE {
?s (tln:hasLines/(rdf:rest*)/rdf:first) ?line.
?line a tln:Line.
BIND (tln:line AS ?type)
OPTIONAL {
?line tln:lineHasNumber ?lNumber.
}
}
ORDER BY (?lNumber)
`;
export const RQ_CROSSREF_TREE_WORDS = `
PREFIX tln: <http://www.nie.org/ontology/nietzsche#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX homotypic: <http://www.nie.org/ontology/homotypic#>
SELECT DISTINCT ?word ?line ?text ?type WHERE {
?word tln:wordBelongsToLine ?line.
?word a tln:SimpleWord.
BIND(tln:SimpleWord AS ?type)
OPTIONAL {
?word homotypic:hasText ?text.
}
}
ORDER BY (?word)
`;
// GENERIC TREES
// Queries
export const RQ_GENERIC_TREE_ROOT: string = `
PREFIX data: <http://rdfh.ch/projects/0068#>
PREFIX tln: <http://www.nie.org/ontology/nietzsche#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
SELECT DISTINCT ?manuscript ?title ?type ?gsaSignature WHERE {
?manuscript a tln:ManuscriptUnity;
tln:hasTitle ?title;
tln:hasManuscriptType "Mappe";
tln:hasGsaSignature ?gsaSignature .
OPTIONAL {
tln:ManuscriptUnity a ?type
}
}`;
export const RQ_GENERIC_RDF_PROPERTY_TREE: string = `
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT DISTINCT ?p ?type ?label ?comment WHERE {
?s ?p ?o.
OPTIONAL {
?p rdfs:label ?label.
?p rdfs:comment ?comment.
?p a ?sth.
}
}
ORDER BY (?label)
LIMIT 10
`;
export const RQ_GENERIC_OBJECT_TREE: string = `
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT DISTINCT ?o ?type ?label ?comment WHERE {
?s ?p ?o.
OPTIONAL {
?o rdfs:label ?label.
?o rdfs:comment ?comment.
?o a ?sth.
}
}
ORDER BY (?label)
LIMIT 10
`;
export const GENERIC_ROOT_TREE_DEF: NavTreeDef[] = [
{ id: 'root',
idx: 0,
isActive: true,
label: 'Manuskript ',
itemQParam: 'manuscript',
entries: [],
apiDef: {
type: 0, // rdf
dataArray: 'results.bindings',
query: RQ_GENERIC_TREE_ROOT,
mapping: { // maps the properties of the reponse to tha NavTabDef properties, which are displayed
id: 'manuscript.value', // Short id, iri in most cases
iri: 'manuscript.value', // iri
type: 'type.value',
label: 'title.value',
description: 'gsaSignature.value'
}
}
},
{ id: 'property',
idx: 1,
isActive: true,
label: 'Property ',
itemQParam: '',
entries: [],
apiDef: {
type: 0, // rdf
dataArray: 'results.bindings',
query: RQ_GENERIC_RDF_PROPERTY_TREE,
mapping: { // maps the properties of the reponse to tha NavTabDef properties, which are displayed
id: 'p.value', // Short id, iri in most cases
iri: 'p.value', // iri
type: 'type.value',
label: 'label.value',
description: 'comment.value'
}
}
},
{ id: 'object',
idx: 1,
isActive: true,
label: 'Object ',
itemQParam: '',
entries: [],
apiDef: {
type: 0, // rdf
dataArray: 'results.bindings',
query: RQ_GENERIC_OBJECT_TREE,
mapping: { // maps the properties of the reponse to tha NavTabDef properties, which are displayed
id: 'o.value', // Short id, iri in most cases
iri: 'o.value', // iri
type: 'type.value',
label: 'label.value',
description: 'comment.value'
}
}
}
];
Event Timeline
Log In to Comment