X-Git-Url: http://git.argeo.org/?p=gpl%2Fargeo-suite.git;a=blobdiff_plain;f=org.argeo.suite.core%2Fsrc%2Forg%2Fargeo%2Fsuite%2Fcore%2FSuiteTerm.java;fp=org.argeo.suite.core%2Fsrc%2Forg%2Fargeo%2Fsuite%2Fcore%2FSuiteTerm.java;h=0000000000000000000000000000000000000000;hp=0c03dc514826dae39dc2ed80cc10f782c2f37bfb;hb=418ea1efbf3f0d6b706603c6ff1c0fdd17314773;hpb=70010c4afc5799622fcad5b075740d94da074798 diff --git a/org.argeo.suite.core/src/org/argeo/suite/core/SuiteTerm.java b/org.argeo.suite.core/src/org/argeo/suite/core/SuiteTerm.java deleted file mode 100644 index 0c03dc5..0000000 --- a/org.argeo.suite.core/src/org/argeo/suite/core/SuiteTerm.java +++ /dev/null @@ -1,55 +0,0 @@ -package org.argeo.suite.core; - -import java.util.ArrayList; -import java.util.List; - -/** - * A single term. Helper to optimise {@link SuiteTermsManager} implementation. - */ -class SuiteTerm { - private final String name; - private final String relativePath; - private final SuiteTypology typology; - private final String id; - - private final SuiteTerm parentTerm; - private final List subTerms = new ArrayList<>(); - - SuiteTerm(SuiteTypology typology, String relativePath, SuiteTerm parentTerm) { - this.typology = typology; - this.parentTerm = parentTerm; - this.relativePath = relativePath; - int index = relativePath.lastIndexOf('/'); - if (index > 0) { - this.name = relativePath.substring(index); - } else { - this.name = relativePath; - } - id = typology.getName() + '/' + relativePath; - } - - public String getName() { - return name; - } - - public String getRelativePath() { - return relativePath; - } - - SuiteTypology getTypology() { - return typology; - } - - public String getId() { - return id; - } - - List getSubTerms() { - return subTerms; - } - - SuiteTerm getParentTerm() { - return parentTerm; - } - -}