added method to get speechIDs from speaker
This commit is contained in:
parent
25fc8b5480
commit
ea68b3204b
1 changed files with 10 additions and 0 deletions
|
@ -730,4 +730,14 @@ public class MongoPprUtils {
|
|||
|
||||
Logger.info("Updating Metadata Collection: end");
|
||||
}
|
||||
|
||||
public static List<String> getSpeechIdsBySpeakerId(String speakerId) {
|
||||
List<String> speechIds = new ArrayList<>();
|
||||
Document filter = new Document("speakerId", Integer.parseInt(speakerId));
|
||||
List<Document> docs = getSpeechCollection().find(filter).into(new ArrayList<>());
|
||||
for (Document doc : docs) {
|
||||
speechIds.add(doc.getString("speechKey"));
|
||||
}
|
||||
return speechIds;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue