├── .classpath
├── .github
└── workflows
│ └── ant.yml
├── .project
├── ProM.ini
├── build.xml
├── ivy.xml
├── ivysettings.xml
├── latestrelease
├── ProM-Framework-6.14.45-all.zip
├── ProM-Framework.jar
├── ProM.ini
├── ivy.xml
├── lib
│ ├── TableLayout-20050920.jar
│ ├── commons-compress-1.13.jar
│ ├── commons-logging-1.1.3.jar
│ ├── images
│ │ └── logo_branding.png
│ ├── jargs-latest.jar
│ ├── jgraph-5.13.0.4.jar
│ └── slickerbox-1.0rc1.jar
└── packages.xml
├── lib
└── images
│ └── logo_branding.png
├── src
└── org
│ └── processmining
│ └── framework
│ ├── ProMID.java
│ ├── abstractplugins
│ ├── AbstractImportPlugin.java
│ └── ImportPlugin.java
│ ├── annotations
│ ├── AuthoredType.java
│ ├── Icon.java
│ └── TestMethod.java
│ ├── boot
│ ├── AddJarsForPackageRunnable.java
│ ├── Boot.java
│ └── PathHackerRunnable.java
│ ├── connections
│ ├── Connection.java
│ ├── ConnectionAnnotation.java
│ ├── ConnectionCannotBeObtained.java
│ ├── ConnectionID.java
│ ├── ConnectionManager.java
│ ├── DynamicConnection.java
│ ├── annotations
│ │ ├── ConnectionDoesntExistMessage.java
│ │ └── ConnectionObjectFactory.java
│ └── impl
│ │ ├── AbstractConnection.java
│ │ ├── AbstractStrongReferencingConnection.java
│ │ ├── ConnectionIDImpl.java
│ │ └── ConnectionManagerImpl.java
│ ├── packages
│ ├── CommandLineInterface.java
│ ├── PackageDescriptor.java
│ ├── PackageManager.java
│ ├── PackageSet.java
│ ├── PackageStateReport.java
│ ├── PackageVersion.java
│ ├── Repository.java
│ ├── UnknownPackageException.java
│ ├── UnknownPackageTypeException.java
│ ├── events
│ │ └── PackageManagerListener.java
│ └── impl
│ │ ├── CancelledException.java
│ │ └── PackageConfigPerister.java
│ ├── plugin
│ ├── GlobalContext.java
│ ├── InSufficientResultException.java
│ ├── IncorrectReturnTypeException.java
│ ├── ObjectConstructor.java
│ ├── PluginContext.java
│ ├── PluginContextID.java
│ ├── PluginDescriptor.java
│ ├── PluginDescriptorID.java
│ ├── PluginExecutionResult.java
│ ├── PluginManager.java
│ ├── PluginParameterBinding.java
│ ├── ProMCanceller.java
│ ├── ProMFuture.java
│ ├── Progress.java
│ ├── RecursiveCallException.java
│ ├── annotations
│ │ ├── Bootable.java
│ │ ├── CLI.java
│ │ ├── KeepInProMCache.java
│ │ ├── Plugin.java
│ │ ├── PluginCategory.java
│ │ ├── PluginLevel.java
│ │ ├── PluginQuality.java
│ │ └── PluginVariant.java
│ ├── events
│ │ ├── ConnectionObjectListener.java
│ │ ├── FutureListener.java
│ │ ├── Logger.java
│ │ ├── NameChangeListener.java
│ │ ├── PluginLifeCycleEventListener.java
│ │ ├── ProMEventListenerList.java
│ │ ├── ProgressEventListener.java
│ │ └── ProvidedObjectLifeCycleListener.java
│ └── impl
│ │ ├── AbstractGlobalContext.java
│ │ ├── AbstractPluginContext.java
│ │ ├── AbstractPluginDescriptor.java
│ │ ├── DependsOnUnknownException.java
│ │ ├── FieldNotSetException.java
│ │ ├── FieldSetException.java
│ │ ├── PluginCacheEntry.java
│ │ ├── PluginContextIDImpl.java
│ │ ├── PluginDescriptorIDImpl.java
│ │ ├── PluginDescriptorImpl.java
│ │ ├── PluginExecutionResultImpl.java
│ │ ├── PluginManagerImpl.java
│ │ └── ProgressBarImpl.java
│ ├── providedobjects
│ ├── ContextAwareObject.java
│ ├── ProvidedObject.java
│ ├── ProvidedObjectDeletedException.java
│ ├── ProvidedObjectID.java
│ ├── ProvidedObjectManager.java
│ ├── SubstitutionType.java
│ └── impl
│ │ ├── ProvidedObjectIDImpl.java
│ │ ├── ProvidedObjectImpl.java
│ │ └── ProvidedObjectManagerImpl.java
│ └── util
│ ├── ArrayUtils.java
│ ├── AutoHelpCommandLineParser.java
│ ├── Cast.java
│ ├── Cleanable.java
│ ├── CommandLineArgumentList.java
│ ├── HTMLToString.java
│ ├── IconLoader.java
│ ├── LevenshteinDistance.java
│ ├── OsUtil.java
│ ├── Pair.java
│ ├── PathHacker.java
│ ├── ProMClassLoader.java
│ ├── StringUtils.java
│ ├── WeakValueHashMap.java
│ ├── collection
│ ├── AbstractMultiSet.java
│ ├── AlphanumComparator.java
│ ├── ComparablePair.java
│ ├── HashMultiSet.java
│ ├── LinkedHashMultiSet.java
│ ├── MultiSet.java
│ ├── SortedMultiSet.java
│ ├── TreeMultiSet.java
│ └── WeakKeyValueMap.java
│ ├── progress
│ ├── XMonitoredInputStream.java
│ ├── XProgressBarListener.java
│ └── XProgressListener.java
│ ├── search
│ ├── BreadthFirstExpandCollection.java
│ ├── DepthFirstExpandCollection.java
│ ├── ExpandCollection.java
│ ├── MultiThreadedSearcher.java
│ └── NodeExpander.java
│ ├── socket
│ ├── Service.java
│ ├── ServiceEnvironment.java
│ └── ServiceHandler.java
│ └── ui
│ ├── ExpandButton.java
│ ├── SlickerConsole.java
│ ├── SlickerMessageBar.java
│ └── TypeToggleButton.java
└── tests
├── build.xml
├── src-test
└── org
│ └── processmining
│ └── tests
│ └── framework
│ └── FrameworkUtilCollectionsTest.java
└── test.properties
/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/.github/workflows/ant.yml:
--------------------------------------------------------------------------------
1 | # This workflow will build a Java project with Ant
2 | # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-ant
3 |
4 | name: Java CI
5 |
6 | on:
7 | push:
8 | branches: [ "main" ]
9 | pull_request:
10 | branches: [ "main" ]
11 | workflow_dispatch:
12 |
13 | jobs:
14 | build:
15 |
16 | runs-on: ubuntu-latest
17 |
18 | steps:
19 | - uses: actions/checkout@v3
20 | with:
21 | fetch-depth: 0
22 | - name: Set up JDK 11
23 | uses: actions/setup-java@v3
24 | with:
25 | java-version: '11'
26 | distribution: 'temurin'
27 | - name: Build with Ant
28 | run: ant -noinput -buildfile build.xml buildHudson
29 | env:
30 | bytecode_format: ${{ vars.BYTECODE_FORMAT }}
31 | major_minor: ${{ vars.MAJOR_MINOR }}
32 | - name: Upload build result
33 | uses: actions/upload-artifact@v3
34 | with:
35 | name: release
36 | path: latestrelease/
37 | - name: Commit files
38 | run: |
39 | git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
40 | git config --local user.name "github-actions[bot]"
41 | git add latestrelease/
42 | git commit -m "Add changes"
43 | - name: Push changes
44 | uses: ad-m/github-push-action@master
45 | with:
46 | branch: ${{ github.ref }}
47 |
--------------------------------------------------------------------------------
/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | ProM-Framework
4 |
5 |
6 |
7 |
8 |
9 | org.eclipse.jdt.core.javabuilder
10 |
11 |
12 |
13 |
14 |
15 | org.eclipse.jdt.core.javanature
16 | org.apache.ivyde.eclipse.ivynature
17 |
18 |
19 |
--------------------------------------------------------------------------------
/ProM.ini:
--------------------------------------------------------------------------------
1 | # This file contains information about this ProM release
2 | # it points ProM to the right packages and keeps version
3 | # information
4 | #
5 | # Folders should be separated using "/" (forward slash).
6 | # This will be replaced with File.Separator().
7 | #
8 | # Specifies the ProM release version
9 | PROM_VERSION = NightlyBuild
10 | #
11 | # Specifies which package should be installed
12 | RELEASE_PACKAGE = RunnerUpPackages
13 | #
14 | # Specifies the URL to the default package repository
15 | # (default is "http://www.promtools.org/prom6/packages/packages.xml")
16 | PACKAGE_URL = http://www.promtools.org/prom6/packages/packages.xml
17 | #
18 | # Specifies whether ProM is Verbose
19 | # (possible: "ALL" / "ERROR" / "NONE", defaults to "ALL")
20 | VERBOSE = ALL
21 | #
22 | # The library folder is relative to the prom installation
23 | # folder (default is "lib")
24 | LIB_FOLDER = lib
25 | #
26 | # The images folder is relative to the prom library
27 | # folder (default is "=images")
28 | IMAGES_FOLDER = images
29 | #
30 | # The macro folder is relative to the prom library
31 | # folder (default is "macros")
32 | MACRO_FOLDER = macros
33 | #
34 | # The prom user folder is NOT relative to the
35 | # prom installation folder. The (default is empty, in
36 | # which case the OS handles the location)
37 | PROM_USER_FOLDER = .
38 | #
39 | # The package folder is relative to the
40 | # prom user folder. The (default is "packages")
41 | PACKAGE_FOLDER = packages
42 | #
43 | # The workspace folder is relative to the
44 | # prom user folder. The (default is "workspace")
45 | WORKSPACE_FOLDER = workspace
46 | #
47 | # Indicate whether or not ProM should serialize the
48 | # workspace. If switched off, the last serialized
49 | # workspace will be loaded on each start
50 | DO_SERIALIZATION = false
51 | #
52 | # Whether ProM should check the URL of a package archive.
53 | # If true, then the package will be ignored if the archive
54 | # cannot be opened. If false, the package will not be ignored.
55 | CHECK_PACKAGES = true
56 | #
57 | # Whether ProM should hide old version of a package.
58 | # If true, only the most recent version of the package will be
59 | # shown as being available. If false, all versions will be
60 | # shown.
61 | HIDE_OLD_PACKAGES = true
62 |
63 | PLUGIN_LEVEL_THRESHOLD = NightlyBuild
64 |
65 | #
66 | # Timeouts used when trying to get a file from the repository.
67 | # Setting a timeout to 0 means no timeout wil be set.
68 | CONNECT_TIMEOUT = 0
69 | READ_TIMEOUT = 0
--------------------------------------------------------------------------------
/ivy.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Version VERSION
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/ivysettings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/latestrelease/ProM-Framework-6.14.45-all.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/promworkbench/ProM-Framework/cb5c064b5e212e36363fb064cfa0f04cb85c23f8/latestrelease/ProM-Framework-6.14.45-all.zip
--------------------------------------------------------------------------------
/latestrelease/ProM-Framework.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/promworkbench/ProM-Framework/cb5c064b5e212e36363fb064cfa0f04cb85c23f8/latestrelease/ProM-Framework.jar
--------------------------------------------------------------------------------
/latestrelease/ProM.ini:
--------------------------------------------------------------------------------
1 | # This file contains information about this ProM release
2 | # it points ProM to the right packages and keeps version
3 | # information
4 | #
5 | # Folders should be separated using "/" (forward slash).
6 | # This will be replaced with File.Separator().
7 | #
8 | # Specifies the ProM release version
9 | PROM_VERSION = NightlyBuild
10 | #
11 | # Specifies which package should be installed
12 | RELEASE_PACKAGE = RunnerUpPackages
13 | #
14 | # Specifies the URL to the default package repository
15 | # (default is "http://www.promtools.org/prom6/packages/packages.xml")
16 | PACKAGE_URL = http://www.promtools.org/prom6/packages/packages.xml
17 | #
18 | # Specifies whether ProM is Verbose
19 | # (possible: "ALL" / "ERROR" / "NONE", defaults to "ALL")
20 | VERBOSE = ALL
21 | #
22 | # The library folder is relative to the prom installation
23 | # folder (default is "lib")
24 | LIB_FOLDER = lib
25 | #
26 | # The images folder is relative to the prom library
27 | # folder (default is "=images")
28 | IMAGES_FOLDER = images
29 | #
30 | # The macro folder is relative to the prom library
31 | # folder (default is "macros")
32 | MACRO_FOLDER = macros
33 | #
34 | # The prom user folder is NOT relative to the
35 | # prom installation folder. The (default is empty, in
36 | # which case the OS handles the location)
37 | PROM_USER_FOLDER = .
38 | #
39 | # The package folder is relative to the
40 | # prom user folder. The (default is "packages")
41 | PACKAGE_FOLDER = packages
42 | #
43 | # The workspace folder is relative to the
44 | # prom user folder. The (default is "workspace")
45 | WORKSPACE_FOLDER = workspace
46 | #
47 | # Indicate whether or not ProM should serialize the
48 | # workspace. If switched off, the last serialized
49 | # workspace will be loaded on each start
50 | DO_SERIALIZATION = false
51 | #
52 | # Whether ProM should check the URL of a package archive.
53 | # If true, then the package will be ignored if the archive
54 | # cannot be opened. If false, the package will not be ignored.
55 | CHECK_PACKAGES = true
56 | #
57 | # Whether ProM should hide old version of a package.
58 | # If true, only the most recent version of the package will be
59 | # shown as being available. If false, all versions will be
60 | # shown.
61 | HIDE_OLD_PACKAGES = true
62 |
63 | PLUGIN_LEVEL_THRESHOLD = NightlyBuild
64 |
65 | #
66 | # Timeouts used when trying to get a file from the repository.
67 | # Setting a timeout to 0 means no timeout wil be set.
68 | CONNECT_TIMEOUT = 0
69 | READ_TIMEOUT = 0
--------------------------------------------------------------------------------
/latestrelease/ivy.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Version 6.14.45
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/latestrelease/lib/TableLayout-20050920.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/promworkbench/ProM-Framework/cb5c064b5e212e36363fb064cfa0f04cb85c23f8/latestrelease/lib/TableLayout-20050920.jar
--------------------------------------------------------------------------------
/latestrelease/lib/commons-compress-1.13.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/promworkbench/ProM-Framework/cb5c064b5e212e36363fb064cfa0f04cb85c23f8/latestrelease/lib/commons-compress-1.13.jar
--------------------------------------------------------------------------------
/latestrelease/lib/commons-logging-1.1.3.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/promworkbench/ProM-Framework/cb5c064b5e212e36363fb064cfa0f04cb85c23f8/latestrelease/lib/commons-logging-1.1.3.jar
--------------------------------------------------------------------------------
/latestrelease/lib/images/logo_branding.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/promworkbench/ProM-Framework/cb5c064b5e212e36363fb064cfa0f04cb85c23f8/latestrelease/lib/images/logo_branding.png
--------------------------------------------------------------------------------
/latestrelease/lib/jargs-latest.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/promworkbench/ProM-Framework/cb5c064b5e212e36363fb064cfa0f04cb85c23f8/latestrelease/lib/jargs-latest.jar
--------------------------------------------------------------------------------
/latestrelease/lib/jgraph-5.13.0.4.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/promworkbench/ProM-Framework/cb5c064b5e212e36363fb064cfa0f04cb85c23f8/latestrelease/lib/jgraph-5.13.0.4.jar
--------------------------------------------------------------------------------
/latestrelease/lib/slickerbox-1.0rc1.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/promworkbench/ProM-Framework/cb5c064b5e212e36363fb064cfa0f04cb85c23f8/latestrelease/lib/slickerbox-1.0rc1.jar
--------------------------------------------------------------------------------
/latestrelease/packages.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/lib/images/logo_branding.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/promworkbench/ProM-Framework/cb5c064b5e212e36363fb064cfa0f04cb85c23f8/lib/images/logo_branding.png
--------------------------------------------------------------------------------
/src/org/processmining/framework/ProMID.java:
--------------------------------------------------------------------------------
1 | package org.processmining.framework;
2 |
3 | import java.util.UUID;
4 |
5 | public interface ProMID extends Comparable {
6 |
7 | /**
8 | * ProMID are used in Collections, so this method has to be implemented in
9 | * all its subclasses.
10 | *
11 | * @return
12 | */
13 | public boolean equals(Object o);
14 |
15 | /**
16 | * ProMID are used in HashMaps, so this method has to be implemented in all
17 | * its subclasses.
18 | *
19 | * @return
20 | */
21 | public int hashCode();
22 |
23 | /**
24 | * Determines equality between this ProMID and any given object. Basically
25 | * checks for equality using the toString() methods of both objects.
26 | *
27 | * @param o
28 | * the object to compare the string representation with
29 | * @return true if the toString() of this provided object ID equals the
30 | * toString() of the given object parameter.
31 | */
32 | public boolean equalsIgnoreType(Object o);
33 |
34 | /**
35 | * Returns a UUID that is used for this object.
36 | *
37 | * @return
38 | */
39 | public UUID getUUID();
40 |
41 | }
42 |
--------------------------------------------------------------------------------
/src/org/processmining/framework/abstractplugins/AbstractImportPlugin.java:
--------------------------------------------------------------------------------
1 | package org.processmining.framework.abstractplugins;
2 |
3 | import java.io.File;
4 | import java.io.FileInputStream;
5 | import java.io.FileNotFoundException;
6 | import java.io.InputStream;
7 | import java.net.URI;
8 | import java.net.URL;
9 |
10 | import javax.swing.filechooser.FileFilter;
11 |
12 | import org.processmining.framework.plugin.PluginContext;
13 | import org.processmining.framework.plugin.annotations.PluginVariant;
14 |
15 | /**
16 | * Note that implementing classes of this baseclass should carry the
17 | * UIImportPlugin annotation
18 | *
19 | * Subclasses of AbstractImportPlugin should use the @Plugin Annotation as
20 | * follows:
21 | *
22 | * @Plugin( name = "{any name}", parameterLabels={"Filename"}, returnLabels = {
23 | * {The right return labels} }, returnTypes = { {The right return
24 | * classes} })
25 | *
26 | *
27 | * @author bfvdonge
28 | *
29 | */
30 | public abstract class AbstractImportPlugin implements ImportPlugin {
31 |
32 | private File file = null;
33 |
34 | /*
35 | * (non-Javadoc)
36 | *
37 | * @see org.processmining.plugins.abstractplugins.ImportPlugin#getFile()
38 | */
39 | public File getFile() {
40 | return file;
41 | }
42 |
43 | /*
44 | * (non-Javadoc)
45 | *
46 | * @see
47 | * org.processmining.plugins.abstractplugins.ImportPlugin#importFile(org
48 | * .processmining.framework.plugin.PluginContext, java.lang.String)
49 | */
50 | @PluginVariant(requiredParameterLabels = { 0 })
51 | public Object importFile(PluginContext context, String filename) throws Exception {
52 | file = new File(filename);
53 | return importFromStream(context, new FileInputStream(file), filename, file.length());
54 | }
55 |
56 | /*
57 | * (non-Javadoc)
58 | *
59 | * @see
60 | * org.processmining.plugins.abstractplugins.ImportPlugin#importFile(org
61 | * .processmining.framework.plugin.PluginContext, java.net.URI)
62 | */
63 | @PluginVariant(requiredParameterLabels = { 0 })
64 | public Object importFile(PluginContext context, URI uri) throws Exception {
65 | return importFromStream(context, uri.toURL().openStream(), uri.toString(), 0);
66 | }
67 |
68 | /*
69 | * (non-Javadoc)
70 | *
71 | * @see
72 | * org.processmining.plugins.abstractplugins.ImportPlugin#importFile(org
73 | * .processmining.framework.plugin.PluginContext, java.net.URL)
74 | */
75 | @PluginVariant(requiredParameterLabels = { 0 })
76 | public Object importFile(PluginContext context, URL url) throws Exception {
77 | file = new File(url.toURI());
78 | return importFromStream(context, url.openStream(), url.toString(), 0);
79 | }
80 |
81 | /*
82 | * (non-Javadoc)
83 | *
84 | * @see
85 | * org.processmining.plugins.abstractplugins.ImportPlugin#importFile(org
86 | * .processmining.framework.plugin.PluginContext, java.io.File)
87 | */
88 | @PluginVariant(requiredParameterLabels = { 0 })
89 | public Object importFile(PluginContext context, File f) throws Exception {
90 | file = f;
91 | InputStream stream = getInputStream(f);
92 | return importFromStream(context, stream, file.getName(), file.length());
93 | }
94 |
95 | /**
96 | * This method returns an inputStream for a file. Note that the default
97 | * implementation returns "new FileInputStream(file);"
98 | *
99 | * @param file
100 | * @return
101 | * @throws FileNotFoundException
102 | */
103 | protected InputStream getInputStream(File file) throws Exception {
104 | return new FileInputStream(file);
105 | }
106 |
107 | /**
108 | * This method is called by all plugin variants to do the actual importing.
109 | *
110 | * @param context
111 | * @param input
112 | * @param filename
113 | * @param fileSizeInBytes
114 | * @return
115 | * @throws Exception
116 | */
117 | protected abstract Object importFromStream(PluginContext context, InputStream input, String filename,
118 | long fileSizeInBytes) throws Exception;
119 |
120 | }
121 |
122 | class ZipFilter extends FileFilter {
123 |
124 | private final FileFilter parent;
125 |
126 | public ZipFilter(FileFilter parent) {
127 | this.parent = parent;
128 | }
129 |
130 | public boolean accept(File f) {
131 | return (f.getAbsolutePath().endsWith(".zip") || parent.accept(f));
132 | }
133 |
134 | public String getDescription() {
135 | return parent.getDescription();
136 | }
137 |
138 | }
--------------------------------------------------------------------------------
/src/org/processmining/framework/abstractplugins/ImportPlugin.java:
--------------------------------------------------------------------------------
1 | package org.processmining.framework.abstractplugins;
2 |
3 | import java.io.File;
4 | import java.net.URI;
5 | import java.net.URL;
6 |
7 | import org.processmining.framework.plugin.PluginContext;
8 | import org.processmining.framework.plugin.annotations.PluginVariant;
9 |
10 | /**
11 | * This interface should be implemented by plugins that serve as input plugins.
12 | *
13 | * Such a plugin should have the @Plugin annotation on the class level and does
14 | * not have to define any variants, as these are defined in the interface.
15 | *
16 | * @author bfvdonge
17 | *
18 | */
19 |
20 | public interface ImportPlugin {
21 |
22 | /**
23 | * Returns the File object this plugin was instantiated with.
24 | *
25 | * @return
26 | */
27 | public File getFile();
28 |
29 | @PluginVariant(requiredParameterLabels = { 0 })
30 | public Object importFile(PluginContext context, String filename) throws Exception;
31 |
32 | @PluginVariant(requiredParameterLabels = { 0 })
33 | public Object importFile(PluginContext context, URI uri) throws Exception;
34 |
35 | @PluginVariant(requiredParameterLabels = { 0 })
36 | public Object importFile(PluginContext context, URL url) throws Exception;
37 |
38 | @PluginVariant(requiredParameterLabels = { 0 })
39 | public Object importFile(PluginContext context, File f) throws Exception;
40 |
41 | }
--------------------------------------------------------------------------------
/src/org/processmining/framework/annotations/AuthoredType.java:
--------------------------------------------------------------------------------
1 | package org.processmining.framework.annotations;
2 |
3 | import java.lang.annotation.ElementType;
4 | import java.lang.annotation.Retention;
5 | import java.lang.annotation.RetentionPolicy;
6 | import java.lang.annotation.Target;
7 |
8 | @Retention(RetentionPolicy.RUNTIME)
9 | @Target( { ElementType.TYPE })
10 | public @interface AuthoredType {
11 |
12 | public final static String TUE = "Eindhoven University of Technology";
13 |
14 | /**
15 | * Specifies the user-readable type for this class
16 | *
17 | * @return
18 | */
19 | String typeName();
20 |
21 | /**
22 | * Specifies the affiliation of the author
23 | *
24 | * @return
25 | */
26 | String affiliation();
27 |
28 | /**
29 | * specifies the e-mail address of the author
30 | *
31 | * @return
32 | */
33 | String email();
34 |
35 | /**
36 | * Specifies the name of the author
37 | *
38 | * @return
39 | */
40 | String author();
41 |
42 | /**
43 | * Specifies the website of the author (note that this should be URL style,
44 | * i.e. with http://)
45 | *
46 | * @return
47 | */
48 | String website() default "http://www.processmining.org";
49 |
50 | }
51 |
--------------------------------------------------------------------------------
/src/org/processmining/framework/annotations/Icon.java:
--------------------------------------------------------------------------------
1 | package org.processmining.framework.annotations;
2 |
3 | import java.lang.annotation.ElementType;
4 | import java.lang.annotation.Retention;
5 | import java.lang.annotation.RetentionPolicy;
6 | import java.lang.annotation.Target;
7 |
8 | @Retention(RetentionPolicy.RUNTIME)
9 | @Target( { ElementType.TYPE })
10 | public @interface Icon {
11 |
12 | /**
13 | * Specifies the relative path to the icon to be loaded if this type has to
14 | * be represented by an Icon
15 | *
16 | * @return
17 | */
18 | public String icon();
19 | }
20 |
--------------------------------------------------------------------------------
/src/org/processmining/framework/annotations/TestMethod.java:
--------------------------------------------------------------------------------
1 | package org.processmining.framework.annotations;
2 |
3 | import java.lang.annotation.ElementType;
4 | import java.lang.annotation.Retention;
5 | import java.lang.annotation.RetentionPolicy;
6 | import java.lang.annotation.Target;
7 |
8 | /**
9 | * By adding this annotation to a method, the method is flagged as a test method
10 | * for ProM. A hudson server should, on each commit, find all methods annotated
11 | * with this annotation and exectute it.
12 | *
13 | * The method should not require parameters and should be declared static. The
14 | * return type of the method should be: String
.
15 | *
16 | * The string returned by this method is compared to either the string defined
17 | * in the output field, or with the contents of the file indicated by
18 | * filename().
19 | *
20 | * If both filename and output are specified, then only output is used and the
21 | * file is ignored.
22 | *
23 | * @author bfvdonge
24 | *
25 | */
26 | @Retention(RetentionPolicy.RUNTIME)
27 | @Target({ ElementType.METHOD })
28 | public @interface TestMethod {
29 |
30 | String filename() default "";
31 |
32 | String output() default "";
33 |
34 | boolean returnSystemOut() default false;
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/src/org/processmining/framework/boot/AddJarsForPackageRunnable.java:
--------------------------------------------------------------------------------
1 | package org.processmining.framework.boot;
2 |
3 | import java.io.File;
4 | import java.net.MalformedURLException;
5 | import java.net.URL;
6 | import java.util.ArrayList;
7 | import java.util.List;
8 |
9 | import org.processmining.framework.boot.Boot.Level;
10 | import org.processmining.framework.packages.PackageDescriptor;
11 | import org.processmining.framework.plugin.PluginManager;
12 | import org.processmining.framework.util.PathHacker;
13 |
14 | /**
15 | * Threaded implementation of the addJarsForPackage method
16 | *
17 | * @author berti
18 | *
19 | */
20 | public class AddJarsForPackageRunnable extends Thread {
21 | PackageDescriptor pack;
22 | Level verbose;
23 | PluginManager plugins;
24 |
25 | public AddJarsForPackageRunnable(PackageDescriptor pack, Level verbose, PluginManager plugins) {
26 | this.pack = pack;
27 | this.verbose = verbose;
28 | this.plugins = plugins;
29 | }
30 |
31 | /**
32 | * Entry point for thread
33 | */
34 | public void run() {
35 | if (verbose == Level.ALL) {
36 | System.out.println("Scanning package: " + pack);
37 | }
38 | File dir = pack.getLocalPackageDirectory();
39 | if (!dir.exists() || !dir.isDirectory() || !dir.canRead()) {
40 | if (verbose == Level.ALL) {
41 | System.out.println(" Error: package directory does not exist: " + dir);
42 | }
43 | return;
44 | }
45 | // First, recusively iterate subfolders, where no scanning for plugins is necessary
46 | // this ensures all requires libraries are known when scanning for plugins
47 | for (File f : dir.listFiles()) {
48 | // Scan for jars. Only jars in the root of the package will be scanned for
49 | // plugins and other annotations.
50 | if (f.isDirectory()) {
51 | Boot.addJarsFromPackageDirectory(f, verbose, plugins);
52 | try {
53 | Boot.addURLToClasspath(f.toURI().toURL());
54 | } catch (MalformedURLException e) {
55 | }
56 | }
57 | }
58 |
59 | // Now scan the jar files in the package root folder.
60 | for (File f : dir.listFiles()) {
61 | if (f.getAbsolutePath().endsWith(PluginManager.JAR_EXTENSION)) {
62 | URL url;
63 | try {
64 | url = f.toURI().toURL();
65 | if (verbose == Level.ALL) {
66 | System.out.println(" scanning for plugins: " + url);
67 | }
68 | Boot.addURLToClasspath(url);
69 | if (f.getAbsolutePath().endsWith(PluginManager.JAR_EXTENSION)) {
70 | plugins.register(url, pack);
71 | }
72 | } catch (MalformedURLException e) {
73 | e.printStackTrace();
74 | }
75 | }
76 | }
77 |
78 | List subthreads = new ArrayList();
79 | PathHacker.addLibraryPathFromDirectory(pack.getLocalPackageDirectory());
80 | try {
81 | PathHacker.addJar(pack.getLocalPackageDirectory().toURI().toURL());
82 | for (File f : pack.getLocalPackageDirectory().listFiles()) {
83 | if (f.isDirectory()) {
84 | PathHackerRunnable runnable = new PathHackerRunnable(pack, verbose, plugins, f);
85 | subthreads.add(runnable);
86 | subthreads.get(subthreads.size()-1).start();
87 | }
88 | }
89 | } catch (MalformedURLException e) {
90 | assert (false);
91 | }
92 |
93 | for (Thread t : subthreads) {
94 | try {
95 | t.join();
96 | } catch (InterruptedException e) {
97 | // TODO Auto-generated catch block
98 | e.printStackTrace();
99 | }
100 | }
101 | }
102 | }
103 |
--------------------------------------------------------------------------------
/src/org/processmining/framework/boot/PathHackerRunnable.java:
--------------------------------------------------------------------------------
1 | package org.processmining.framework.boot;
2 |
3 | import java.io.File;
4 | import java.net.MalformedURLException;
5 |
6 | import org.processmining.framework.boot.Boot.Level;
7 | import org.processmining.framework.packages.PackageDescriptor;
8 | import org.processmining.framework.plugin.PluginManager;
9 | import org.processmining.framework.util.PathHacker;
10 |
11 | /**
12 | * Threaded executions of PathHacker addJar
13 | *
14 | * @author berti
15 | *
16 | */
17 | public class PathHackerRunnable extends Thread {
18 | PackageDescriptor pack;
19 | Level verbose;
20 | PluginManager plugins;
21 | File f;
22 |
23 | public PathHackerRunnable(PackageDescriptor pack, Level verbose, PluginManager plugins, File f) {
24 | this.pack = pack;
25 | this.verbose = verbose;
26 | this.plugins = plugins;
27 | this.f = f;
28 | }
29 |
30 | /**
31 | * Entry point for thread
32 | */
33 | public void run() {
34 | //System.out.println("pathHacker "+f.toURI());
35 | try {
36 | PathHacker.addJar(f.toURI().toURL());
37 | } catch (MalformedURLException e) {
38 | // TODO Auto-generated catch block
39 | e.printStackTrace();
40 | }
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/src/org/processmining/framework/connections/Connection.java:
--------------------------------------------------------------------------------
1 | package org.processmining.framework.connections;
2 |
3 | import java.util.Collection;
4 | import java.util.Set;
5 |
6 | import org.processmining.framework.annotations.AuthoredType;
7 | import org.processmining.framework.annotations.Icon;
8 | import org.processmining.framework.util.collection.MultiSet;
9 |
10 | /**
11 | * A connection describes a relation between objects. The connection keeps a
12 | * number of weak references between the objects in the relation. Each object
13 | * should have a label describing the role of the object in the relation. These
14 | * roles are unique
15 | *
16 | * Note that for all implementations of Connection, it is essential to consider
17 | * memory consumption. Connections are kept in the framework for as long as the
18 | * isRemoved() method returns false, hence this method should return true at the
19 | * earliest occasion.
20 | *
21 | * All implementations of this class should carry the following annotations:
22 | * @KeepInProMCache
23 | * @ConnectionAnnotation
24 | * @ConnectionDoesntExistMessage(message = "Message for case that connection Doesn't Exist")
25 | *
26 | * @author bfvdonge
27 | *
28 | */
29 | @AuthoredType(typeName = "Connection", affiliation = AuthoredType.TUE, author = "B.F. van Dongen", email = "b.f.v.dongen@tue.nl")
30 | @Icon(icon = "resourcetype_connection_30x35.png")
31 | public interface Connection {
32 |
33 | /**
34 | * Return the label of the connection
35 | *
36 | * @return
37 | */
38 | public String getLabel();
39 |
40 | /**
41 | * Return the ID of the connection.
42 | *
43 | * @return
44 | */
45 | public ConnectionID getID();
46 |
47 | /**
48 | * Return true if all objects given as parameter are contained in the
49 | * connection. Multiplicities are taken into account, however order is
50 | * abstracted from
51 | *
52 | * @param objects
53 | * the objects to check for
54 | * @return
55 | */
56 | public boolean containsObjects(Object... objects);
57 |
58 | /**
59 | * Return true if all objects given as parameter are contained in the
60 | * connection. Multiplicities are taken into account, i.e. each object
61 | * should occur as often as it is returned by the iterator of the given
62 | * collection however order is abstracted from
63 | *
64 | * @param objects
65 | * the objects as a collection
66 | * @return
67 | */
68 | public boolean containsObjects(Collection> objects);
69 |
70 | /**
71 | * Return true if one of the objects connected by this connection no longer
72 | * exists, i.e. it is collected by the garbage collector.
73 | *
74 | * @return
75 | */
76 | public boolean isRemoved();
77 |
78 | /**
79 | * Return all objects contained in this connection, without their labels.
80 | *
81 | * By contract, this method should always return the same set of objects
82 | * after the connections was created, i.e. connections may only be changed
83 | * by changing the contents of the objects, but not by changing the
84 | * pointers.
85 | *
86 | * @return
87 | */
88 | public MultiSet