Open rensink opened 10 years ago
This is definitely the right place.
Unfortunately, the GXL import is not very stable, as you noticed.
If you explicitly provide the namespace in the gxl tag of your .gxl, as in
<gxl xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.gupro.de/GXL/gxl-1.0.dtd">
then you will get a little bit further. Unfortunately, I do not count myself as xml expert, I do not know how to make the unmarshaller understand that this is supposed to be the default namespace.
The only documentation I can offer is the MSc thesis in which all this is described: see http://fmt.cs.utwente.nl/files/sprojects/142.pdf
Original comment by: rensink
Thank you for the quick response and for the documentation.
Considering the initial issue, as mentioned I already tried to manually add the namespace in the gxl. When trying to import the updated xml file in groove's simulator, no more error occur and the "config dialog" pop. However, when clicking on "ok", nothing happen and the graph does not seem to be, in fact, imported.
When importing and before the appearance of the "config dialog", the following messages are printed in the terminal used to launch the simulator :
JAXFront Property URL:jar:file:"path"/groove-4_9_3/lib/jaxfront/jaxfront-core.jar!/jaxfront.xml init properties from:jar:file:"path"/groove-4_9_3/lib/jaxfront/jaxfront-core.jar!/jaxfront.xml Initialize JAXFront Property: jaxfront.language.country value: [CH] Initialize JAXFront Property: jaxfront.handleOnlySpacesAsNull value: [false] Initialize JAXFront Property: jaxfront.useEmbeddedNLS value: [false] Initialize JAXFront Property: jaxfront.ignoreNameSpace value: [false] Initialize JAXFront Property: jaxfront.date.pattern value: [dd.MM.yyyy, yyyy/MM/dd, dd.MM.yyyy, dd.MM.yyyy] Initialize JAXFront Property: jaxfront.dateTime.pattern value: [dd.MM.yyyy hh:mm:ss, yyyy/MM/dd HH:mm:ss, dd.MM.yyyy hh:mm:ss, dd.MM.yyyy hh:mm:ss] Initialize JAXFront Property: jaxfront.time.pattern value: [hh:mm:ss, HH:mm:ss, hh:mm:ss, hh:mm:ss] Initialize JAXFront Property: jaxfront.askForExit value: [true] Initialize JAXFront Property: jaxfront.bindOnlyAvailable value: [false] Initialize JAXFront Property: jaxfront.systemExit value: [true] Initialize JAXFront Property: jaxfront.serialize.xsdURLRelative value: [true] Initialize JAXFront Property: jaxfront.ui.useGlobalUIDefinitions value: [true] Initialize JAXFront Property: jaxfront.jndiMailLookup value: [] Initialize JAXFront Property: jaxfront.directory.location value: [http://localhost:8080/jaxfront-appserver/directory/] Initialize JAXFront Property: jaxfront.directory.location.offline value: [directory/] Initialize JAXFront Property: jaxfront.directory.xsd value: [directory.xsd] Initialize JAXFront Property: jaxfront.treeFolderFont value: [sansserif,bold] Initialize JAXFront Property: jaxfront.titleBorderFont value: [sansserif,bold] Initialize JAXFront Property: jaxfront.captionFont value: [sansserif,bold] Initialize JAXFront Property: xuiEditor.lookAndFeel value: [com.jgoodies.looks.plastic.PlasticXPLookAndFeel] Initialize JAXFront Property: jaxfront.defaultXMLFileEncoding value: [UTF-8] Initialize JAXFront Property: jaxfront.ui.useXUINameLookup value: [false] Initialize JAXFront Property: jaxfront.ui.useXUICache value: [true] Initialize JAXFront Property: jaxfront.ui.useXSDCache value: [true] Initialize JAXFront Property: jaxfront.useEditingTypeCache value: [true] Initialize JAXFront Property: jaxfront.defaultFileEncoding value: [UTF-8] Initialize JAXFront Property: jaxfront.useNLS value: [true] Initialize JAXFront Property: jaxfront.languages value: [de, fr, it, en] Initialize JAXFront Property: jaxfront.language value: [en] Initialize JAXFront Property: jaxfront.uiFactory value: [com.jaxfront.swing.ui.visualizers.JavaSwingFactory] Initialize JAXFront Property: xuiEditor.xui value: [xui.xui] Initialize JAXFront Property: xuieditor.sortXUIDefinitions value: [true] Initialize JAXFront Property: xuiEditor.schema value: [xui.xsd] Initialize JAXFront Property: xuiEditor.root value: [XUI] Initialize JAXFront Property: jaxfront.propertyFile value: [jaxfront-properties-$version.xml] Initialize JAXFront Property: jaxfront.html.location value: [http://localhost:8080/jaxfront/JAXFrontServlet?app=jaxfront&action=loadjaxfront] Initialize JAXFront Property: jaxfront.html.useMDI value: [false] Initialize JAXFront Property: jaxfront.html.useXSDControllerLookup value: [true] Initialize JAXFront Property: jaxfront.html.styleName value: [style/default/css/jaxfront.css] Initialize JAXFront Property: jaxfront.lastFileCounter value: [10] Initialize JAXFront Property: jaxfront.functionsFile value: [config/functions.xml] Initialize JAXFront Property: xuiEditor.expertMode value: [true] Initialize JAXFront Property: jaxfront.messageTableCellRenderer value: [com.jaxfront.swing.ui.tools.MessageTableCellRenderer] Initialize JAXFront Property: com.jaxfront.swing.ui.visualizers.PagingView value: [com.jaxfront.swing.ui.visualizers.PagingView] Initialize JAXFront Property: jaxfront.logTool value: [Log4J] Initialize JAXFront Property: jaxfront.html.controller value: [] Initialize JAXFront Property: jaxfront.html.popUpAction value: [com.jaxfront.html.action.DefaultPopUpAction] Initialize JAXFront Property: jaxfront.html.popUpAnchorAction value: [com.jaxfront.html.action.DefaultPopUpAnchorAction] Initialize JAXFront Property: jaxfront.urlbase value: [] Initialize JAXFront Property: xuiEditor.tree.showInstanceData value: [true] Initialize JAXFront Property: jaxfront.license.location value: [] Initialize JAXFront Property: jaxfront.urlResolver value: [com.jaxfront.core.util.DefaultURLResourceResolver] Initialize JAXFront Property: jaxfront.log.enabled value: [true] Initialize JAXFront Property: jaxfront.log.level value: [error] Initialize JAXFront Property: jaxfront.useOptimizedXPathEngine value: [true]
Original comment by: ceichler
Yes, I now see your initial remark that you tried this. Sorry for overlooking that.
There are two other issues that prevent this from working:
the GROOVE importer assumes that the type and instance graphs are in one and the same file
The importer breaks on spaces in type names, such as the ones in the example schema on the link you included; e.g., <string> Call</string>
If you manually include the instance graph into the file with the type definition, and manually remove all those spaces, then in fact you will get an imported graph that looks reasonable to me.
The dialog in principle allows you to tune the way the gxl graphs are represented in GROOVE. Unfortunately it pops up all the time, and it spews out all those messages on stdout. This is actually due to the library used to create the dialog (jaxfront).
It's all far from ideal, I'm afraid; and I do not have time to improve the situation at the moment. Still, I'm curious to know if you get anything at all now, and if there are other small things I can help with, I'm ready to try.
Yours, Arend
Original comment by: rensink
My bad, quoting errors within the text dilute the message.
After removing spaces in type names, 'dummy' example files containing both type and instance graphs did successfully load.
However, when trying to import files created through AGG's export function (after taking care of spacenames and spaces), the error reported in post scriptum occurs. Even though I am not 100% sure, I reckon that AGG's export is error free, so that the issue may indeed come from groove. I'm afraid I'll have to postpone my groove's usage due to approaching deadlines. Provided that your are interested, I'll come back to you if I come up with a satisfying and clean solution regarding exchanges of graphs from AGG to groove.
Thx for your time and help, Cheers, Cédric
xception in GROOVE java.lang.NullPointerException at groove.io.conceptual.lang.gxl.GxlUtil.getElemType(GxlUtil.java:268) at groove.io.conceptual.lang.gxl.GxlToType.
(GxlToType.java:117) at groove.io.external.format.GxlPorter.importTypeModel(GxlPorter.java:45) at groove.io.external.ConceptualPorter.doImport(ConceptualPorter.java:73) at groove.io.external.Importers.doChosenImport(Importers.java:78) at groove.io.external.Importers.doImport(Importers.java:65) at groove.gui.action.ImportAction.execute(ImportAction.java:22) at groove.gui.action.SimulatorAction.actionPerformed(SimulatorAction.java:231) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242) at javax.swing.AbstractButton.doClick(AbstractButton.java:357) at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:809) at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:850) at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272) at java.awt.Component.processMouseEvent(Component.java:6288) at javax.swing.JComponent.processMouseEvent(JComponent.java:3267) at java.awt.Component.processEvent(Component.java:6053) at java.awt.Container.processEvent(Container.java:2041) at java.awt.Component.dispatchEventImpl(Component.java:4651) at java.awt.Container.dispatchEventImpl(Container.java:2099) at java.awt.Component.dispatchEvent(Component.java:4481) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168) at java.awt.Container.dispatchEventImpl(Container.java:2085) at java.awt.Window.dispatchEventImpl(Window.java:2478) at java.awt.Component.dispatchEvent(Component.java:4481) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:643) at java.awt.EventQueue.access$000(EventQueue.java:84) at java.awt.EventQueue$1.run(EventQueue.java:602) at java.awt.EventQueue$1.run(EventQueue.java:600) at java.security.AccessController.doPrivileged(Native Method) at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87) at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98) at java.awt.EventQueue$2.run(EventQueue.java:616) at java.awt.EventQueue$2.run(EventQueue.java:614) at java.security.AccessController.doPrivileged(Native Method) at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87) at java.awt.EventQueue.dispatchEvent(EventQueue.java:613) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161) at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Original comment by: ceichler
If you attach the graph, I can look into it. Offhand I'd agree that the likelihood of errors in (this part of) GROOVE is larger than for AGG. --Arend
Original comment by: rensink
Enclosed is the concerned graph, titled "example.gxl".
By the way,to know groove's accepted syntax, I wanted to export something created in groove to gxl (see attachment, "attributedGrammar.gps"). While exporting the type graph works fine, trying to export the start graph raises the following error :
Exception in GROOVE java.lang.ClassCastException: de.gupro.gxl.gxl_1_0.NodeType cannot be cast to javax.xml.bind.JAXBElement at groove.io.conceptual.lang.gxl.InstanceToGxl.visit(InstanceToGxl.java:227) at groove.io.conceptual.value.ContainerValue.doVisit(ContainerValue.java:27) at groove.io.conceptual.lang.InstanceExporter.getElement(InstanceExporter.java:85) at groove.io.conceptual.lang.InstanceExporter.getElement(InstanceExporter.java:80) at groove.io.conceptual.lang.gxl.InstanceToGxl.visit(InstanceToGxl.java:114) at groove.io.conceptual.value.Object.doVisit(Object.java:96) at groove.io.conceptual.lang.InstanceExporter.getElement(InstanceExporter.java:85) at groove.io.conceptual.lang.InstanceExporter.getElement(InstanceExporter.java:80) at groove.io.conceptual.lang.gxl.InstanceToGxl.visit(InstanceToGxl.java:227) at groove.io.conceptual.value.ContainerValue.doVisit(ContainerValue.java:27) at groove.io.conceptual.lang.InstanceExporter.getElement(InstanceExporter.java:85) at groove.io.conceptual.lang.InstanceExporter.getElement(InstanceExporter.java:80) at groove.io.conceptual.lang.gxl.InstanceToGxl.visit(InstanceToGxl.java:114) at groove.io.conceptual.value.Object.doVisit(Object.java:96) at groove.io.conceptual.lang.InstanceExporter.getElement(InstanceExporter.java:85) at groove.io.conceptual.lang.InstanceExporter.getElement(InstanceExporter.java:80) at groove.io.conceptual.lang.gxl.InstanceToGxl.visit(InstanceToGxl.java:227) at groove.io.conceptual.value.ContainerValue.doVisit(ContainerValue.java:27) at groove.io.conceptual.lang.InstanceExporter.getElement(InstanceExporter.java:85) at groove.io.conceptual.lang.InstanceExporter.getElement(InstanceExporter.java:80) at groove.io.conceptual.lang.gxl.InstanceToGxl.visit(InstanceToGxl.java:114) at groove.io.conceptual.value.Object.doVisit(Object.java:96) at groove.io.conceptual.lang.InstanceExporter.getElement(InstanceExporter.java:85) at groove.io.conceptual.lang.InstanceExporter.getElement(InstanceExporter.java:80) at groove.io.conceptual.lang.InstanceExporter.visitInstanceModel(InstanceExporter.java:107) at groove.io.conceptual.lang.gxl.InstanceToGxl.addInstanceModel(InstanceToGxl.java:82) at groove.io.external.format.GxlPorter.getResource(GxlPorter.java:71) at groove.io.external.ConceptualPorter.doExport(ConceptualPorter.java:152) at groove.io.external.Exporters.doExport(Exporters.java:83) at groove.gui.action.ExportAction.execute(ExportAction.java:65) at groove.gui.action.SimulatorAction.actionPerformed(SimulatorAction.java:231) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242) at javax.swing.AbstractButton.doClick(AbstractButton.java:357) at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:809) at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:850) at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272) at java.awt.Component.processMouseEvent(Component.java:6288) at javax.swing.JComponent.processMouseEvent(JComponent.java:3267) at java.awt.Component.processEvent(Component.java:6053) at java.awt.Container.processEvent(Container.java:2041) at java.awt.Component.dispatchEventImpl(Component.java:4651) at java.awt.Container.dispatchEventImpl(Container.java:2099) at java.awt.Component.dispatchEvent(Component.java:4481) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168) at java.awt.Container.dispatchEventImpl(Container.java:2085) at java.awt.Window.dispatchEventImpl(Window.java:2478) at java.awt.Component.dispatchEvent(Component.java:4481) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:643) at java.awt.EventQueue.access$000(EventQueue.java:84) at java.awt.EventQueue$1.run(EventQueue.java:602) at java.awt.EventQueue$1.run(EventQueue.java:600) at java.security.AccessController.doPrivileged(Native Method) at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87) at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98) at java.awt.EventQueue$2.run(EventQueue.java:616) at java.awt.EventQueue$2.run(EventQueue.java:614) at java.security.AccessController.doPrivileged(Native Method) at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87) at java.awt.EventQueue.dispatchEvent(EventQueue.java:613) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161) at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Original comment by: ceichler
Forgot groove's grammar that fail to export
Original comment by: ceichler
Hello, I constantly fail to import graph in GXL format. My initial aim was to import in groove graphs created and saved in gxl using AGG. The following error shows up :
As a first resolution attempt, I manually added the xml namespace "http://www.gupro.de/GXL/gxl-1.0.dtd" in the gxl file. When trying to import, the config dialog box pops, but nothing happens after acceptation.
To test on an example "guaranteed to be well formed" I tried to import the example provided in http://www.gupro.de/GXL/examples/schema/gxl/simpleExample/content.html. It throws :
Finally, I tried to export an instance graph created in groove to GXL in order to compare the xml files. I keep getting :
I'm unsure to post in the right place, but any help would be much welcomed. Is there in particular any user manual detailing the procedure to import/export (I couldn't find any details on these operations)?
Kind regards, Cédric Eichler
Reported by: ceichler