Open kilchenmann opened 4 years ago
The linking property and the link value properties belong together. The can be distinguished by boolean flags, see https://github.com/dasch-swiss/knora-api-js-lib/blob/54ec4990f56e82e3738aec7b596a5f0dabce4eaa/src/models/v2/ontologies/resource-property-definition.ts#L31-L35.
@tobiasschweizer indeed we spotted the different boolean flags between the 2 props. But in the UI, how combining both in a logical way (readonly and editable) especially because they have the same label?
Example:
{
"@id": "beol:hasAuthor",
"@type": "owl:ObjectProperty",
"knora-api:isEditable": true,
"knora-api:isLinkProperty": true,
"knora-api:isResourceProperty": true,
"knora-api:objectType": {
"@id": "beol:person"
},
"salsah-gui:guiElement": {
"@id": "salsah-gui:Searchbox"
},
"rdfs:comment": "Author",
"rdfs:label": "Author",
"rdfs:subPropertyOf": {
"@id": "knora-api:hasLinkTo"
}
},
{
"@id": "beol:hasAuthorValue",
"@type": "owl:ObjectProperty",
"knora-api:isEditable": true,
"knora-api:isLinkValueProperty": true,
"knora-api:isResourceProperty": true,
"knora-api:objectType": {
"@id": "knora-api:LinkValue"
},
"rdfs:comment": "Author",
"rdfs:label": "Author",
"rdfs:subPropertyOf": {
"@id": "knora-api:hasLinkToValue"
}
},
In a Gravsearch query, beol:hasAuthor
is used (the direct link between two resources) to search for a connection. For editing and reading operations, beol:hasAuthorValue
is used (the link value).
@benjamingeer I am actually wondering why beol:hasAuthor
is flagged as knora-api:isEditable:true
. The user can just update the link value, the direct statement is managed by Knora, right?
I guess you’re right, I hadn’t thought of it that way.
I think this point confused me...
Ok, I will make an issue for that.
This issue will be resolved with the new viewer structure.
At the moment with the integration of dasch-swiss/knora-api-js-lib (as part of PR #374) we get the link values twice because of the following response: The entityInfo of a resource has a list of properties, which is needed in case of create new resource or edit existing resource. The following example has the link as #partOf and #partOfValue.
This is the result in the template:
I'm not able to filter correctly and I'll need some help from the creator of ReadResource: @tobiasschweizer