You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by "Andy Seaborne (Jira)" <ji...@apache.org> on 2022/02/22 13:46:00 UTC

[jira] [Updated] (JENA-2290) GraphRDFS doesn't implement contains

     [ https://issues.apache.org/jira/browse/JENA-2290?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andy Seaborne updated JENA-2290:
--------------------------------
    Priority: Major  (was: Minor)

> GraphRDFS doesn't implement contains
> ------------------------------------
>
>                 Key: JENA-2290
>                 URL: https://issues.apache.org/jira/browse/JENA-2290
>             Project: Apache Jena
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: Jena 4.4.0
>            Reporter: Lorenz Bühmann
>            Assignee: Andy Seaborne
>            Priority: Major
>
> While trying to use the RDFS dataset to use light-weight reasoning I recognized that the contains method isn't implemented properly?
> I can't say if this holds for all contains calls as there is some contains method directly in the dataset.
> But the following path is what I got trouble with:
> Given {{D}} being a {{DatasetGraphRDFS}} and then getting the named model {{M}} for a particular graph which in fact is then backed by a {{GraphRDFS}} instance {{G}} this {{G}} doesn't seem to make use of the inferred triples when we call {{{}contains{}}}. This method is still only implemented in the {{GraphWrapper}} superclass and doesn't make use of the overridden {{find}} method.
> Don't what would be best place to implement it. Sure, we could make use of {{find}} directly in the {{GraphRDFS}} class, e.g.
> {code:java}
> @Override
> public boolean contains(Node s, Node p, Node o) {
>     return find(s, p, o).hasNext();
> }
> @Override
> public boolean contains(Triple t) {
>     return contains(t.getSubject(), t.getPredicate(), t.getObject());
> } {code}
> But I'm wondering about efficiency as I don't know how efficient the inference streams are built. I mean we could maybe terminate way earlier in the {{MatchRDFS}} but it would of course lead to some more lines of code.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)