
de.citec.scie.web.analysis.AnnotationData Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of webservice Show documentation
Show all versions of webservice Show documentation
Module providing the webservice interface based on the Jetty
embedded webserver and the FreeMarker template engine. Defines a simple
format for providing textual annotations and produced output in HTML or
JSON. This module has no dependencies to the other SCIE modules (except
for the PDF text extractor) or the UIMA framework and thus can be used
in any context, where text is annotated by an algorithm and should be
presented to an end user.
The newest version!
/*
* SCIE -- Spinal Cord Injury Information Extraction
* Copyright (C) 2013, 2014
* Raphael Dickfelder, Jan Göpfert, Benjamin Paaßen, Andreas Stöckel
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see .
*/
package de.citec.scie.web.analysis;
import java.util.ArrayList;
import java.util.List;
/**
*
* @author Andreas Stöckel -- [email protected]
*/
public class AnnotationData {
private final List entries = new ArrayList<>();
public void addEntry(String key, String value) {
entries.add(new AnnotationDataEntry(key, value));
}
public List getEntries() {
return entries;
}
public List getEntriesForKey(String key) {
List res = new ArrayList<>();
for (AnnotationDataEntry entry : entries) {
if (entry.getKey().equals(key)) {
res.add(entry);
}
}
return res;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy