Skip to content
This repository has been archived by the owner on Oct 2, 2019. It is now read-only.

Commit

Permalink
Adapt json-ld conversion (#287)
Browse files Browse the repository at this point in the history
* refactor (json-ld): adapt json-ld conversion

* tests (json ld): adapt test data for Euler letter

* tests (json-ld): adapt test data
  • Loading branch information
tobiasschweizer authored and Benjamin Geer committed Aug 31, 2018
1 parent 3a420f7 commit eed8679
Show file tree
Hide file tree
Showing 9 changed files with 1,449 additions and 151 deletions.
4 changes: 4 additions & 0 deletions src/app/app.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,10 @@ export class AppConfig {
public static OwlRestriction = 'http://www.w3.org/2002/07/owl#Restriction';

public static creationDate = AppConfig.KnoraApiV2WithValueObjectPath + 'creationDate';
public static lastModificationDate = AppConfig.KnoraApiV2WithValueObjectPath + 'lastModificationDate';
public static hasPermissions = AppConfig.KnoraApiV2WithValueObjectPath + 'hasPermissions';
public static attachedToProject = AppConfig.KnoraApiV2WithValueObjectPath + 'attachedToProject';
public static attachedToUser = AppConfig.KnoraApiV2WithValueObjectPath + 'attachedToUser';

public static Region = AppConfig.KnoraApiV2WithValueObjectPath + 'Region';

Expand Down Expand Up @@ -208,6 +211,7 @@ export class AppConfig {
public static xsdInteger = AppConfig.Xsd + 'integer';
public static xsdDecimal = AppConfig.Xsd + 'decimal';
public static xsdUri = AppConfig.Xsd + 'anyURI';
public static dateTimeStamp = AppConfig.Xsd + 'dateTimeStamp';

public static resourceSimple = AppConfig.KnoraApiV2SimplePath + 'Resource';
public static dateSimple = AppConfig.KnoraApiV2SimplePath + 'Date';
Expand Down
41 changes: 40 additions & 1 deletion src/app/model/test-data/resources/BookWithIncomingPages.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,33 +4,72 @@
"incunabula:title" : [ {
"@id" : "http://rdfh.ch/8be1b7cf7103/values/463b6498b70d",
"@type" : "knora-api:TextValue",
"knora-api:attachedToUser" : {
"@id" : "http://rdfh.ch/users/91e19f1e01"
},
"knora-api:hasPermissions" : "CR knora-base:Creator|M knora-base:ProjectMember|V knora-base:KnownUser,knora-base:UnknownUser",
"knora-api:valueAsString" : "[Das] Narrenschiff (lat.)"
}, {
"@id" : "http://rdfh.ch/8be1b7cf7103/values/0965b7d1b70d",
"@type" : "knora-api:TextValue",
"knora-api:attachedToUser" : {
"@id" : "http://rdfh.ch/users/91e19f1e01"
},
"knora-api:hasPermissions" : "CR knora-base:Creator|M knora-base:ProjectMember|V knora-base:KnownUser,knora-base:UnknownUser",
"knora-api:valueAsString" : "Stultifera navis (...)"
} ],
"knora-api:attachedToProject" : {
"@id" : "http://rdfh.ch/projects/0803"
},
"knora-api:attachedToUser" : {
"@id" : "http://rdfh.ch/users/91e19f1e01"
},
"knora-api:creationDate" : {
"@type" : "xsd:dateTimeStamp",
"@value" : "2016-03-02T15:05:43Z"
},
"knora-api:hasIncomingLink" : {
"@id" : "http://rdfh.ch/50e7460a7203/values/8bdc04c8-b765-44c8-adb3-5ab536dcd051",
"@type" : "knora-api:LinkValue",
"knora-api:attachedToUser" : {
"@id" : "http://rdfh.ch/users/91e19f1e01"
},
"knora-api:hasPermissions" : "CR knora-base:Creator|V knora-base:UnknownUser,knora-base:KnownUser,knora-base:ProjectMember",
"knora-api:linkValueHasSource" : {
"@id" : "http://rdfh.ch/50e7460a7203",
"@type" : "incunabula:page",
"incunabula:partOfValue" : {
"@id" : "http://rdfh.ch/50e7460a7203/values/8bdc04c8-b765-44c8-adb3-5ab536dcd051",
"@type" : "knora-api:LinkValue",
"knora-api:attachedToUser" : {
"@id" : "http://rdfh.ch/users/91e19f1e01"
},
"knora-api:hasPermissions" : "CR knora-base:Creator|V knora-base:UnknownUser,knora-base:KnownUser,knora-base:ProjectMember",
"knora-api:linkValueHasTargetIri" : {
"@id" : "http://rdfh.ch/8be1b7cf7103"
}
},
"knora-api:attachedToProject" : {
"@id" : "http://rdfh.ch/projects/0803"
},
"knora-api:attachedToUser" : {
"@id" : "http://rdfh.ch/users/91e19f1e01"
},
"knora-api:creationDate" : {
"@type" : "xsd:dateTimeStamp",
"@value" : "2016-03-02T15:05:43Z"
},
"knora-api:hasPermissions" : "CR knora-base:Creator|M knora-base:ProjectMember|V knora-base:KnownUser|RV knora-base:UnknownUser",
"rdfs:label" : "vorderer Spiegel"
}
},
"knora-api:hasPermissions" : "CR knora-base:Creator|M knora-base:ProjectMember|V knora-base:KnownUser|RV knora-base:UnknownUser",
"rdfs:label" : "[Das] Narrenschiff (lat.)",
"@context" : {
"rdf" : "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
"knora-api" : "http://api.knora.org/ontology/knora-api/v2#",
"rdfs" : "http://www.w3.org/2000/01/rdf-schema#",
"incunabula" : "http://0.0.0.0:3333/ontology/0803/incunabula/v2#"
"incunabula" : "http://0.0.0.0:3333/ontology/0803/incunabula/v2#",
"xsd" : "http://www.w3.org/2001/XMLSchema#"
}
}
27 changes: 25 additions & 2 deletions src/app/model/test-data/resources/BookWithIncomingPages2.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,48 @@
"incunabula:title" : [ {
"@id" : "http://rdfh.ch/8be1b7cf7103/values/463b6498b70d",
"@type" : "knora-api:TextValue",
"knora-api:attachedToUser" : {
"@id" : "http://rdfh.ch/users/91e19f1e01"
},
"knora-api:hasPermissions" : "CR knora-base:Creator|M knora-base:ProjectMember|V knora-base:KnownUser,knora-base:UnknownUser",
"knora-api:valueAsString" : "[Das] Narrenschiff (lat.)"
}, {
"@id" : "http://rdfh.ch/8be1b7cf7103/values/0965b7d1b70d",
"@type" : "knora-api:TextValue",
"knora-api:attachedToUser" : {
"@id" : "http://rdfh.ch/users/91e19f1e01"
},
"knora-api:hasPermissions" : "CR knora-base:Creator|M knora-base:ProjectMember|V knora-base:KnownUser,knora-base:UnknownUser",
"knora-api:valueAsString" : "Stultifera navis (...)"
} ],
"knora-api:attachedToProject" : {
"@id" : "http://rdfh.ch/projects/0803"
},
"knora-api:attachedToUser" : {
"@id" : "http://rdfh.ch/users/91e19f1e01"
},
"knora-api:creationDate" : {
"@type" : "xsd:dateTimeStamp",
"@value" : "2016-03-02T15:05:43Z"
},
"knora-api:hasIncomingLink" : {
"@id" : "http://rdfh.ch/50e7460a7203/values/8bdc04c8-b765-44c8-adb3-5ab536dcd051",
"@type" : "knora-api:LinkValue",
"knora-api:attachedToUser" : {
"@id" : "http://rdfh.ch/users/91e19f1e01"
},
"knora-api:hasPermissions" : "CR knora-base:Creator|V knora-base:UnknownUser,knora-base:KnownUser,knora-base:ProjectMember",
"knora-api:linkValueHasSourceIri" : {
"@id" : "http://rdfh.ch/50e7460a7203"
}
},
"knora-api:hasPermissions" : "CR knora-base:Creator|M knora-base:ProjectMember|V knora-base:KnownUser|RV knora-base:UnknownUser",
"rdfs:label" : "[Das] Narrenschiff (lat.)",
"@context" : {
"rdf" : "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
"knora-api" : "http://api.knora.org/ontology/knora-api/v2#",
"schema" : "http://schema.org/",
"rdfs" : "http://www.w3.org/2000/01/rdf-schema#",
"incunabula" : "http://0.0.0.0:3333/ontology/0803/incunabula/v2#"
"incunabula" : "http://0.0.0.0:3333/ontology/0803/incunabula/v2#",
"xsd" : "http://www.w3.org/2001/XMLSchema#"
}
}
Loading

0 comments on commit eed8679

Please sign in to comment.