diff options
| author | Federico Igne <federico.igne@cs.ox.ac.uk> | 2022-05-10 18:17:06 +0100 |
|---|---|---|
| committer | Federico Igne <federico.igne@cs.ox.ac.uk> | 2022-05-11 12:34:47 +0100 |
| commit | 17bd9beaf7f358a44e5bf36a5855fe6727d506dc (patch) | |
| tree | 47e9310a0cff869d9ec017dcb2c81876407782c8 /src/uk/ac/ox/cs/pagoda/util/disposable | |
| parent | 8651164cd632a5db310b457ce32d4fbc97bdc41c (diff) | |
| download | ACQuA-17bd9beaf7f358a44e5bf36a5855fe6727d506dc.tar.gz ACQuA-17bd9beaf7f358a44e5bf36a5855fe6727d506dc.zip | |
[pagoda] Move project to Scala
This commit includes a few changes:
- The repository still uses Maven to manage dependency but it is now a
Scala project.
- The code has been ported from OWLAPI 3.4.10 to 5.1.20
- A proof of concept program using both RSAComb and PAGOdA has been
added.
Diffstat (limited to 'src/uk/ac/ox/cs/pagoda/util/disposable')
| -rw-r--r-- | src/uk/ac/ox/cs/pagoda/util/disposable/Disposable.java | 30 | ||||
| -rw-r--r-- | src/uk/ac/ox/cs/pagoda/util/disposable/DisposedException.java | 12 |
2 files changed, 0 insertions, 42 deletions
diff --git a/src/uk/ac/ox/cs/pagoda/util/disposable/Disposable.java b/src/uk/ac/ox/cs/pagoda/util/disposable/Disposable.java deleted file mode 100644 index 4015b66..0000000 --- a/src/uk/ac/ox/cs/pagoda/util/disposable/Disposable.java +++ /dev/null | |||
| @@ -1,30 +0,0 @@ | |||
| 1 | package uk.ac.ox.cs.pagoda.util.disposable; | ||
| 2 | |||
| 3 | |||
| 4 | /** | ||
| 5 | * Every public method of a subclass of this class, | ||
| 6 | * as first instruction, should check if the object has already been disposed | ||
| 7 | * and, if so, should throw a <tt>DisposedException</tt>. | ||
| 8 | */ | ||
| 9 | public abstract class Disposable { | ||
| 10 | |||
| 11 | private boolean disposed = false; | ||
| 12 | |||
| 13 | /** | ||
| 14 | * This method must be called after the use of the object. | ||
| 15 | * <p> | ||
| 16 | * Every overriding method must call <tt>super.dispose()</tt> as first instruction. | ||
| 17 | */ | ||
| 18 | public void dispose() { | ||
| 19 | if(isDisposed()) throw new AlreadyDisposedException(); | ||
| 20 | disposed = true; | ||
| 21 | } | ||
| 22 | |||
| 23 | public final boolean isDisposed() { | ||
| 24 | return disposed; | ||
| 25 | } | ||
| 26 | |||
| 27 | private class AlreadyDisposedException extends RuntimeException { | ||
| 28 | } | ||
| 29 | |||
| 30 | } | ||
diff --git a/src/uk/ac/ox/cs/pagoda/util/disposable/DisposedException.java b/src/uk/ac/ox/cs/pagoda/util/disposable/DisposedException.java deleted file mode 100644 index eb8c039..0000000 --- a/src/uk/ac/ox/cs/pagoda/util/disposable/DisposedException.java +++ /dev/null | |||
| @@ -1,12 +0,0 @@ | |||
| 1 | package uk.ac.ox.cs.pagoda.util.disposable; | ||
| 2 | |||
| 3 | public class DisposedException extends RuntimeException { | ||
| 4 | |||
| 5 | public DisposedException() { | ||
| 6 | super(); | ||
| 7 | } | ||
| 8 | |||
| 9 | public DisposedException(String msg) { | ||
| 10 | super(msg); | ||
| 11 | } | ||
| 12 | } | ||
