use of mom.trd.opentheso.bdd.helper.nodes.NodeFacet in project opentheso by miledrousset.
the class SelectedTerme method getArrayFacette.
public ArrayList<Entry<String, String>> getArrayFacette() {
if (connect.getPoolConnexion() == null) {
return null;
}
ArrayList<Integer> temp = new FacetHelper().getIdFacetOfConcept(connect.getPoolConnexion(), idC, idTheso);
Map<String, String> mapTemp = new HashMap<>();
for (Integer i : temp) {
NodeFacet nf = new FacetHelper().getThisFacet(connect.getPoolConnexion(), i, idTheso, idlangue);
String value = new TermHelper().getThisTerm(connect.getPoolConnexion(), nf.getIdConceptParent(), idTheso, idlangue).getLexical_value();
mapTemp.put(String.valueOf(nf.getIdFacet()), nf.getLexicalValue() + " (" + value + ")");
}
arrayFacette = new ArrayList<>(mapTemp.entrySet());
return arrayFacette;
}
use of mom.trd.opentheso.bdd.helper.nodes.NodeFacet in project opentheso by miledrousset.
the class SelectedTerme method getArrayFacetteInclure.
public ArrayList<Entry<String, String>> getArrayFacetteInclure() {
if (connect.getPoolConnexion() == null) {
return null;
}
ArrayList<NodeFacet> temp = new FacetHelper().getAllFacetsOfThesaurus(connect.getPoolConnexion(), idTheso, idlangue);
ArrayList<Integer> temp2 = new FacetHelper().getIdFacetOfConcept(connect.getPoolConnexion(), idC, idTheso);
Map<String, String> mapTemp = new HashMap<>();
for (NodeFacet nf : temp) {
if (!temp2.contains(nf.getIdFacet())) {
String value = new TermHelper().getThisTerm(connect.getPoolConnexion(), nf.getIdConceptParent(), idTheso, idlangue).getLexical_value();
mapTemp.put(String.valueOf(nf.getIdFacet()), nf.getLexicalValue() + " (" + value + ")");
}
}
arrayFacette = new ArrayList<>(mapTemp.entrySet());
return arrayFacette;
}
Aggregations