X-Git-Url: https://git.argeo.org/?p=gpl%2Fargeo-suite.git;a=blobdiff_plain;f=core%2Forg.argeo.suite.core%2Fsrc%2Forg%2Fargeo%2Fsuite%2Fcore%2FSuiteTerm.java;h=227b567c31f8b18248e80c0bd41effd65324cfef;hp=0c03dc514826dae39dc2ed80cc10f782c2f37bfb;hb=d583547f3046d1e0d9a1dc689abe71dcd1decfb7;hpb=475324c72691c723253f2f0edd7a411a101c04ae diff --git a/core/org.argeo.suite.core/src/org/argeo/suite/core/SuiteTerm.java b/core/org.argeo.suite.core/src/org/argeo/suite/core/SuiteTerm.java index 0c03dc5..227b567 100644 --- a/core/org.argeo.suite.core/src/org/argeo/suite/core/SuiteTerm.java +++ b/core/org.argeo.suite.core/src/org/argeo/suite/core/SuiteTerm.java @@ -3,10 +3,12 @@ package org.argeo.suite.core; import java.util.ArrayList; import java.util.List; +import org.argeo.entity.Term; + /** * A single term. Helper to optimise {@link SuiteTermsManager} implementation. */ -class SuiteTerm { +class SuiteTerm implements Term { private final String name; private final String relativePath; private final SuiteTypology typology; @@ -21,13 +23,19 @@ class SuiteTerm { this.relativePath = relativePath; int index = relativePath.lastIndexOf('/'); if (index > 0) { - this.name = relativePath.substring(index); + this.name = relativePath.substring(index + 1); } else { this.name = relativePath; } id = typology.getName() + '/' + relativePath; } + @Override + public String getId() { + return id; + } + + @Override public String getName() { return name; } @@ -36,19 +44,18 @@ class SuiteTerm { return relativePath; } - SuiteTypology getTypology() { + @Override + public SuiteTypology getTypology() { return typology; } - public String getId() { - return id; - } - - List getSubTerms() { + @Override + public List getSubTerms() { return subTerms; } - SuiteTerm getParentTerm() { + @Override + public SuiteTerm getParentTerm() { return parentTerm; }