[kepler-dev] Retrieving all the actors available for particular Kepler installation

Matt Jones jones at nceas.ucsb.edu
Sat Sep 14 12:33:58 PDT 2013


It works much differently in Kepler.  We index actors against the ontology
categories, and none of it is in the Configuration.  I don't remeber if
there is an external API, but there is an internal class representing the
library. I'd have to poke around to remember.

Matt
 On Sep 14, 2013 10:42 AM, "Michal Owsiak" <michalo at man.poznan.pl> wrote:

> Thanks for the info.
>
> I will take a look at this and let you know whether this solves my issue.
>
> Cheers
>
>> Hi Michal,
>>
>> I know how it is done in Ptolemy II, and the same techniques should work
>> with Kepler.
>>
>> The set of actors that are available are determined by
>> ptolemy.actor.gui.**Configuration.
>>
>> If a model is running in a system that has a Configuration, then to get
>> the Configuration:
>>
>>  <p>To access the configuration from a random place, if you have a
>>>  NamedObj <code>foo</code>, then you can call:
>>>  <pre>
>>>  Effigy effigy = Configuration.findEffigy(foo.**toplevel());
>>>  Configuration configuration = effigy.toplevel();
>>>  </pre>
>>>
>>
>> Configuration.check() traverses the configuration for various tests,
>> below are some fragments from it:
>>
>>          // Check TypedAtomicActors and Attributes
>>>         Iterator containedObjects = deepNamedObjList().iterator();
>>>         while (containedObjects.hasNext()) {
>>>             NamedObj containedObject = (NamedObj)
>>> containedObjects.next();
>>>
>> Or, to get just the composites:
>>
>>  for (CompositeEntity composite : deepCompositeEntityList()) {
>>>
>>
>> or
>>
>>>         // Check atomic actors for clone problems related to types
>>>         List entityList = allAtomicEntityList();
>>>         Iterator entities = entityList.iterator();
>>>         while (entities.hasNext()) {
>>>             Object entity = entities.next();
>>>             if (entity instanceof TypedAtomicActor) {
>>>
>>
>> See ptolemy/configs/test/**allConfigs.tcl for tests that read the various
>> configurations and perform tests on them.
>>
>> See
>> https://kepler-project.org/**developers/reference/what-**
>> happens-when-kepler-starts-up<https://kepler-project.org/developers/reference/what-happens-when-kepler-starts-up>
>> for information about how Kepler starts up and which configuration is
>> read.
>>
>> There is a chance that Kepler's database adds actors that are not
>> accessible via the configuration.
>>
>>
>> _Christopher
>>
>>
>>
>> On 9/13/13 1:45 AM, Michal Owsiak wrote:
>>
>>> Hi,
>>>
>>> I have question regarding the list of actors available inside
>>> particular Kepler installation.
>>>
>>> Let's assume that I have Kepler installation (default one) and I want
>>> to list all the actors that are available inside Kepler (the list you
>>> can see on the left where actors can be searched for).
>>>
>>> Is there any way to retrieve this list? Is there any Kepler API for
>>> this task? Can I find this information inside Kepler's DB or inside
>>> cache system?
>>>
>>> Thanks in advance for the info.
>>>
>>> Michal
>>>
>>>
>>
>>
> ______________________________**_________________
> Kepler-dev mailing list
> Kepler-dev at kepler-project.org
> http://lists.nceas.ucsb.edu/**kepler/mailman/listinfo/**kepler-dev<http://lists.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-dev>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nceas.ucsb.edu/kepler/pipermail/kepler-dev/attachments/20130914/3521b41a/attachment.html>


More information about the Kepler-dev mailing list