Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F99283110
models.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
Thu, Jan 23, 01:45
Size
3 KB
Mime Type
text/x-java
Expires
Sat, Jan 25, 01:45 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
23766257
Attached To
rNIETZSCHEBETAAPP Nietzsche-Beta-App
models.ts
View Options
import {SafeUrl} from '@angular/platform-browser';
export class TlnEntity {
id: string; // Short id, iri in most cases
iri: string; // iri
type: string; // rdfs:type
contextView: string;
label?: string;
description?: string;
constructor(id: string, iri: string, type: string, contextView: string, label?: string, description?: string) {
this.id = id;
this.iri = iri;
this.type = type;
this.contextView = contextView;
this.label = label;
this.description = description;
}
}
// The navigation entries in each tree for each viewtab (TlnManuscript, TlnPage, PositionalEntity) used by navigation
//
export class NavigationEntity {
idx: number;
tlnEntity: TlnEntity;
thumb?: SafeUrl; // url of image (Thumbnail)
img?: SafeUrl; // full image url
svg?: SafeUrl; // svg url
avatar?: SafeUrl; // img for avatar
parentLabel?: string;
constructor(idx: number, tlnEntity: TlnEntity, thumb?: string, img?, svg?: SafeUrl, avatar?: SafeUrl, parentLabel?: string) {
this.idx = idx;
this.tlnEntity = tlnEntity;
this.thumb = thumb;
this.img = img;
this.svg = svg;
this.avatar = avatar;
this.parentLabel = parentLabel;
}
}
export interface NavTreeDef {
id: string; // name of the tree
idx: number; // order
label: string;
itemQParam: string;
entries: NavigationEntity[];
description?: string;
apiDef?: ApiDef;
isActive?: boolean;
}
export class ApiDef {
type: number; // 0 === sparql 1.1., 1 === nietzscheSource API, 2 === existDB
dataArray: string;
query?: string;
mapping?: TlnEntityMapping; // positive Filter ids: only these id's should be loaded into manuscript nav tree
paramTriple?: number; // Select which triple of the where clause will be parametrized: 1 === property, 2 === object; default === subject
constructor( type: number, dataArray: string, query?: string, mapping?: TlnEntityMapping, paramTriple?) {
this.type = type;
this.dataArray = dataArray;
this.query = query;
this.mapping = mapping;
this.paramTriple = paramTriple;
}
}
export class TlnEntityMapping { // Is used for mapping the response from any given apiDef/response to a TlnEntity Instance
id: string; // Short id, iri in most cases
iri?: string; // iri
idx?: string;
type?: string; // rdfs:type
label?: string;
description?: string;
avatar?: string;
svg?: string;
thumb?: string;
constructor(id: string,
iri?: string,
idx?: string,
type?: string,
label?: string,
description?: string,
avatar?: string,
svg?: string,
thumb?: string) {
this.id = id;
this.iri = iri;
this.idx = idx;
this.type = type;
this.label = label;
this.description = description;
this.avatar = avatar;
this.svg = svg;
this.thumb = thumb;
}
}
Event Timeline
Log In to Comment