[kepler-dev] Another problem in searching actors

Chad Berkley berkley at nceas.ucsb.edu
Mon Aug 22 09:14:47 PDT 2005


Hi Jianting,

Thanks for looking into this.  I'll mess around with it today and see if 
i can get it to work.

chad

Jianting Zhang wrote:
> After some further digging, I found the problem may be caused by the
> following code in the method of getDeepEnity() at ResultTreeRebuilder.java. 
> 
> 
> private static NamedObj getDeepEntity(NamedObj entity, CompositeEntity
> entityToSearch)
>   {
>     for (Iterator i = entityToSearch.entityList().iterator(); i.hasNext(); )
>     {
>       //search each enity in the entityToSearch
>       Entity e = (Entity) i.next();
>       if (e.getName().equals(entity.getName()))
>       {
>         System.out.println(	"getDeepEntity:"+entity+" returning "+e);
>         return e;
>       }
> 	......
>     }
> ......
> }
> 
> The matching [if (e.getName().equals(entity.getName()))] is essentially
> based on the labels in the actor tree which are copied from ontology.owl.
> While there is no problem using duplicated labels in ontology since the
> ontology searching is based on the class name (not the label, as I thought
> yesterday), the labels are used as the entity names in the EntityLibrary
> which cause problem in the above code. For example, while the entity to
> search is .Workflow Components.Actors.Outputs.GIS, the return is .Search
> Results.WorkflowComponents.Actors.Inputs.External.GIS. 
> 
> The problem I found yesterday and the one I found today are just two
> appearances of the same problem. Hope this finding helps.
> 
> Have a nice weekend. 
> 
> Jianting
> 
> 
> 
> -----Original Message-----
> From: Jianting Zhang [mailto:jzhang at lternet.edu] 
> Sent: Friday, August 19, 2005 12:28 PM
> To: 'Shawn Bowers'; Chad Berkley
> Cc: Matt Jones
> Subject: Another problem in searching actors
> 
> Because of the puzzle, I looked into both the ontology and the
> implementation codes. It seems everything works as expected until I traced
> to ResultTreeRebuilder. I suspect there might be a problem in method
> buildResultTree(). 
> 
> To illustrate the problem, I search "GIS" using only "concept". 25 items are
> returned and I examined the tree paths (I added some codes to print them
> out) which are correct. However, only 22 items are displayed in the result
> pane with nothing in Actors/Inputs/External (which supposed to have the
> three GIS input actor). Note the number of searching results (25) is
> displayed in the status bar. I understand the displayed number can be less
> than the total leaf nodes in the resulting tree since an actor can have
> multiple roles, but not the other way. 
> 
> BTW: searching by "text" seems to be correct when searching "GIS". 
> 
> Jianting
> 
> 
> -----Original Message-----
> From: Shawn Bowers [mailto:sbowers at ucdavis.edu] 
> Sent: Thursday, August 18, 2005 9:33 PM
> To: Jianting Zhang
> Cc: kepler-dev at ecoinformatics.org
> Subject: RE: [kepler-dev] Duplications of actors when searching the actor
> tree
> 
> 
> Hi,
> 
> Yes, now that you mention this problem I remember that the GIS one was a
> bit strange (perhaps a distributed ontology editing problem ... i.e.,
> someone at one time added a concept and called it GIS which is the same
> name as another concept). I actually "fixed up" the actor ontology as a
> test case, and it can be found under the ontology directory in kepler
> (configs/ptolemy/configs/kepler/ontologies/keplerActorOntology.owl).
> 
> The labels are what are shown in the browser, the id's are for "internal"
> purposes...
> 
> I think we should actually match on label and not on id ... and save id
> for a "real" identifier, e.g., with no implied assumption that the id is a
> meaningful name. Another approach would be to introduce an owl annotation
> property called something like "displayName".  But, I think that is pretty
> much what "label" is for. Of course, we would need to require labels for
> searching/browsing -- but I think that is okay.
> 
> On another note, we are about to change the entire way that the actor
> search via semantic types is coded (to leverage the object manager). If
> folks have suggestions on improvements, new features, things you'd like to
> see, your comments would be very much appreciated!
> 
> Thanks,
> 
> -shawn
> 
> 
> On Thu, 18 Aug 2005, Jianting Zhang wrote:
> 
> 
>>Ok, here is what I found:
>>
>>If I change the value of <rdfs:label> with the value of rdf:ID in
>>"<owl:Class>", then the searching works as expected. More specifically,
>>actors that have multiple roles appear multiple times and actors that have
>>single role appear just once.
>>
>>By changing the value of <rdfs:label> to the value of rdf:ID, it becomes
>>unique. I guess the problem happened because "GIS" was used at the labels
>>for multiple concepts. I suspect matching based on rdf:ID instead of
>>rdfs:label will solve the problem.
>>
>>Thanks for helping
>>
>>Jianting
>>
>>-----Original Message-----
>>From: Shawn Bowers [mailto:sbowers at ucdavis.edu]
>>Sent: Thursday, August 18, 2005 6:03 PM
>>To: Jianting Zhang
>>Cc: kepler-dev at ecoinformatics.org
>>Subject: Re: [kepler-dev] Duplications of actors when searching the actor
>>tree
>>
>>
>>I have no idea, you'll have to ask the ontology creator ;)
>>
>>-shawn
>>
>>Jianting Zhang wrote:
>>
>>>I understand an actor can be classified under multiple concepts, say a
> 
> GIS
> 
>>>actor and an output actor. But an output GIS actor can not be an input
> 
> GIS
> 
>>>actor. Am I wrong here?
>>>
>>>-----Original Message-----
>>>From: Shawn Bowers [mailto:sbowers at ucdavis.edu]
>>>Sent: Thursday, August 18, 2005 5:55 PM
>>>To: Jianting Zhang
>>>Cc: kepler-dev at ecoinformatics.org
>>>Subject: Re: [kepler-dev] Duplications of actors when searching the
> 
> actor
> 
>>>tree
>>>
>>>It's not a bug, it's a feature.  An actor can be classified under
>>>multiple concepts ... It might be a bug in the ontology, e.g., it may
>>>not be the case that all GIS actors are both external input actors and
>>>output actors.   But this is definately a feature of the actor searching
>>>-- supporting mutliple conceptual access paths to the same actor.
>>>
>>>-shawn
>>>
>>>
>>>
>>>Jianting Zhang wrote:
>>>
>>>
>>>>I recently added a few GIS data display actors to the actor tree
>>>>(locally). It works normally when browsing the actor tree. However, when
>>>>I search "GIS", these three actors appear in both inputs/external/GIS
>>>>and outputs/GIS and so do a few other GIS actors (such as GDAL wrap and
>>>>projection, Grass Export). Is this possibly a bug in actor searching?
>>>>
>>>>
>>>>
>>>>Thanks
>>>>
>>>>
>>>>
>>>>Jianting
>>>>
>>>>
>>>>------------------------------------------------------------------------
>>>>
>>>>_______________________________________________
>>>>Kepler-dev mailing list
>>>>Kepler-dev at ecoinformatics.org
>>>>http://mercury.nceas.ucsb.edu/ecoinformatics/mailman/listinfo/kepler-dev
>>>
>>>
>>
> 


More information about the Kepler-dev mailing list