From 17bd9beaf7f358a44e5bf36a5855fe6727d506dc Mon Sep 17 00:00:00 2001 From: Federico Igne Date: Tue, 10 May 2022 18:17:06 +0100 Subject: [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. --- src/uk/ac/ox/cs/pagoda/summary/Node.java | 65 -------------------------------- 1 file changed, 65 deletions(-) delete mode 100644 src/uk/ac/ox/cs/pagoda/summary/Node.java (limited to 'src/uk/ac/ox/cs/pagoda/summary/Node.java') diff --git a/src/uk/ac/ox/cs/pagoda/summary/Node.java b/src/uk/ac/ox/cs/pagoda/summary/Node.java deleted file mode 100644 index 6fca4bb..0000000 --- a/src/uk/ac/ox/cs/pagoda/summary/Node.java +++ /dev/null @@ -1,65 +0,0 @@ -package uk.ac.ox.cs.pagoda.summary; - -import java.util.Collection; -import java.util.Iterator; -import java.util.TreeSet; - -public class Node { - - String name; - Collection concepts = new TreeSet(); - private String label; - - public Node(String nodeName) { - name = nodeName; - } - - public String getName() { return name; } - - public void addConcept(String className) { - concepts.add(className); - label = null; - } - - public String getLabel() { - if (label == null) { - StringBuilder sb = null; - for (Iterator it = concepts.iterator(); it.hasNext(); ) { - if (sb == null) sb = new StringBuilder(); - else sb.append("^"); - sb.append(it.next()); - } - label = sb == null ? "" : sb.toString(); - } - return label; - } - - //TODO to be removed (just used for debug) ... - String simplifiedLabel = null; - - public String toString() { - if (simplifiedLabel == null) - simplifiedLabel = getLabel(); - return name + "@" + simplifiedLabel; - } - - public boolean isSubConceptOf(Node v) { - String s, t = ""; - for (Iterator uIter = concepts.iterator(), vIter = v.concepts.iterator(); uIter.hasNext(); ) { - s = uIter.next(); - if (!vIter.hasNext()) return false; - while (vIter.hasNext() && !s.equals(t = vIter.next())); - if (!s.equals(t)) return false; - } - return true; - } - - public Collection getConcepts() { - return concepts; - } - -} - - - - -- cgit v1.2.3