@@ -854,135 +854,135 @@ private SSUri getCirclePublicURI() throws Exception{
854854 }
855855 }
856856
857- // public List<SSEntity> getEntitiesForLabelsAndDescriptions(
858- // final List<String> keywords) throws Exception{
859- //
860- // ResultSet resultSet = null;
861- //
862- // try{
863- // final List<SSEntity> entities = new ArrayList<>();
864- // final List<String> columns = new ArrayList<>();
865- // final List<String> matches = new ArrayList<>();
866- // final List<String> againsts = new ArrayList<>();
867- //
868- // column (columns, SSSQLVarU.id);
869- // column (columns, SSSQLVarU.label);
870- // column (columns, SSSQLVarU.description);
871- // column (columns, SSSQLVarU.type);
872- // match (matches, SSSQLVarU.label);
873- // match (matches, SSSQLVarU.description);
874- //
875- // againsts.addAll(keywords);
876- //
877- // resultSet = dbSQL.select(entityTable, columns, matches, againsts);
878- //
879- // while(resultSet.next()){
880- //
881- // entities.add(
882- // SSEntity.get(
883- // bindingStrToUri (resultSet, SSSQLVarU.id),
884- // bindingStrToLabel (resultSet, SSSQLVarU.label),
885- // null,
886- // bindingStrToEntityType (resultSet, SSSQLVarU.type),
887- // null,
888- // SSTextComment.get (bindingStr(resultSet, SSSQLVarU.description))));
889- // }
890- //
891- // return entities;
892- //
893- // }catch(Exception error){
894- // SSServErrReg.regErrThrow(error);
895- // return null;
896- // }finally{
897- // dbSQL.closeStmt(resultSet);
898- // }
899- // }
857+ public List <SSEntity > getEntitiesForLabelsAndDescriptions (
858+ final List <String > keywords ) throws Exception {
859+
860+ ResultSet resultSet = null ;
861+
862+ try {
863+ final List <SSEntity > entities = new ArrayList <>();
864+ final List <String > columns = new ArrayList <>();
865+ final List <String > matches = new ArrayList <>();
866+ final List <String > againsts = new ArrayList <>();
867+
868+ column (columns , SSSQLVarU .id );
869+ column (columns , SSSQLVarU .label );
870+ column (columns , SSSQLVarU .description );
871+ column (columns , SSSQLVarU .type );
872+ match (matches , SSSQLVarU .label );
873+ match (matches , SSSQLVarU .description );
874+
875+ againsts .addAll (keywords );
876+
877+ resultSet = dbSQL .select (entityTable , columns , matches , againsts );
878+
879+ while (resultSet .next ()){
880+
881+ entities .add (
882+ SSEntity .get (
883+ bindingStrToUri (resultSet , SSSQLVarU .id ),
884+ bindingStrToLabel (resultSet , SSSQLVarU .label ),
885+ null ,
886+ bindingStrToEntityType (resultSet , SSSQLVarU .type ),
887+ null ,
888+ SSTextComment .get (bindingStr (resultSet , SSSQLVarU .description ))));
889+ }
890+
891+ return entities ;
892+
893+ }catch (Exception error ){
894+ SSServErrReg .regErrThrow (error );
895+ return null ;
896+ }finally {
897+ dbSQL .closeStmt (resultSet );
898+ }
899+ }
900900
901- // public List<SSEntity> getEntitiesForLabels(
902- // final List<String> keywords) throws Exception{
903- //
904- // ResultSet resultSet = null;
905- //
906- // try{
907- // final List<SSEntity> entities = new ArrayList<>();
908- // final List<String> columns = new ArrayList<>();
909- // final List<String> matches = new ArrayList<>();
910- // final List<String> againsts = new ArrayList<>();
911- //
912- // column (columns, SSSQLVarU.id);
913- // column (columns, SSSQLVarU.label);
914- // column (columns, SSSQLVarU.type);
915- // column (columns, SSSQLVarU.description);
916- // match (matches, SSSQLVarU.label);
917- //
918- // againsts.addAll(keywords);
919- //
920- // resultSet = dbSQL.select(entityTable, columns, matches, againsts);
921- //
922- // while(resultSet.next()){
923- //
924- // entities.add(
925- // SSEntity.get(
926- // bindingStrToUri (resultSet, SSSQLVarU.id),
927- // bindingStrToLabel (resultSet, SSSQLVarU.label),
928- // null,
929- // bindingStrToEntityType (resultSet, SSSQLVarU.type),
930- // null,
931- // SSTextComment.get (bindingStr(resultSet, SSSQLVarU.description))));
932- // }
933- //
934- // return entities;
935- //
936- // }catch(Exception error){
937- // SSServErrReg.regErrThrow(error);
938- // return null;
939- // }finally{
940- // dbSQL.closeStmt(resultSet);
941- // }
942- // }
901+ public List <SSEntity > getEntitiesForLabels (
902+ final List <String > keywords ) throws Exception {
903+
904+ ResultSet resultSet = null ;
905+
906+ try {
907+ final List <SSEntity > entities = new ArrayList <>();
908+ final List <String > columns = new ArrayList <>();
909+ final List <String > matches = new ArrayList <>();
910+ final List <String > againsts = new ArrayList <>();
911+
912+ column (columns , SSSQLVarU .id );
913+ column (columns , SSSQLVarU .label );
914+ column (columns , SSSQLVarU .type );
915+ column (columns , SSSQLVarU .description );
916+ match (matches , SSSQLVarU .label );
917+
918+ againsts .addAll (keywords );
919+
920+ resultSet = dbSQL .select (entityTable , columns , matches , againsts );
921+
922+ while (resultSet .next ()){
923+
924+ entities .add (
925+ SSEntity .get (
926+ bindingStrToUri (resultSet , SSSQLVarU .id ),
927+ bindingStrToLabel (resultSet , SSSQLVarU .label ),
928+ null ,
929+ bindingStrToEntityType (resultSet , SSSQLVarU .type ),
930+ null ,
931+ SSTextComment .get (bindingStr (resultSet , SSSQLVarU .description ))));
932+ }
933+
934+ return entities ;
935+
936+ }catch (Exception error ){
937+ SSServErrReg .regErrThrow (error );
938+ return null ;
939+ }finally {
940+ dbSQL .closeStmt (resultSet );
941+ }
942+ }
943943
944- // public List<SSEntity> getEntitiesForDescriptions(
945- // final List<String> keywords) throws Exception{
946- //
947- // ResultSet resultSet = null;
948- //
949- // try{
950- // final List<SSEntity> entities = new ArrayList<>();
951- // final List<String> columns = new ArrayList<>();
952- // final List<String> matches = new ArrayList<>();
953- // final List<String> againsts = new ArrayList<>();
954- //
955- // column (columns, SSSQLVarU.id);
956- // column (columns, SSSQLVarU.label);
957- // column (columns, SSSQLVarU.type);
958- // column (columns, SSSQLVarU.description);
959- // match (matches, SSSQLVarU.description);
960- //
961- // againsts.addAll(keywords);
962- //
963- // resultSet = dbSQL.select(entityTable, columns, matches, againsts);
964- //
965- // while(resultSet.next()){
966- //
967- // entities.add(
968- // SSEntity.get(
969- // bindingStrToUri (resultSet, SSSQLVarU.id),
970- // bindingStrToLabel (resultSet, SSSQLVarU.label),
971- // null,
972- // bindingStrToEntityType (resultSet, SSSQLVarU.type),
973- // null,
974- // SSTextComment.get (bindingStr(resultSet, SSSQLVarU.description))));
975- // }
976- //
977- // return entities;
978- //
979- // }catch(Exception error){
980- // SSServErrReg.regErrThrow(error);
981- // return null;
982- // }finally{
983- // dbSQL.closeStmt(resultSet);
984- // }
985- // }
944+ public List <SSEntity > getEntitiesForDescriptions (
945+ final List <String > keywords ) throws Exception {
946+
947+ ResultSet resultSet = null ;
948+
949+ try {
950+ final List <SSEntity > entities = new ArrayList <>();
951+ final List <String > columns = new ArrayList <>();
952+ final List <String > matches = new ArrayList <>();
953+ final List <String > againsts = new ArrayList <>();
954+
955+ column (columns , SSSQLVarU .id );
956+ column (columns , SSSQLVarU .label );
957+ column (columns , SSSQLVarU .type );
958+ column (columns , SSSQLVarU .description );
959+ match (matches , SSSQLVarU .description );
960+
961+ againsts .addAll (keywords );
962+
963+ resultSet = dbSQL .select (entityTable , columns , matches , againsts );
964+
965+ while (resultSet .next ()){
966+
967+ entities .add (
968+ SSEntity .get (
969+ bindingStrToUri (resultSet , SSSQLVarU .id ),
970+ bindingStrToLabel (resultSet , SSSQLVarU .label ),
971+ null ,
972+ bindingStrToEntityType (resultSet , SSSQLVarU .type ),
973+ null ,
974+ SSTextComment .get (bindingStr (resultSet , SSSQLVarU .description ))));
975+ }
976+
977+ return entities ;
978+
979+ }catch (Exception error ){
980+ SSServErrReg .regErrThrow (error );
981+ return null ;
982+ }finally {
983+ dbSQL .closeStmt (resultSet );
984+ }
985+ }
986986}
987987
988988
0 commit comments