[kepler-dev] Loading actors into EntityLibrary
jones at nceas.ucsb.edu
Thu Feb 21 10:36:08 PST 2008
Sorry for the confusion over the basicKeplerLibrary.xml file. That has
not been used for the tree in Kepler for a very long time. Kepler's
tree is no longer displaying an instance of a MoML model, so I removed
the basicKeplerLibrary.xml from the configuration directory and the
configuration.xml file in CVS just now to reduce confusion.
Kepler's tree is built using the MoML descriptions that are extracted
from KAR files. KAR files are archives that contain the actors, and
Kepler extracts and caches them when it loads a new KAR file. So, one
way to add to the tree is to use File|Import KAR Archive..." and it will
let you select a new kar file from disk and load it into the tree. From
that point forward that actor will show up in the tree. Kepler ships
with a bunch of actor KAR files that are preloaded into the cache and
therefore show up in the tree (these can be seen in the directories
under kepler/src/actors/ in the Kepler CVS repository).
Thus, there is no longer a master list of actors to be displayed in the
tree -- rather, the list is generated dynamically from the set of cached
kar files in the system that the user has loaded, and can differ for
each kepler user, and changes while Kepler is running.
When each KAR file is cached, its placement in the tree is determined
based on its SemanticType properties, as Chad described. I've put a bit
more info on the SemanticType system below in case you are interested.
SemanticType classification of actors in Kepler
Here's a bit more detail on Chad's descriptions of the placement of
actors within the tree based on their semantic type:
Each MoML description that is extracted form a KAR contains some
semanticType properties that determine where in the tree a given actor
is displayed. Each actor can have multiple of these properties,
allowing them to be in multiple categories in the tree, as well as in
multiple trees. For example, the EML2 Data Source actor has these
semantic type properties:
<property name="semanticType00" class="org.kepler.sms.SemanticType"
<property name="semanticType11" class="org.kepler.sms.SemanticType"
<property name="semanticType22" class="org.kepler.sms.SemanticType"
<property name="semanticType33" class="org.kepler.sms.SemanticType"
which means that it is a ExternalInputActor from one classification
(onto:1:1), and a LocalInput, RemoteInput, and XMLProcessor from another
classification (onto:2:1). The different classifications (ontologies)
from which the terms are drawn are the first part of the LSID URI. You
can see the currently available ontologies used in the tree in the
directory kepler/configs/ptolemy/configs/kepler/ontologies/, and within
that directory is a ontology_catalog.xml file that determines which
classifications will be displayed in the Kepler tree. If you look in
Kepler, you'll see there are four top level classification hierarchies
in the actor tree, and these correspond to the four ontologies marked as
library="true" in the ontology_catalog.xml file.
All that is to say is that the loading of actors in Kepler is a lot more
flexible, and a lot more complicated, than in ptolemy, as we support
multiple ways of organizing actors and searching for actors.
In practice, what this means is that you need to provide a KAR file
containing the MoML description of your actor, and in that MoML you need
to have the SemanticType properties that point at particular nodes in
one or more of the ontology trees.
R.P.Mciver at cs.cardiff.ac.uk wrote:
> Hey there,
> I've been trying to create a simple PTree to list all of the actors
> etc. that are available in kepler but I've not been having much luck.
> I've managed to get a tree to show the actors just from ptolemy by
> creating an EntityLibrary, configuring it to use the xml file
> "$ptII\ptolemy\configs\basicLibrary" and then creating a PTree from
> this - but I can't get the same to work for kepler. I tried using the
> xml file "$kepler\configs\ptolemy\configs\kepler\basicKeplerLibrary"
> to configure my EntityLibrary and then make a PTree from that but that
> just gave me an empty tree. Do I need to try and do this in a
> different way when trying to load the kepler actors instead of the
> ptolemy ones? Or have I just got the wrong xml file?
> Out of interest can anyone tell me how Kepler itself actually creates
> the tree of components, projects, disciplines etc. that it dispays in
> the side panel?
> Any info would be greatly appreciated!
> This message was sent using IMP, the Internet Messaging Program.
> Kepler-dev mailing list
> Kepler-dev at ecoinformatics.org
Matthew B. Jones
Director of Informatics Research and Development
National Center for Ecological Analysis and Synthesis (NCEAS)
UC Santa Barbara
jones at nceas.ucsb.edu Ph: 1-907-523-1960
More information about the Kepler-dev