Re: [topbraid-users] faceted search on classes rather than instances?

2014-08-01 Thread Holger Knublauch
Would it work if you just start with the facetsapp (and its swa:Windows) 
and then add your tree component or whatever else you need into it? Yes, 
swa:Windows are needed to trigger the reload correctly, i.e. when you 
change the facets, the right hand side needs to reload.


Holger


On 8/2/14, 9:28 AM, Jack Hodges wrote:
By 'instance-tizing' my classes (make them rdf:type my superclass), I 
can get facets. I am glad that I have made some progress, but that 
seems like the wrong approach since they are really classes.


Even when I do this, in 4.4 I get no search results. I migrated this 
'instancetization' back to 4.2 and I get facets and search results. So 
I must not have swa:FacetedSearchGadget and 
swa:SummarySearchResultsGadget wired up properly. Are they supposed to 
be related by arg:id or some such? In the demo, where swa:Window is 
used, they have arg:id values, but my  approach does not. Any 
comments would be welcome. Examples of the two approaches are provided 
below (the rest of the content is basically identical between 4.2 and 
4.4).


4.2 version:






width="450px">
id="facetsProgressIndicator">Loading {= ui:label(?treeRoot) }...

startFacets('http://siemens.com/1.0/vocab/biomed-symp#Symptom','','ssf-instance-page');







4.4 version:






width="450px">
arg:resourceType="biomed-symp:Symptom" ui:args="*"/>



ui:args="*"/>







Jack

On Friday, July 25, 2014 8:32:29 AM UTC-7, Jack Hodges wrote:

Do you have a project upload mechanism that I can use. The
workspace, compressed, is 223 MB. I have sent a project
description to your email address.

Jack

On Thursday, July 24, 2014 7:47:52 PM UTC-7, Holger Knublauch wrote:

Hi Jack,

sorry but I believe we will need to get hands on your example
file to help you further. Off-list is fine.

Holger


On 7/25/2014 5:20, Jack Hodges wrote:

Hello Irene,

I checked all of the classes and they are all rdf:type
owl:Class (they subclass owl:Thing). I checked all of the
properties I am using as facets and the items in all of their
domains and ranges are rdf:type owl:Class. But no faceted
search (I closed and opened the model and refreshed the
caches and the swp graphs).

Jack

On Thursday, July 24, 2014 11:26:37 AM UTC-7, Jack Hodges wrote:

Thanks!

On Thursday, July 24, 2014 8:28:41 AM UTC-7, Irene
Polikoff wrote:

Jack,

I don’t believe sub-classing is either an issue or a
requirement here. Faceted search works over instances
of a class. Classes are instances of either
rdfs:Class or owl:Class. So, you need to be faceting
over either rdfs:Class or owl:Class. And properties
to select from as facets would need to be associated
with these e.g., have owl:Class in their domain.

Irene

*From:*topbrai...@googlegroups.com
[mailto:topbrai...@googlegroups.com] *On Behalf Of
*Jack Hodges
*Sent:* Thursday, July 24, 2014 11:17 AM
*To:* topbrai...@googlegroups.com
*Subject:* Re: [topbraid-users] faceted search on
classes rather than instances?

I am trying to build faceted search across standard
models/repositories. In this case the classes are
terminals for the repository and contain all the
information an instance would carry. For example, in
the obolibrary DOID, disease obo:DOID_9352 is fully
populated with content, and the disease is unlikely
to be subclassed or instantiated.

My understanding is that these classes can
participate in faceted search under certain
circumstances. First, they have to subclassed under
one of my classes. Also, for classes to be facetable
they need to carry properties and look like resources.

I created namespaces such as the following for Symptoms:

http://siemens.com/1.0/vocab/biomed-symp



Re: [topbraid-users] faceted search on classes rather than instances?

2014-08-01 Thread Jack Hodges
By 'instance-tizing' my classes (make them rdf:type my superclass), I can 
get facets. I am glad that I have made some progress, but that seems like 
the wrong approach since they are really classes.

Even when I do this, in 4.4 I get no search results. I migrated this 
'instancetization' back to 4.2 and I get facets and search results. So I 
must not have swa:FacetedSearchGadget and swa:SummarySearchResultsGadget 
wired up properly. Are they supposed to be related by arg:id or some such? 
In the demo, where swa:Window is used, they have arg:id values, but my 
 approach does not. Any comments would be welcome. Examples of the two 
approaches are provided below (the rest of the content is basically 
identical between 4.2 and 4.4).

4.2 version:






Loading 
{= ui:label(?treeRoot) }...

startFacets('http://siemens.com/1.0/vocab/biomed-symp#Symptom','','ssf-instance-page');






4.4 version:
















Jack

On Friday, July 25, 2014 8:32:29 AM UTC-7, Jack Hodges wrote:
>
> Do you have a project upload mechanism that I can use. The workspace, 
> compressed, is 223 MB. I have sent a project description to your email 
> address.
>
> Jack
>
> On Thursday, July 24, 2014 7:47:52 PM UTC-7, Holger Knublauch wrote:
>>
>>  Hi Jack,
>>
>> sorry but I believe we will need to get hands on your example file to 
>> help you further. Off-list is fine.
>>
>> Holger
>>
>>
>> On 7/25/2014 5:20, Jack Hodges wrote:
>>  
>> Hello Irene,
>>
>> I checked all of the classes and they are all rdf:type owl:Class (they 
>> subclass owl:Thing). I checked all of the properties I am using as facets 
>> and the items in all of their domains and ranges are rdf:type owl:Class. 
>> But no faceted search (I closed and opened the model and refreshed the 
>> caches and the swp graphs).
>>
>> Jack
>>
>> On Thursday, July 24, 2014 11:26:37 AM UTC-7, Jack Hodges wrote: 
>>>
>>> Thanks!
>>>
>>> On Thursday, July 24, 2014 8:28:41 AM UTC-7, Irene Polikoff wrote: 

  Jack, 

  

 I don’t believe sub-classing is either an issue or a requirement here. 
 Faceted search works over instances of a class. Classes are instances of 
 either rdfs:Class or owl:Class. So, you need to be faceting over either 
 rdfs:Class or owl:Class. And properties to select from as facets would 
 need 
 to be associated with these e.g., have owl:Class in their domain.

  

 Irene

  

 *From:* topbrai...@googlegroups.com [mailto:topbrai...@googlegroups.com] 
 *On Behalf Of *Jack Hodges
 *Sent:* Thursday, July 24, 2014 11:17 AM
 *To:* topbrai...@googlegroups.com
 *Subject:* Re: [topbraid-users] faceted search on classes rather than 
 instances?

  
  
 I am trying to build faceted search across standard 
 models/repositories. In this case the classes are terminals for the 
 repository and contain all the information an instance would carry. For 
 example, in the obolibrary DOID, disease obo:DOID_9352 is fully populated 
 with content, and the disease is unlikely to be subclassed or instantiated.

 My understanding is that these classes can participate in faceted 
 search under certain circumstances. First, they have to subclassed under 
 one of my classes. Also, for classes to be facetable they need to carry 
 properties and look like resources.

 I created namespaces such as the following for Symptoms:

 http://siemens.com/1.0/vocab/biomed-symp

 and a prefix for it: biomed-symp. I created a class called Symptom and 
 then subclassed several (for the purposes of a demo) of the classes in the 
 obolibrary (e.g., obo:SYMP_455) to biomed-symp:Symptom. I did the same 
 for diseases (etc.). I created facets to bridge the repositories, such as 
 biomed-symp:involvesDisease, that I hung off biomed-symp:Symptom in the 
 defaultFacets property.

 In the vocabulary, I added these properties (e.g,. obo:SYMP_455 
 biomed-symp:involvesDisease obo:DOID_9352).

 Unfortunately this approach isn't working, so I haven't gone far enough 
 in one way or another, and figure that you guys might know how to do it. 
 Any help would be appreciated as faceted search is very important to this 
 proj

Re: [topbraid-users] Message returned by spin:constraint?

2014-08-01 Thread Scott Henninger

  
  
James, in TBC-Free, use New... > RDF/OWL/SPIN File and all of the
necessary imports for SPIN are included.

Yes, you are correct that the SPIN file should owl:imports the files
you want to execute SPIN rules/constraints over.  owl:imports is
basically an includes operation that includes the "imported" file.

Since SPIN definitions are on the classes, it is common to import
the model only (i.e. class and property definitions) and bring in
instance data a run time.  This way a set of SPIN definitions can be
executed against different sets of instance data.

-- Scott

On 8/1/2014, 12:28 PM,
  ja...@howison.name wrote:


  

On Friday, August 1, 2014 1:22:15 AM UTC-5, Holger Knublauch
wrote:

  
On 8/1/2014 2:00, ja...@howison.name
  wrote:


  I'm working with spin constraints (spin
1.4.0 via Maven).  I have them firing but I'm confused
about how to label them so I can see which constraint
has failed.  The full code (and data) is at https://github.com/jameshowison/softcite
(


This is very cool. I am glad to see more projects using
SPIN, some of them with Turtle files edited by hand. If you
do edit these files by hand, I would still recommend to make
them easier to open with TopBraid (Free Edition) and similar
RDF tools. All you would need to do is add some owl:Ontology
into every file and define explicit owl:imports so that when
you load the example file, it will pull all other necessary
files into TopBraid. This may help you get more feedback
because more people could understand what's going on
(without stepping through Java code). Just an idea.
  




  Hey, SPIN is cool, I was very glad to find it.  I've
messed around with SWRL a while back, but given that I
vaguely understand SPARQL this is much, much, easier.
   
  If you do edit these files by hand, I would still
recommend to make them easier to open with TopBraid (Free
Edition) and similar RDF tools. All you would need to do is
add some owl:Ontology into every file and define explicit
owl:imports so that when you load the example file, it will
pull all other necessary files into TopBraid. This may help
you get more feedback because more people could understand
what's going on (without stepping through Java code). Just
an idea.
  
  
  I've created a new branch for my attempt to do this:
  
  
  https://github.com/jameshowison/softcite/tree/topbraid
  
  
  It's a little complicated by the need to "drop out" to
some Java code to do some name mapping (some of the programs
that I'm writing data about have alternative names), quite
likely this can be done via SPIN but it isn't at the moment.
  
  
  If I understand correctly, I should have a "main file" of
rdf that imports the other files?  Would one typically do a
vocab file as the main file, then import the individuals and
the spin rules and constraints?  At present I've just add
the owl imports for SPIN etc and opened my
SPINConstraints.ttl file in TopBraid FE. In the SPIN
overview tab I see only the constraint for
bioj:ArticleSoftwareLink, but not the constraints
for bioj:SoftwarePackage (which are all spl:Attribute).

 

  

  may be some local paths in there, sorry!)
and I run the constraints via mvn -Dtest=AppTest#testSPINConstraints
test


I'm using the output code from the Kennedy's
  example, edited to use getCustomizedLabel rather than
  getLabel (although using just getLabel doesn't work as
  I'd expect either):
  
  
  
for(ConstraintViolation cv : cvs) {
 System.out.println("

  - at " + SPINLabels.get().getCustomizedLabel(cv.getRoot())

  + ": " + cv.getMessage());
  
  
  
  I've tried to follow the code through
cv.getMessage() but I got lost in abstract
interfaces somewhere :)
  
  
  This is the constraint:
  
  

Re: [topbraid-users] Message returned by spin:constraint?

2014-08-01 Thread james


On Friday, August 1, 2014 1:22:15 AM UTC-5, Holger Knublauch wrote:
>
>  On 8/1/2014 2:00, ja...@howison.name  wrote:
>  
> I'm working with spin constraints (spin 1.4.0 via Maven).  I have them 
> firing but I'm confused about how to label them so I can see which 
> constraint has failed.  The full code (and data) is at 
> https://github.com/jameshowison/softcite (
>
>
> This is very cool. I am glad to see more projects using SPIN, some of them 
> with Turtle files edited by hand. If you do edit these files by hand, I 
> would still recommend to make them easier to open with TopBraid (Free 
> Edition) and similar RDF tools. All you would need to do is add some 
> owl:Ontology into every file and define explicit owl:imports so that when 
> you load the example file, it will pull all other necessary files into 
> TopBraid. This may help you get more feedback because more people could 
> understand what's going on (without stepping through Java code). Just an 
> idea.
>

Hey, SPIN is cool, I was very glad to find it.  I've messed around with 
SWRL a while back, but given that I vaguely understand SPARQL this is much, 
much, easier.
 
If you do edit these files by hand, I would still recommend to make them 
easier to open with TopBraid (Free Edition) and similar RDF tools. All you 
would need to do is add some owl:Ontology into every file and define 
explicit owl:imports so that when you load the example file, it will pull 
all other necessary files into TopBraid. This may help you get more 
feedback because more people could understand what's going on (without 
stepping through Java code). Just an idea.

I've created a new branch for my attempt to do this:

https://github.com/jameshowison/softcite/tree/topbraid

It's a little complicated by the need to "drop out" to some Java code to do 
some name mapping (some of the programs that I'm writing data about have 
alternative names), quite likely this can be done via SPIN but it isn't at 
the moment.

If I understand correctly, I should have a "main file" of rdf that imports 
the other files?  Would one typically do a vocab file as the main file, 
then import the individuals and the spin rules and constraints?  At present 
I've just add the owl imports for SPIN etc and opened my 
SPINConstraints.ttl file in TopBraid FE. In the SPIN overview tab I see 
only the constraint for bioj:ArticleSoftwareLink, but not the constraints 
for bioj:SoftwarePackage (which are all spl:Attribute).
 

>  may be some local paths in there, sorry!) and I run the constraints 
> via mvn -Dtest=AppTest#testSPINConstraints test 
>
>  I'm using the output code from the Kennedy's example, edited to use 
> getCustomizedLabel rather than getLabel (although using just getLabel 
> doesn't work as I'd expect either): 
>
>  for(ConstraintViolation cv : cvs) {
>  System.out.println(" - at " + 
> SPINLabels.get().getCustomizedLabel(cv.getRoot()) + ": " + cv.getMessage());
>  
>  I've tried to follow the code through cv.getMessage() but I got lost in 
> abstract interfaces somewhere :)
>
>  This is the constraint:
>
>  bioj:SoftwareMention a rdfs:Class ;
>   spin:constraint
>[ a   spl:Attribute ;
> rdfs:comment "Must have one and exactly one classification 
> "^^xsd:string ;
> spl:predicate citec:mention_category ;
> spl:minCount 1 ;
> spl:maxCount 1 ;
> # spl:valueType citec:MentionClassification ;
># spl:defaultValue ex:Red
>   ] ;
> .
>  
>  Originally I was working with 1.3.1 and I was getting the Resource ID 
> but no message:
>
>  - at citec:a2007-36-BMC_PLANT_BIOL-B03-mention: 
>  
>  Now I've upgraded to 1.4.0 and I'm getting a generic message (progress!):
>
>  - at citec:a2007-36-BMC_PLANT_BIOL-B03-mention: Attribute 
> citec:mention_category :  [1,1]
>   
>
> Yes I had fixed this bug in 1.3.3 because several users complained that 
> the message was empty. It now behaves more consistently with TopBraid. If 
> the template has a spin:labelTemplate then it will use that.
>

Hmmm, I think I understand, but the spin:labelTemplate wouldn't be 
something that I would define, would it? Perhaps the spin:labelTemplate 
defines how the cv.getMessage should be constructed?
 

>  But how would I output the rdfs:comment from the constraint?
>
> I see that TopBraid also creates the spin:constraints as I have, but the 
rdfs:comment doesn't output when running the cv.getMessage() code?  For:

spin:constraint  [ a  spl:Attribute ;
   rdfs:comment   "Does this show up?"^^xsd:string ;
   spl:maxCount   1 ;
   spl:minCount   1 ;
   spl:predicate  rdfs:label
 ] ;

I get  - at bioj:a2009-51-MOL_THER-BioEdit: Attribute rdfs:label :  [1,1]

I guess what I expect is:

 - at bioj:a2009-51-MOL_THER-BioEdit: Attribute rdfs:label : [1,1] Does 
this show

Re: [topbraid-users] Re: Viewing a Resource as an SWP hangs TBC 4.3.1

2014-08-01 Thread Tim Smith
To close the loop on this...

I tried the same tests using a fresh install of TBC 4.5.0.  I experienced
none of the problems of 4.3.1.  I did import all the projects from the
4.3.1 workspace so on one hand, that should have duplicated the problem if
it still exists.  On the other hand, if letting TBC look through the triple
store "checked a box" so to speak and that result was stored in the
workspace then that's a different outcome.

For now I'm just going to work in 4.5 and hope the problem doesn't come
back.  I don't relish the idea of trying to track down all the .ui. files
and check for references to the Oracle connectors (although there shouldn't
be any - only references in SM scripts serving as web services). :)

Thanks for all of the responses,

Tim



On Thu, Jul 31, 2014 at 6:56 PM, Holger Knublauch 
wrote:

>  Hi Tim,
>
> I cannot see why it would even access the Oracle database if it has
> nothing to do with the rest of your graphs. Maybe some .ui. file has a
> reference to it?
>
> In any case, please make sure that Cache all is deactivated in the TBL
> Administration settings.
>
> HTH
> Holger
>
>
>
> On 8/1/14, 6:36 AM, Tim Smith wrote:
>
>   Hi Mark,
>
>  I thought of that so I had re-started TBC just prior to those tests.  It
> should have had full connectivity, if it didn't, it might have hung but I
> doubt the memory footprint would have grown much.
>
>  I will download 4.5 and try the same thing in the next day or so.
>
>  Thanks,
>
>  Tim
>
>
> On Thu, Jul 31, 2014 at 4:29 PM, Mark Graham  wrote:
>
>> Hi Tim,
>>
>>  One possible impact is the disconnect from the DB connection. If this
>> occurs then restart of TBC needed. This is resolved in 4.5
>>
>>  Thanks,
>> Mark
>>
>>
>> Mark Graham
>> TopQuadrant Support
>>
>>
>>
>>
>>  On Thu, Jul 31, 2014 at 4:21 PM, Tim Smith 
>> wrote:
>>
>>>Third Update:
>>>
>>> Memory footprint of TBC is at 17,737,624KB.
>>>
>>>  Apparently I waited long enough as the localhost SWP call has
>>> completed.  Now if use Resource ->Show as SWP Page it works promptly.
>>>
>>> My guess is that TBC felt the need to download all the triples (nearly
>>> 70 million of them).
>>>
>>>  How do I keep this from happening?  I understand that it might be
>>> looking for relevant SWP views but I think it should only search in graphs
>>> that are directly related to the open file or its imports.
>>>
>>>  Thanks for your input!
>>>
>>>
>>> On Thu, Jul 31, 2014 at 4:16 PM, Tim Smith 
>>> wrote:
>>>
   Second Update:

  TBC memory footprint is over 17GB... it will max at 28GB so I'm going
 to kill it.

  Additional test:

 I deployed the same project to a TBL server that does not have the
 Oracle connector files and it returns the SWP in a second or so.




 On Thu, Jul 31, 2014 at 3:57 PM, Tim Smith 
 wrote:

>  Update:
>
> I've tried to access the same resource using a browser via:
>
> localhost:8083/tbl/swp?_resource=
>
>  My PC is chewing up a small amount of CPU and the memory footprint of
> TBC has grown from 1-2GB to over 10GB.  My guess is that it is downloading
> all the triples from the Oracle triple store.
>
> Any way to tell what is happening?
>
>
> On Thu, Jul 31, 2014 at 3:04 PM, Tim Smith 
> wrote:
>
>> I am having difficulty viewing a resource as an SWP page in TBC.
>>
>>  My ontology file has no imports and no SWP definitions other than
>> the default capabilities of TBC.  I select "Resource -> Open in SWP
>> Browser".
>>
>>  Once I do that, TBC sits and churns.  I've never let it run past 5
>> minutes so maybe it would come back but 5 minutes to display a generic 
>> SWP
>> page should be more than enough.
>>
>>  I think this has to do with the fact that I have oracle connector
>> files to the Oracle RDF store in my workspace.  My guess is that it is
>> scanning the 70 million triples for something.
>>
>> Why?
>>
>>  Well, if I put my PC to sleep with TBC running, TBC will throw an
>> error with it wakes up indicating that it has lost the connection to 
>> Oracle
>> - this happens even though I have nothing open in the workspace that uses
>> the connector files.
>>
>>  If I have the same ontology open and select "Resource -> Open in SWP
>> Browser" while TBC is in this state, I get a number of Java errors 
>> related
>> to a failed Oracle connection (I can recreate and share the error if
>> necessary).
>>
>>  Any thoughts on why Open in SWP Browser would have anything to do
>> with an Oracle back-end that is not referenced in any way in the open 
>> graph?
>>
>>  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