// Path: src/main/java/fr/eurecom/stanfordnlprestapi/interfaces/Sentence.java
// public interface Sentence {
//   void addToken(final Token newToken);
// 
//   void addEntity(final Entity newEntity);
//   
//   void addCoref(final Coref newCoref);
// 
//   void nextSentence(final Sentence newNextSentence);
// 
//   List<Entity> entities();
// 
//   int index();
// 
//   int start();
// 
//   int end();
// 
//   Model rdfModel(final String tool, final NlpProcess process, final String host);
// }


import fr.eurecom.stanfordnlprestapi.interfaces.Sentence;
import org.apache.jena.datatypes.xsd.XSDDatatype;
import org.apache.jena.rdf.model.Model;
import org.apache.jena.rdf.model.ModelFactory;
import org.apache.jena.rdf.model.ResourceFactory;
import org.apache.jena.vocabulary.RDF;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
 * StanfordNLPRESTAPI - Offering a REST API over Stanford CoreNLP to get results in NIF format.
 * Copyright © 2017 Julien Plu (julien.plu@redaction-developpez.com)
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU 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 General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 */
package fr.eurecom.stanfordnlprestapi.datatypes;






/**
 * This class represents a NIF Entity that is aligned to the corresponding Stanford NLP
 * annotations.
 *
 * @author Julien Plu
 */
public class Entity {
  static final Logger LOGGER = LoggerFactory.getLogger(Entity.class);
  private final String text;
  private final String type;
  private final Sentence sentence;
  private final Context context;
  private final int start;
  private final int end;

  /**
   * Entity constructor.
   *
   * @param newText     Text of the entity.
   * @param newType     Type of the entity.
   * @param newSentence The sentence where the entity is.
   * @param newContext  The context where the entity is.
   * @param newStart    The start offset of the entity.
   * @param newEnd      The end offset of the entity.
   */
// Path: src/main/java/fr/eurecom/stanfordnlprestapi/interfaces/Sentence.java
// public interface Sentence {
//   void addToken(final Token newToken);
// 
//   void addEntity(final Entity newEntity);
//   
//   void addCoref(final Coref newCoref);
// 
//   void nextSentence(final Sentence newNextSentence);
// 
//   List<Entity> entities();
// 
//   int index();
// 
//   int start();
// 
//   int end();
// 
//   Model rdfModel(final String tool, final NlpProcess process, final String host);
// }


// Path: src/main/java/fr/eurecom/stanfordnlprestapi/datatypes/Entity.java
import fr.eurecom.stanfordnlprestapi.interfaces.Sentence;
import org.apache.jena.datatypes.xsd.XSDDatatype;
import org.apache.jena.rdf.model.Model;
import org.apache.jena.rdf.model.ModelFactory;
import org.apache.jena.rdf.model.ResourceFactory;
import org.apache.jena.vocabulary.RDF;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * StanfordNLPRESTAPI - Offering a REST API over Stanford CoreNLP to get results in NIF format.
 * Copyright © 2017 Julien Plu (julien.plu@redaction-developpez.com)
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU 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 General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 */
package fr.eurecom.stanfordnlprestapi.datatypes;






/**
 * This class represents a NIF Entity that is aligned to the corresponding Stanford NLP
 * annotations.
 *
 * @author Julien Plu
 */
public class Entity {
  static final Logger LOGGER = LoggerFactory.getLogger(Entity.class);
  private final String text;
  private final String type;
  private final Sentence sentence;
  private final Context context;
  private final int start;
  private final int end;

  /**
   * Entity constructor.
   *
   * @param newText     Text of the entity.
   * @param newType     Type of the entity.
   * @param newSentence The sentence where the entity is.
   * @param newContext  The context where the entity is.
   * @param newStart    The start offset of the entity.
   * @param newEnd      The end offset of the entity.
   */
  public Entity(final String newText, final String newType, final Sentence newSentence,