Skip to content

Commit

Permalink
bugfix: workaround for test server
Browse files Browse the repository at this point in the history
  • Loading branch information
Vijeinath committed Apr 23, 2024
1 parent 2f1f85a commit 9323ead
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/app/app-init.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ export class AppInitService {

this._knoraService.knoraApiConnection = AppInitService.settings.apiURL;

this._knoraService.appLogin(AppInitService.settings.email, AppInitService.settings.pwd)
this._knoraService.appLogin('app@wordweb.ch', '2bon2btitq')
.pipe(
mergeMap(() => this._knoraService.getAllLists(AppInitService.settings.projectIRI)),
mergeMap(() => this._knoraService.getAllLists('http://rdfh.ch/projects/qhOve-cKTmSkiIU81W0lDQ')),
mergeMap((lists: ListNodeInfo[]) => forkJoin<Observable<List>>(lists.map((list: ListNodeInfo) => this._knoraService.getList(list.id))))
)
.subscribe((fullList: List[]) => {
Expand Down
15 changes: 8 additions & 7 deletions src/app/services/knora.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,7 @@ export interface ResourceData {
providedIn: 'root'
})
export class KnoraService {
static readonly PROJECT_IRI = 'http://rdfh.ch/projects/qhOve-cKTmSkiIU81W0lDQ';
public _knoraApiConnection: KnoraApiConnection;
wwOntology: string;
loggedin: boolean;
Expand Down Expand Up @@ -661,7 +662,7 @@ export class KnoraService {
// EDITING BY LUKAS //----------------------------------------------------------------------------------------------

getAllLists2(): Observable<Array<ListData>> {
return this._knoraApiConnection.admin.listsEndpoint.getListsInProject(AppInitService.settings.projectIRI).pipe(
return this._knoraApiConnection.admin.listsEndpoint.getListsInProject(KnoraService.PROJECT_IRI).pipe(
map((res: ApiResponseData<ListsResponse>) => {
const result: Array<ListData> = [];
for (const list of res.body.lists) {
Expand Down Expand Up @@ -893,7 +894,7 @@ export class KnoraService {
const createResource = new CreateResource();
createResource.label = data.label;
createResource.type = this.wwOntology + 'company';
createResource.attachedToProject = 'http://rdfh.ch/projects/0826';
createResource.attachedToProject = KnoraService.PROJECT_IRI;

const props = {};

Expand Down Expand Up @@ -962,7 +963,7 @@ export class KnoraService {
const createResource = new CreateResource();
createResource.label = data.label;
createResource.type = this.wwOntology + 'person';
createResource.attachedToProject = 'http://rdfh.ch/projects/0826';
createResource.attachedToProject = KnoraService.PROJECT_IRI;

const props = {};
createResource.properties = props;
Expand Down Expand Up @@ -1168,7 +1169,7 @@ export class KnoraService {
const createResource = new CreateResource();
createResource.label = data.label;
createResource.type = this.wwOntology + 'lexia';
createResource.attachedToProject = 'http://rdfh.ch/projects/0826';
createResource.attachedToProject = KnoraService.PROJECT_IRI;

const props = {};

Expand Down Expand Up @@ -1244,7 +1245,7 @@ export class KnoraService {
const createResource = new CreateResource();
createResource.label = data.label;
createResource.type = this.wwOntology + 'passage';
createResource.attachedToProject = 'http://rdfh.ch/projects/0826';
createResource.attachedToProject = KnoraService.PROJECT_IRI;

const props = {};

Expand Down Expand Up @@ -1431,7 +1432,7 @@ export class KnoraService {
const createResource = new CreateResource();
createResource.label = data.label;
createResource.type = this.wwOntology + 'book';
createResource.attachedToProject = 'http://rdfh.ch/projects/0826';
createResource.attachedToProject = KnoraService.PROJECT_IRI;

const props = {};

Expand Down Expand Up @@ -1753,7 +1754,7 @@ export class KnoraService {
const createResource = new CreateResource();
createResource.label = data.label;
createResource.type = this.wwOntology + 'venue';
createResource.attachedToProject = 'http://rdfh.ch/projects/0826';
createResource.attachedToProject = KnoraService.PROJECT_IRI;

const props = {};

Expand Down

0 comments on commit 9323ead

Please sign in to comment.