X-Git-Url: https://git.argeo.org/?a=blobdiff_plain;f=org.argeo.suite.core%2Fsrc%2Forg%2Fargeo%2Fsuite%2Fcore%2FSuiteTerm.java;h=227b567c31f8b18248e80c0bd41effd65324cfef;hb=41e9998f7f1c87c747c57f60c6bec65fa20757a6;hp=0c03dc514826dae39dc2ed80cc10f782c2f37bfb;hpb=678186f16393cdafbd5430adbad98359179c96bd;p=gpl%2Fargeo-suite.git 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 index 0c03dc5..227b567 100644 --- a/org.argeo.suite.core/src/org/argeo/suite/core/SuiteTerm.java +++ b/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; }