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

Entity Iris are now objects in JSON-LD #245

Merged
merged 3 commits into from
May 11, 2018
Merged

Conversation

tobiasschweizer
Copy link
Contributor

This PR relates to dasch-swiss/dsp-api#833.

  • entity Iris are not strings, but objects (ontology response in JDON-LD)
  • schema:name has been replaced by rdfs:label

Copy link
Contributor

@benjamingeer benjamingeer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please check that you handled all the IRIs that are not objects of @id or @type.

@tobiasschweizer
Copy link
Contributor Author

case AppConfig.ListValue:
 
                 let listValue: ReadListValue = new ReadListValue(
                     propValue['@id'],
                     propIri,
                     propValue[AppConfig.listValueAsListNode],
                     propValue[AppConfig.listValueAsListNodeLabel]
                 );
 
                 valueSpecificProp = listValue;
 
                 break;

It should be propValue[AppConfig.listValueAsListNode]['@id']

Tobias Schweizer added 2 commits May 9, 2018 17:14
# Conflicts:
#	src/app/model/test-data/ontologycache/beol-complex-onto.json
@tobiasschweizer
Copy link
Contributor Author

@benjamingeer Could you try this branch with your PR?

@benjamingeer
Copy link
Contributor

What exactly should I try? Should I run automated tests? If so, how do I run them?

@tobiasschweizer
Copy link
Contributor Author

The automated the tests are run be travis. You can run them locally like this ng t

Could you try ng s and use the GUI with your Knora PR?

@benjamingeer
Copy link
Contributor

"Use the GUI" is a bit vague. I can click on random things, but since I don't know how they're supposed to work, I don't think I can test the GUI manually.

@tobiasschweizer
Copy link
Contributor Author

You can search for a resource in the GUI and see if it is displayed correctly.

There are already some tests for the ontology cache service.

But we should add more. Would you be interested in doing that?

@benjamingeer
Copy link
Contributor

You can search for a resource in the GUI and see if it is displayed correctly.

How will I know if it's displayed correctly?

@benjamingeer
Copy link
Contributor

But we should add more. Would you be interested in doing that?

I think that it's best if the people who wrote the code write the tests for it...

@tobiasschweizer
Copy link
Contributor Author

Open the browser console to check for errors.

What I did was: I created an anything:Thing with Salsah1 and added different values of different types and then searched for that in Salsah2.

@benjamingeer
Copy link
Contributor

Open the browser console to check for errors.

What if there are no errors, but the resource is displayed wrong, but I don't know that, because I don't know how it's supposed to look?

@tobiasschweizer
Copy link
Contributor Author

tobiasschweizer commented May 11, 2018

I think that it's best if the people who wrote the code write the tests for it...

Ideally yes. But I simply have very scarce time resources, still I had to add all this functionality because it was not there yet and we needed it for BEOL (and for all the other projects).

So if could dedicate some time, that would be great. Also because you surely will have good suggestions how to improve it. We can look at it together and then see what is realistic.

@benjamingeer
Copy link
Contributor

I also have very scarce time resources and I'm supposed to finish API v2. But when I write code, I write tests for it. I thought we had all agreed on that as part of our development process in the DHLab.

@tobiasschweizer
Copy link
Contributor Author

I also have very scarce time resources and I'm supposed to finish API v2. But when I write code, I write tests for it. I thought we had all agreed on that as part of our development process in the DHLab.

Sure, I understand. Can I at least explain the design of SALSAH2 to you, so we can figure out what the design documentation should look like?

Also I can show you the tests I have written so fare and you could give me some feedback on that.

@benjamingeer
Copy link
Contributor

I'd be glad to try to understand a bit about how the GUI works and perhaps make some suggestions. But I don't think I can actually work on GUI development and still get API v2 done in a reasonable amount of time, unless Lukas decides that he wants priorities to change.

@tobiasschweizer
Copy link
Contributor Author

I'd be glad to try to understand a bit about how the GUI works and perhaps make some suggestions. But I don't think I can actually work on GUI development and still get API v2 done in a reasonable amount of time, unless Lukas decides that he wants priorities to change.

I think it would be great if I could give you some insight in the service that parsers the ontology JSON-LD responses and the mapping from JSON-LD to internal classes for resources and values. It is quite probably that there will be future changes in Knora that require more changes on the side of SALSAH2.

I will be glad to start a documentation for it and also write more test, but I can only do it step by step.

@tobiasschweizer
Copy link
Contributor Author

I will try to add some more tests to this PR:

@benjamingeer
Copy link
Contributor

benjamingeer commented May 11, 2018

I would really like to merge dasch-swiss/dsp-api#833 today if possible, because it's blocking other things that I need to work on. Could you make a new PR for SALSAH 2 tests instead?

@tobiasschweizer
Copy link
Contributor Author

Could you make a new PR for SALSAH 2 tests instead?

Yes, absolutely.

@tobiasschweizer
Copy link
Contributor Author

but you still have to approve this PR

@tobiasschweizer tobiasschweizer merged commit f6377bd into develop May 11, 2018
@tobiasschweizer tobiasschweizer deleted the wip/schema-support branch May 11, 2018 12:50
@kilchenmann kilchenmann modified the milestones: On Deck, v2.0.0-alpha.14 May 30, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants