[kepler-dev] Model Visualisation

R.P.Mciver@cs.cardiff.ac.uk R.P.Mciver at cs.cardiff.ac.uk
Wed Nov 7 06:27:35 PST 2007


Hi Dan,

I can understand that packages may have been excluded if they cause
problems in Kepler.

I've been trying to utilise the configurations from ptolemy to get a
visualisation of models I'm creating. However on trying to execute
anything I get errors referring to missing class files, namely
ptolemy.actor.gui.run.InterfaceTableau$Factory

Having looked in the build directory of ptolemy it seems that none of
the classes from ptolemy.actor.gui.run have been built which is assume
is what is leading to problems when the configuration tries to access
them.

But if these classes are not being built as they cause problems, then
that may prove problematic in trying to get the configurations to
work. But I shall see what happens when I start playing about with it.

Russell

Quoting Dan Higgins <higgins at nceas.ucsb.edu>:

> Hi Russell,
>    In general, the Kepler ant target only excludes ptolemy packages
> that cause some compile problem in Kepler. So adding packages back may
> well not work. What packages seem to be missing?
>
> Dan Higgins
> NCEAS- UCSB
>
> R.P.Mciver at cs.cardiff.ac.uk wrote:
>> Hi Christopher,
>>
>> Thanks again for the advice. I'm building Kepler with ant, and I'm   
>>   definately thinking that the problem is where some of the  
>> packages    from ptolemy aren't being built - the ptiny  
>> configuration gives  the   same complaint about missing ptolemy  
>> class files.
>>
>> Is there a way to build everything in ptolemy so that these classes  
>>    won't be missed?
>>
>> Thanks,
>>
>> Russell
>>
>> Quoting Christopher Brooks <cxh at eecs.berkeley.edu>:
>>
>>
>>> Hi Russell,
>>>
>>> About applets, applets can only read files that are in the codebase or
>>> document base of the applet.  So, if your file is elsewhere on the
>>> server, you probably can't read it.
>>>
>>> See:
>>> http://java.sun.com/docs/books/tutorial/deployment/applet/data.html
>>>
>>> See also
>>> $PTII/doc/coding/applet.htm
>>>
>>> About the configuration:
>>>
>>> How are you building Kepler?  Using ant or using Eclipse?
>>> My guess is that Kepler is not building the ptolemy.actor.gui.run
>>> package.
>>>
>>> This error probably appears because the full configuration includes
>>> ptolemy/configs/graphTableauFactory.xml, which includes
>>> ptolemy.actor.gui.run.InterfaceTableau$Factory.
>>>
>>> It will likely be tricky to get the "full" configuration to work
>>> within Kepler unless you include all of a regular build of Ptolemy in
>>> the classpath.
>>>
>>> "ant run" invokes org.kepler.gui.KeplerApplication, which
>>> brings up the splash screen and invokes
>>> ptolemy.vergil.VergilApplication.main()
>>> and passes it the -kepler arg.
>>> I _think_ that VergilApplication then finds
>>> $KEPLER/configs/ptolemy/configs/kepler/configuration.xml
>>>
>>> Also, under Kepler, you could try working with the ptiny configuration
>>> instead of full
>>>
>>> _Christopher
>>>
>>> --------
>>>
>>>    Hi Christopher,
>>>
>>>    Thanks for the help I think I'm getting somewhere now, although I'm
>>>    still having a few troubles.
>>>
>>>    I've tried simply using MoMLAppletViewer to view a model but I always
>>>    get the error:
>>>
>>>    "Creation of model failed:
>>>
>>>    access denied (java.io.FilePermission "mymodelfilehere" read) "
>>>
>>>    There's no obvious reason I can think of why the applet should be
>>>    denied access to the model files, as PtolemyApplet has no issues in
>>>    reading them. Any ideas why this might be happening?
>>>
>>>    The second problem I've run in to, I've tried changing my code to the
>>>    following in order use the "full" Configuration:
>>>
>>>    URL specificationURL =
>>>         
>>> MoMLApplication.specToURL("C:/ptII/ptolemy/configs/full/configuration.xml")
>>>   ;
>>>    configuration = MoMLApplication.readConfiguration(specificationURL);
>>>
>>>    Which compiles fine but gives me an error when I try to run it:
>>>
>>>    com.microstar.xml.XmlException: XML element "property" triggers
>>>    exception. in file:/C:/ptII/build/classes/ptol
>>>    emy/configs/graphTableauFactory.xml at line 12 and column 65
>>>    Caused by:
>>>      java.lang.ClassNotFoundException:
>>>    ptolemy.actor.gui.run.InterfaceTableau$Factory
>>>             ...
>>>    Caused by: java.lang.ClassNotFoundException:
>>>    ptolemy.actor.gui.run.InterfaceTableau$Factory
>>>             ...
>>>    Caused by: java.lang.ClassNotFoundException:
>>>    ptolemy.actor.gui.run.InterfaceTableau$Factory
>>>             ...
>>>
>>>    Which I can see is caused because there's no class file for the
>>>    InterfaceTableau$Factory, but surely if this is the configuration used
>>>    by the rest of ptolemy/kepler then why does this problem not occur
>>>    when I run those?
>>>
>>>    Again any help would be greatly appreciated!
>>>
>>>    Thanks,
>>>
>>>    Russell
>>>
>>>    Quoting Christopher Brooks <cxh at eecs.berkeley.edu>:
>>>
>>>    > Hi Russell,
>>>    >
>>>    > Here's a quick run down:
>>>    >
>>>    > Kepler uses Ptolemy classes.
>>>    >
>>>    > Ptolemy uses "Configurations" to determine how to display models.
>>>    > The run panel is one such configuration.  Another configuration
>>>    > displays the model graphically.
>>>    >
>>>    > In Ptolemy $PTII/ptolemy/vergil/VergilApplication.java is the
>>>    > class that reads in the configuration file from
>>>    > $PTII/ptolemy/configs/full/ and displays the model
>>>    > VergilApplication extends ptolemy.actor.gui.MoMLApplication.
>>>    > MoMLApplication opens the model.
>>>    >
>>>    > ptolemy.actor.gui.PtolemyApplication also extends MoMLApplication,
>>>    > but brings up the run control panel.
>>>    >
>>>    > So, I suspect that you don't have the configuration set properly.
>>>    >
>>>    > Take a look at VergilApplication and see what you think.
>>>    >
>>>    > See also ptolemy/vergil/MoMLViewerApplet.java for a somewhat hacky way
>>>    > that is used to display applets.  This code gives a rough overview
>>>    > of how the model is displayed, though it is not a complete model
>>>    > viewer, as "look inside" does not work in applets.
>>>    >
>>>    > _Christopher
>>>    >
>>>    >
>>>    >
>>>    > --------
>>>    >
>>>    >     Hey there,
>>>    >
>>>    >     I'm new to kepler development and this is my first message to the
>>>    >     list, I'll try not to waste people's time with pointless   
>>>  questions!
>>>    >
>>>    >     I've been working on programatically defining workflow    
>>> models, with
>>>    >     varying degrees of success, primarily as a means of      
>>> understanding mor
>>>   e
>>>    >     about how the kepler system works (and also how it interacts with
>>>    >     ptolemy). This has proved an interesting and useful task,  
>>>     however I'v
>>>   e
>>>    >     been trying to implement a simple means of providing a     
>>>  visualisation
>>>    >     of the models that my code has been generating, and it's here that
>>>    >     I've ran into problems!
>>>    >
>>>    >     Is there a simple way to create an instance of whatever    
>>> class it is
>>>    >     that normally displays the workflow models within kepler   
>>>    and getting
>>>    >     this to display my workflows?
>>>    >
>>>    >     I've tried using Configuration.openModel(myModel) to    
>>> bring  something
>>>    >     up, but can only get this to work with the "runPanelConfiguration"
>>>    >     from ptolemy, which doesn't give me what I want.
>>>    >
>>>    >     At the moment I can view my models by getting the code to  
>>>     save them t
>>>   o
>>>    >     xml files and then loading them directly into kepler.      
>>> However for wan
>>>   t
>>>    >     I would like to do later I would rather have the      
>>> visualisation remain
>>>    >     seperate.
>>>    >
>>>    >     Am I going about this in the right way? Or is there something I've
>>>    >     missed about how to bring up a visualisation of a workflow model?
>>>    >
>>>    >     Thanks to anyone who can help!
>>>    >     Russell
>>>    >
>>>    >     ----------------------------------------------------------------
>>>    >     This message was sent using IMP, the Internet Messaging Program.
>>>    >
>>>    >
>>>    >     _______________________________________________
>>>    >     Kepler-dev mailing list
>>>    >     Kepler-dev at ecoinformatics.org
>>>    >          
>>> http://mercury.nceas.ucsb.edu/ecoinformatics/mailman/listinfo/kepler-
>>>   dev
>>>    > --------
>>>    >
>>>
>>>
>>>
>>>    ----------------------------------------------------------------
>>>    This message was sent using IMP, the Internet Messaging Program.
>>>
>>>
>>> --------
>>>
>>>
>>
>>
>>
>> ----------------------------------------------------------------
>> This message was sent using IMP, the Internet Messaging Program.
>>
>>
>> _______________________________________________
>> Kepler-dev mailing list
>> Kepler-dev at ecoinformatics.org
>> http://mercury.nceas.ucsb.edu/ecoinformatics/mailman/listinfo/kepler-dev
>>
>>
>
>
> -- 
> *******************************************************************
> Dan Higgins                                  higgins at nceas.ucsb.edu
> http://www.nceas.ucsb.edu/    Ph: 805-893-5127
> National Center for Ecological Analysis and Synthesis (NCEAS) Marine
> Science Building - Room 3405
> Santa Barbara, CA 93195
> *******************************************************************



----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.




More information about the Kepler-dev mailing list