-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for editing labels and value comments #261
Conversation
…'s label - TODO: documentation and tests
…ng a label - TODO: reset does not work properly yet. Editing is still active.
This is it, I have to add the named graph to the update query:
I can get the resource's project from the resinfo query and find out the named graph like this |
I wanted to use this in the update query's where clause:
But with the statement |
That's correct. The DELETE and INSERT clauses have to specify the named graph, or you can use WITH, which covers the whole update. You can look at some of the other update queries for examples. |
The second problem is because you're using WITH. The class knora-base:Resource isn't defined in the Incunabula named graph, so your WHERE clause can't see it. Instead of using WITH, specify the named graph using GRAPH in the DELETE and WHERE clauses. |
While you're at it, you could make the same change to changeComment.scala.txt, which doesn't check the resource class and uses WITH. |
- remove resource class check from update query's where clause (because it is in the knora-base named graph)
Actually I have just removed the resource class check from the where clause in the update (the check is included in resinfo and later in the label update check) since it requires two named graphs: the one the resource is in and knora-base. Or could I specify the named graph only in the DELETE and INSERT using GRAPH?
Did you mean INSERT instead of WHERE? If so, I can adapt the label update as well as the comment later today. |
Yes, sorry, I meant INSERT instead of WHERE. Look at how it's done in the other update queries. They all say |
I also checked that resource is not marked as deleted in By the way: If I remember correctly we do not mark values as deleted when you mark the resource as deleted. So we should check the resource's deletion state whenever an update is requested for a value. Right or am I mistaken? |
…Resource - use GRAPH statement in DELETE and INSERT clauses instead of global WITH
You're right. We do check, except in |
This is ready to review, @tobiasschweizer can you have a look? |
with great pleasure, but tomorrow |
- Sort property definitions by guiorder in the API response describing a resource type. - Don't display an add button for knora-base:hasStandoffLinkto. - Try to display the label on a region (not working yet).
We couldn't figure out how to get the label to display on a region. So far we traced the problem to this code at the end of
Here |
We are fixing some comment editing bugs on this branch. The main remaining problem is that when you edit a comment, the GUI doesn't reset the value with the IRI of the new value version. This needs to be fixed in |
Next week, we should adapt the browser tests so they pass. The problem was that we hadn't any sorting of the properties in the GUI so far (GUI order). Now, as long as they GUI order is not changed, this should behave in a consistent manner. |
# Conflicts: # docs/latex/knora-base/knora-base.pdf # docs/latex/knora-base/knora-base.tex
- Fix value responder test of comment editing. - Add missing SALSAH icons.
- Add tests for creating and querying value comments.
…ip/beol * 'develop' of https://github.com/dhlab-basel/Knora: Update README.md test (webapi): add E2E testing (#244) BEOL and bibliography ontologies (#283) refactor (webapi): migrate spray to akka http (#273) fix (sipi error message): display the error message returned by SIPI (#287) Add support for editing labels and value comments (#261) docs: Convert Knora base ontology doc to RST. (#289) relative paths (#288) removing relative paths to icons in css file: it doesn't survive an front apache proxy like: (#191) adding css and fonts used in the js/jquery.editvalue.js (#180) docs: Add remark about pyvenv for anaconda users on mac and linux (#264) add internal link to doc/readme (#278) docs (extended search): add missing explanations for LIKE and !LIKE (#279) Upgrade the built-in Fuseki to version 2.4.0 (#268) # Conflicts: # knora-ontologies/knora-base.ttl # webapi/src/test/scala/org/knora/webapi/responders/v1/OntologyResponderV1Spec.scala
This adds:
foaf:Person
.foaf:name
.knora-base:UriValue
andknora-base:BooleanValue
.guiorder
in the API response describing a resource type, so they're sorted that way in the form for creating a new resource.It also fixes these GUI bugs:
knora-base:Region
as the type of resource to be created, but this didn't make sense.knora-base:hasStandoffLinkto
, but users shouldn't be able to do that.Closes #271.
Closes #263.