Hello, Tim; Yes, there are places where the count in the Classes View
does not always match the actual number of instances. We have
addressed some of those issues in the past, and can look into this if
you can let us know what action causes the count to not align. What
kind of a data source do you have? Is it before or after running
inferences? Also, is the behavior new to 3.6B or does it also occur in
3.5.x?
Doing the count for class instances can be an expensive operation, so
there may be other considerations. For example, in some cases
inferences are not added to the class instance count. But in general,
the count should be accurate, and I'm not aware of places where the
actual count is expected to be lower than that shown in the classes
view, so we would be interested in hearing more about what may cause
this to happen.
You have already discovered the most accurate way to determine the
count - with a SPARQL query. One could generalize this a bit so you
can use it on any class:
SELECT COUNT(?x)
WHERE
{ ?x a ?this .
}
Enter this into the SPARQL view and click on nodes in the Classes
view. The query will update to the count each time a class is chosen
and appears in the Form view. Works pretty nicely as a check to see
if the instance count is up-to-date.
-- Scott
On Apr 9, 2:17 pm, Tim Smith <[email protected]> wrote:
> Hi,
>
> I've noticed (in 3.6B) that the instance count in the classes view is a bit
> higher than the instance count found using a query like:
>
> SELECT COUNT (?x)
> WHERE {
> ?x a <Class Name>
>
> }
>
> I have intentionally selected the preference to show only direct instances
> and there are no subclasses anyway.
>
> Any reason they should be different?
>
> If I export all of the instances shown in the instance view, the number of
> instances in the exported file matches what the SPARQL query returns.
>
> This is very confusing when you are showing people data and the numbers
> don't match!
>
> Thanks for your input,
>
> Tim
--
You received this message because you are subscribed to the Google
Group "TopBraid Suite Users", the topics of which include Enterprise Vocabulary
Network (EVN), TopBraid Composer,
TopBraid Live, TopBraid Ensemble, SPARQLMotion and SPIN.
To post to this group, send email to
[email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/topbraid-users?hl=en