From 63eef6460b057a335ecd3b1d74a6a792a919576d Mon Sep 17 00:00:00 2001 From: zunavac1 Date: Mon, 8 Nov 2010 13:31:29 +0100 Subject: [PATCH] Added JGraph -> Diagram conversion. Diagram is our own custom class that will be used as the data source for the export feature. --- IndependentModeler/epcXHTMLExportModule.properties | 2 +- .../EPC2XHTMLExport/engine/ExporterEngine.java | 21 ++++++++++-- .../cvut/promod/EPC2XHTMLExport/engine/Link.java | 38 ++++++++++++++++++++++ .../EPC2XHTMLExport/engine/UserAttribute.java | 32 ------------------ 4 files changed, 58 insertions(+), 35 deletions(-) delete mode 100644 Plugins/EPC/ModuleEPC2XHTMLExport/src/cz/cvut/promod/EPC2XHTMLExport/engine/UserAttribute.java diff --git a/IndependentModeler/epcXHTMLExportModule.properties b/IndependentModeler/epcXHTMLExportModule.properties index cdbdc4e..7210390 100644 --- a/IndependentModeler/epcXHTMLExportModule.properties +++ b/IndependentModeler/epcXHTMLExportModule.properties @@ -1,5 +1,5 @@ # -#Sun Nov 07 13:37:18 CET 2010 +#Mon Nov 08 13:30:02 CET 2010 epc.export.xhtml.description=A module for XHTML export (using SVG) of diagrams defined by EPC Notation (EPCNotation plugin). epc.export.xhtml.identifier=EPC2XHTMLExport epc.export.xhtml.config.openwithpath=Choose an application... diff --git a/Plugins/EPC/ModuleEPC2XHTMLExport/src/cz/cvut/promod/EPC2XHTMLExport/engine/ExporterEngine.java b/Plugins/EPC/ModuleEPC2XHTMLExport/src/cz/cvut/promod/EPC2XHTMLExport/engine/ExporterEngine.java index 8bd3d46..4d06b9c 100644 --- a/Plugins/EPC/ModuleEPC2XHTMLExport/src/cz/cvut/promod/EPC2XHTMLExport/engine/ExporterEngine.java +++ b/Plugins/EPC/ModuleEPC2XHTMLExport/src/cz/cvut/promod/EPC2XHTMLExport/engine/ExporterEngine.java @@ -29,6 +29,7 @@ import org.apache.log4j.Logger; import java.io.BufferedWriter; import java.io.FileWriter; import java.io.IOException; +import java.util.ArrayList; /** * Created by IntelliJ IDEA. @@ -51,12 +52,13 @@ public class ExporterEngine { } public boolean export() { - // serious business here + + Diagram diagram = new Diagram(workspace.getGraph().getModel(), "diagram_name"); try { Renderer renderer = new InlineRenderer(settings.getPath(), "Filename","Title", "classicBlackTheme"); renderer.render(); - + /* BufferedWriter out = new BufferedWriter(new FileWriter(settings.getPath())); @@ -91,3 +93,18 @@ public class ExporterEngine { return true; } } + +/* +epc.info.title = Info +epc.info.cat.logics = Logics +epc.info.cat.general = Generals +epc.info.condition = Condition +epc.info.condition.top = Condition TOP +epc.info.condition.bottom = Condition BOTTOM +epc.info.cat.notes = Notes +epc.info.cat.type = Type +epc.info.type = Type +epc.info.note = Note +epc.info.name = Name +epc.info.uuid = UUID +*/ \ No newline at end of file diff --git a/Plugins/EPC/ModuleEPC2XHTMLExport/src/cz/cvut/promod/EPC2XHTMLExport/engine/Link.java b/Plugins/EPC/ModuleEPC2XHTMLExport/src/cz/cvut/promod/EPC2XHTMLExport/engine/Link.java index 1495b44..5f569ac 100644 --- a/Plugins/EPC/ModuleEPC2XHTMLExport/src/cz/cvut/promod/EPC2XHTMLExport/engine/Link.java +++ b/Plugins/EPC/ModuleEPC2XHTMLExport/src/cz/cvut/promod/EPC2XHTMLExport/engine/Link.java @@ -22,6 +22,8 @@ package cz.cvut.promod.EPC2XHTMLExport.engine; +import java.util.ArrayList; + /** * Created by IntelliJ IDEA. * User: Vaclav Zuna @@ -29,4 +31,40 @@ package cz.cvut.promod.EPC2XHTMLExport.engine; * Time: 4:03:41 PM */ public class Link { + + public enum Type { + eControl, + eOrganization, + eInformation, + eInformationService, + eMaterial + } + + protected Type m_type; + protected Node m_to; + protected String m_name; + protected String m_note; + + public Link(Type type, Node to, String name, String note) { + m_type = type; + m_to = to; + m_name = name; + m_note = note; + } + + public Type getType() { + return m_type; + } + + public Node getTo() { + return m_to; + } + + public String getName() { + return m_name; + } + + public String getNote() { + return m_note; + } } diff --git a/Plugins/EPC/ModuleEPC2XHTMLExport/src/cz/cvut/promod/EPC2XHTMLExport/engine/UserAttribute.java b/Plugins/EPC/ModuleEPC2XHTMLExport/src/cz/cvut/promod/EPC2XHTMLExport/engine/UserAttribute.java deleted file mode 100644 index 75b3353..0000000 --- a/Plugins/EPC/ModuleEPC2XHTMLExport/src/cz/cvut/promod/EPC2XHTMLExport/engine/UserAttribute.java +++ /dev/null @@ -1,32 +0,0 @@ -/**************************************************************************** -** This file may be used under the terms of the MIT licence: -** -** Permission is hereby granted, free of charge, to any person obtaining a copy -** of this software and associated documentation files (the "Software"), to deal -** in the Software without restriction, including without limitation the rights -** to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -** copies of the Software, and to permit persons to whom the Software is -** furnished to do so, subject to the following conditions: -** -** The above copyright notice and this permission notice shall be included in -** all copies or substantial portions of the Software. -** -** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -** FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -** AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -** LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -** OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -** THE SOFTWARE. -****************************************************************************/ - -package cz.cvut.promod.EPC2XHTMLExport.engine; - -/** - * Created by IntelliJ IDEA. - * User: Vaclav Zuna - * Date: Oct 6, 2010 - * Time: 4:04:13 PM - */ -public class UserAttribute { -} -- 2.11.4.GIT