
de.citec.scie.web.analysis.AbstractAnalysis 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 de.citec.scie.web.utils.FileType;
import java.io.InputStream;
/**
* The AbstractAnalysis class is the basic interface provided by the analysis
* components.
*
* @author Andreas Stöckel -- [email protected]
*/
public interface AbstractAnalysis {
/**
* Runs the analysis on the given input stream and returns an instance of an
* implementation of AbstractAnalysisResult.
*
* @param is is the input stream.
* @param type is the type of the input stream (text or pdf).
* @return an analysis result.
* @throws AnalysisException if something goes wrong while analyzing the
* file.
*/
AbstractAnalysisResult analyze(InputStream is, FileType type) throws AnalysisException;
/**
* Returns true, if native analysis of PDF documents is possible. In this
* case the web server will perform the conversion.
*
* @return true if the analysis natively supports the analysis of PDF files.
*/
default boolean supportsPDF() {
return true;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy