[kepler-dev] Model Visualisation
R.P.Mciver at cs.cardiff.ac.uk
R.P.Mciver at cs.cardiff.ac.uk
Wed Nov 7 06:18:16 PST 2007
Hi Chris,
I'll have a look at trying to either removing references to the
missing packages, or having a go at gettting everything in ptolemy
built and see if that works for me.
Thanks again,
Russell
Quoting Christopher Brooks <cxh at eecs.berkeley.edu>:
> Hi Russell
>
> Yes, there presumably is a way.
>
> Basically, the classpath in ant would need to include the full ptolemy
> distribution. All of ptolemy would need to be built. There might be
> class conflicts in that Kepler has copies of classes that are in
> Ptolemy, so ptolemy should be in the classpath after kepler.
>
> Unfortunately, I'm strapped for time, so I don't have the bandwidth to
> hack around in Ant today. Maybe next week.
>
> If you really want to mess with the configurations, you could search
> the config files in ptolemy/configs and remove references to the
> offending packages as you find them.
>
> However, this seems a little far a field from what I suspect you
> really want to do, which is open models using your own configuration.
>
> _Christopher
>
>
> --------
>
> 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 use
> d
> > 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 t
> he
> > > list, I'll try not to waste people's time with
> pointless questi
> ons!
> > >
> > > 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 wi
> th
> > > 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 t
> hat
> > > I've ran into problems!
> > >
> > > Is there a simple way to create an instance of
> whatever class i
> t 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
> "runPanelConfigurati
> on"
> > > 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 mode
> l?
> > >
> > > 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.
>
>
> --------
>
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
More information about the Kepler-dev
mailing list