// Path: src/main/java/fr/eurecom/stanfordnlprestapi/enums/NlpProcess.java
// public enum NlpProcess {
//   NER,
//   POS,
//   TOKENIZE,
//   COREF,
//   DATE,
//   NUMBER,
//   GAZETTEER
// }
// 
// 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/interfaces/Token.java
// public interface Token {
//   void nextToken(final Token newNextToken);
// 
//   int index();
// 
//   String text();
// 
//   int start();
// 
//   int end();
// 
//   Model rdfModel(final String tool, final NlpProcess process, final String host);
// }
// 
// Path: src/main/java/fr/eurecom/stanfordnlprestapi/nullobjects/NullToken.java
// public final class NullToken implements Token {
//   static final Logger LOGGER = LoggerFactory.getLogger(NullToken.class);
//   private static final NullToken INSTANCE = new NullToken();
// 
//   public static NullToken getInstance() {
//     return NullToken.INSTANCE;
//   }
//   
//   private NullToken() {
//   }
// 
//   @Override
//   public void nextToken(final Token newNextToken) {
//     throw new UnsupportedOperationException("Not imlpemented");
//   }
// 
//   @Override
//   public int index() {
//     return -1;
//   }
// 
//   @Override
//   public String text() {
//     return null;
//   }
// 
//   @Override
//   public int start() {
//     return 0;
//   }
// 
//   @Override
//   public int end() {
//     return 0;
//   }
// 
//   @Override
//   public Model rdfModel(final String tool, final NlpProcess process, final String host) {
//     return ModelFactory.createDefaultModel();
//   }
// }


import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import fr.eurecom.stanfordnlprestapi.enums.NlpProcess;
import fr.eurecom.stanfordnlprestapi.interfaces.Sentence;
import fr.eurecom.stanfordnlprestapi.interfaces.Token;
import fr.eurecom.stanfordnlprestapi.nullobjects.NullToken;
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;

  @Override
  public final Model rdfModel(final String tool, final NlpProcess process, final String host) {
    final String nif = "http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#";
    final String base = host + '/' + tool;
    final Model model = ModelFactory.createDefaultModel();

    model.add(ResourceFactory.createResource(base + "/token#char=" + this.start + ',' + this.end),
        RDF.type, ResourceFactory.createResource(nif + "String"));
    model.add(ResourceFactory.createResource(base + "/token#char=" + this.start + ',' + this.end),
        RDF.type, ResourceFactory.createResource(nif + "RFC5147String"));
    model.add(ResourceFactory.createResource(base + "/token#char=" + this.start + ',' + this.end),
        RDF.type, ResourceFactory.createResource(nif + "Word"));
    model.add(ResourceFactory.createResource(base + "/token#char=" + this.start + ',' + this.end),
        ResourceFactory.createProperty(nif + "beginIndex"),
        ResourceFactory.createTypedLiteral(Integer.toString(this.start),
            XSDDatatype.XSDnonNegativeInteger));
    model.add(ResourceFactory.createResource(base + "/token#char=" + this.start + ',' + this.end),
        ResourceFactory.createProperty(nif + "endIndex"),
        ResourceFactory.createTypedLiteral(Integer.toString(this.end),
            XSDDatatype.XSDnonNegativeInteger));
    model.add(ResourceFactory.createResource(base + "/token#char=" + this.start + ',' + this.end),
        ResourceFactory.createProperty(nif + "anchorOf"),
        ResourceFactory.createPlainLiteral(this.text));
    model.add(ResourceFactory.createResource(base + "/token#char=" + this.start + ',' + this.end),
        ResourceFactory.createProperty(nif + "sentence"), ResourceFactory.createResource(base
            + "/sentence#char=" + this.sentence.start() + ',' + this.sentence.end()));
    model.add(ResourceFactory.createResource(base + "/token#char=" + this.start + ',' + this.end),
        ResourceFactory.createProperty(nif + "referenceContext"),
        ResourceFactory.createResource(base + "/context#char=" + this.context.start() + ','
// Path: src/main/java/fr/eurecom/stanfordnlprestapi/enums/NlpProcess.java
// public enum NlpProcess {
//   NER,
//   POS,
//   TOKENIZE,
//   COREF,
//   DATE,
//   NUMBER,
//   GAZETTEER
// }
// 
// 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/interfaces/Token.java
// public interface Token {
//   void nextToken(final Token newNextToken);
// 
//   int index();
// 
//   String text();
// 
//   int start();
// 
//   int end();
// 
//   Model rdfModel(final String tool, final NlpProcess process, final String host);
// }
// 
// Path: src/main/java/fr/eurecom/stanfordnlprestapi/nullobjects/NullToken.java
// public final class NullToken implements Token {
//   static final Logger LOGGER = LoggerFactory.getLogger(NullToken.class);
//   private static final NullToken INSTANCE = new NullToken();
// 
//   public static NullToken getInstance() {
//     return NullToken.INSTANCE;
//   }
//   
//   private NullToken() {
//   }
// 
//   @Override
//   public void nextToken(final Token newNextToken) {
//     throw new UnsupportedOperationException("Not imlpemented");
//   }
// 
//   @Override
//   public int index() {
//     return -1;
//   }
// 
//   @Override
//   public String text() {
//     return null;
//   }
// 
//   @Override
//   public int start() {
//     return 0;
//   }
// 
//   @Override
//   public int end() {
//     return 0;
//   }
// 
//   @Override
//   public Model rdfModel(final String tool, final NlpProcess process, final String host) {
//     return ModelFactory.createDefaultModel();
//   }
// }


// Path: src/main/java/fr/eurecom/stanfordnlprestapi/datatypes/TokenImpl.java
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import fr.eurecom.stanfordnlprestapi.enums.NlpProcess;
import fr.eurecom.stanfordnlprestapi.interfaces.Sentence;
import fr.eurecom.stanfordnlprestapi.interfaces.Token;
import fr.eurecom.stanfordnlprestapi.nullobjects.NullToken;
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;


  @Override
  public final Model rdfModel(final String tool, final NlpProcess process, final String host) {
    final String nif = "http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#";
    final String base = host + '/' + tool;
    final Model model = ModelFactory.createDefaultModel();

    model.add(ResourceFactory.createResource(base + "/token#char=" + this.start + ',' + this.end),
        RDF.type, ResourceFactory.createResource(nif + "String"));
    model.add(ResourceFactory.createResource(base + "/token#char=" + this.start + ',' + this.end),
        RDF.type, ResourceFactory.createResource(nif + "RFC5147String"));
    model.add(ResourceFactory.createResource(base + "/token#char=" + this.start + ',' + this.end),
        RDF.type, ResourceFactory.createResource(nif + "Word"));
    model.add(ResourceFactory.createResource(base + "/token#char=" + this.start + ',' + this.end),
        ResourceFactory.createProperty(nif + "beginIndex"),
        ResourceFactory.createTypedLiteral(Integer.toString(this.start),
            XSDDatatype.XSDnonNegativeInteger));
    model.add(ResourceFactory.createResource(base + "/token#char=" + this.start + ',' + this.end),
        ResourceFactory.createProperty(nif + "endIndex"),
        ResourceFactory.createTypedLiteral(Integer.toString(this.end),
            XSDDatatype.XSDnonNegativeInteger));
    model.add(ResourceFactory.createResource(base + "/token#char=" + this.start + ',' + this.end),
        ResourceFactory.createProperty(nif + "anchorOf"),
        ResourceFactory.createPlainLiteral(this.text));
    model.add(ResourceFactory.createResource(base + "/token#char=" + this.start + ',' + this.end),
        ResourceFactory.createProperty(nif + "sentence"), ResourceFactory.createResource(base
            + "/sentence#char=" + this.sentence.start() + ',' + this.sentence.end()));
    model.add(ResourceFactory.createResource(base + "/token#char=" + this.start + ',' + this.end),
        ResourceFactory.createProperty(nif + "referenceContext"),
        ResourceFactory.createResource(base + "/context#char=" + this.context.start() + ','
            + this.context.end()));