code: public Double parseDocumentSentiment() throws EnhancementParserException {
          RepositoryConnection conn = null;
          try {
              conn = repository.getConnection();
              conn.begin();
              String documentSentimentQuery = "PREFIX fise: <http://fise.iks-project.eu/ontology/> \n"
                      + "PREFIX dct: <http://purl.org/dc/terms/> \n"
                      + "SELECT ?docSent { \n"
                      + "  ?annotation a fise:TextAnnotation . \n"
                      + "  ?annotation dct:type fise:DocumentSentiment . \n"
                      + "  ?annotation fise:sentiment ?docSent \n"
                      + "}";
              TupleQueryResult documentSentimentAnnotationsResults = conn.prepareTupleQuery(
                  QueryLanguage.SPARQL, documentSentimentQuery).evaluate();
              final Double docSentiment;
              if(documentSentimentAnnotationsResults.hasNext()) {
                  BindingSet result = documentSentimentAnnotationsResults.next();
                  docSentiment = Double.parseDouble(result.getBinding("docSent").getValue().stringValue());
              } else {
                  docSentiment = null;
              }
              documentSentimentAnnotationsResults.close();
              conn.commit();
              return docSentiment;
          } catch (QueryEvaluationException | MalformedQueryException e) {
              throw new EnhancementParserException("Error parsing text annotations", e);
          } catch (RepositoryException e) {
              throw new EnhancementParserException("Error querying the RDF Model obtained as Service Response", e);
          } finally {
              if(conn != null){
                  try {
                      conn.close();
                  } catch (RepositoryException e) {/*ignore*/}
              }
          }
          
      }
docs: Returns the Sentiment for the processed document or <code>null</code> if
  no Sentiment analysis component is configured for the analysis.
  @return the Document Sentiment or <code>null</code> if not available
  @throws EnhancementParserException