[kepler-dev] [Ptexternal-cvs] r65117 - trunk/ptolemy/moml/filter
Jianwu Wang
jianwu at sdsc.edu
Tue Nov 27 17:01:48 PST 2012
Hi Christopher,
Dan and I updated org.kepler.KeplerConfigurationApplication and
org.kepler.Kepler classes and configurations in
$Kepler/common/configs/ptolemy/configs/kepler/. Now Kepler display
actors info is saved in configuration xmls and does not need to be added
in ptolemy classes. I updated RemoveGraphicalClasses based on it.
Best wishes
Sincerely yours
Jianwu Wang, Ph.D.
jianwu at sdsc.edu
http://users.sdsc.edu/~jianwu/
Assistant Project Scientist
Scientific Workflow Automation Technologies (SWAT) Laboratory
San Diego Supercomputer Center
University of California, San Diego
San Diego, CA, U.S.A.
On 11/26/12 4:49 PM, Christopher Brooks wrote:
> Hi Jianwu,
> Good point, that configuration file setting removes those classes always.
> Perhaps at start up of the batch file you could call
> RemoveGraphicalClasses.add()?
>
> There is some commented out code in
> kepler/loader/src/org/kepler/KeplerConfigurationApplication.java
>> try {
>> _configuration =
>> readConfiguration(specToURL(args[0]));
>>
>> /*
>> List momlFilters = MoMLParser.getMoMLFilters();
>> if (momlFilters != null) {
>> Iterator filters =
>> momlFilters.iterator();
>> while (filters.hasNext()) {
>> MoMLFilter filter =
>> (MoMLFilter) filters.next();
>> if (filter instanceof
>> RemoveGraphicalClasses) {
>> RemoveGraphicalClasses rgc = (RemoveGraphicalC\
>> lasses) filter;
>> //
>> rgc.put("org.geon.BrowserDisplay",
>> //
>> "ptolemy.actor.lib.Discard");
>> break;
>> }
>> }
>> }
>> */
>
> I think probably the right thing to do is to add a parameter to the
> batch mode configuration file (if there is one) and then modify
> ptolemy/src/ptolemy/actor/gui/Configuration.java to read that
> parameter and add elements to the classes to be removed.
>
> How is batch mode invoked? Is there a configuration? Is
> kepler/common/configs/ptolemy/configs/kepler/ConfigNoGUIWithCache.xml
> used?
>
> I realize this is a little complex, but it would be good not to add
> Kepler-specific code to the Ptolemy .java files and instead have the
> configuration do it.
>
> _Christopher
>
> On 11/26/12 4:25 PM, Jianwu Wang wrote:
>> Hi Christopher,
>>
>> Thanks for your info. I didn't know we can do it via
>> configuration.xml. I'll check it.
>>
>> A quick question, I only want the two classes to be filtered to
>> be Discard class when kepler is run in batch mode. They are still
>> useful with GUI. Does this configuration.xml support it? It looks
>> only support general filter, not Graphical Filter.
>>
>> Best wishes
>>
>> Sincerely yours
>>
>> Jianwu Wang, Ph.D.
>> jianwu at sdsc.edu
>> http://users.sdsc.edu/~jianwu/
>>
>> Assistant Project Scientist
>> Scientific Workflow Automation Technologies (SWAT) Laboratory
>> San Diego Supercomputer Center
>> University of California, San Diego
>> San Diego, CA, U.S.A.
>>
>> On 11/26/12 4:18 PM, Christopher Brooks wrote:
>>> Hi Jianwu,
>>> Could you add these classes instead to the Kepler configuration?
>>> kepler/common/configs/ptolemy/configs/kepler/configuration.xml
>>>> <property name="_classesToRemove"
>>>> class="ptolemy.data.expr.Parameter"
>>>> value="{"ptolemy.codegen.kernel.StaticSchedulingCodeGenerator","\
>>>>
>>>> ;ptolemy.codegen.c.kernel.CCodeGenerator"}">
>>>> <doc>An array of Strings, where each element names
>>>> a class to be
>>>> removed by the MoMLFilter.</doc>
>>>> </property>
>>>
>>> If this will work, then maybe you could update
>>> RemoveGraphicalClasses and remove
>>> the kepler-specific classes and add a comment inside that method at
>>> the bottom that
>>> says to edit the above file?
>>>
>>> _Christopher
>>>
>>>
>>> On 11/26/12 4:10 PM, jianwu at eecs.berkeley.edu wrote:
>>>> Author: jianwu
>>>> Date: 2012-11-26 16:10:01 -0800 (Mon, 26 Nov 2012)
>>>> New Revision: 65117
>>>>
>>>> Modified:
>>>> trunk/ptolemy/moml/filter/RemoveGraphicalClasses.java
>>>> Log:
>>>> update RemoveGraphicalClasses to add two kepler display actor classes
>>>>
>>>> Modified: trunk/ptolemy/moml/filter/RemoveGraphicalClasses.java
>>>> ===================================================================
>>>> --- trunk/ptolemy/moml/filter/RemoveGraphicalClasses.java
>>>> 2012-11-26 17:24:55 UTC (rev 65116)
>>>> +++ trunk/ptolemy/moml/filter/RemoveGraphicalClasses.java
>>>> 2012-11-27 00:10:01 UTC (rev 65117)
>>>> @@ -378,6 +378,12 @@
>>>> "ptolemy.actor.lib.Discard");
>>>> _graphicalClasses.put("ptolemy.actor.lib.gui.MatrixViewer",
>>>> "ptolemy.actor.lib.Discard");
>>>> +
>>>> + //add two kepler display actors
>>>> +
>>>> _graphicalClasses.put("pl.psnc.kepler.common.actor.MultipleTabDisplay",
>>>>
>>>> + "ptolemy.actor.lib.Discard");
>>>> + _graphicalClasses.put("util.ImageJActor",
>>>> + "ptolemy.actor.lib.Discard");
>>>> }
>>>> /** Read in a MoML file, remove graphical classes and
>>>>
>>>> _______________________________________________
>>>> Ptexternal-cvs mailing list
>>>> Ptexternal-cvs at chess.eecs.berkeley.edu
>>>> http://chess.eecs.berkeley.edu/ptexternal/listinfo/ptexternal-cvs
>>>
>>
>
More information about the Kepler-dev
mailing list