Package org.apache.uima.alchemy.digester.json

Examples of org.apache.uima.alchemy.digester.json.JsonDigester.addObjectCreate()


  public Results parseAlchemyXML(InputStream xmlReader) throws IOException, SAXException,
          URISyntaxException {
    Digester digester = new JsonDigester();
    digester.setValidating(false);

    digester.addObjectCreate("$", ConceptResults.class);
    digester.addBeanPropertySetter("$/status", "status");
    digester.addBeanPropertySetter("$/statusInfo", "statusInfo");
    digester.addBeanPropertySetter("$/url", "url");
    digester.addBeanPropertySetter("$/language", "language");
    digester.addObjectCreate("$/concepts/concept", Concept.class);
View Full Code Here


    digester.addObjectCreate("$", ConceptResults.class);
    digester.addBeanPropertySetter("$/status", "status");
    digester.addBeanPropertySetter("$/statusInfo", "statusInfo");
    digester.addBeanPropertySetter("$/url", "url");
    digester.addBeanPropertySetter("$/language", "language");
    digester.addObjectCreate("$/concepts/concept", Concept.class);
    digester.addBeanPropertySetter("$/concepts/concept/text", "text");
    digester.addBeanPropertySetter("$/concepts/concept/relevance", "relevance");
    digester.addBeanPropertySetter("$/concepts/concept/website", "website");
    digester.addBeanPropertySetter("$/concepts/concept/geo", "geo");
    digester.addBeanPropertySetter("$/concepts/concept/dbpedia", "dbpedia");
View Full Code Here

  public Results parseAlchemyXML(InputStream stream) throws IOException, SAXException,
          URISyntaxException {

    Digester digester = new JsonDigester();
    digester.setValidating(false);
    digester.addObjectCreate("$", EntitiesResults.class);
    digester.addBeanPropertySetter("$/status");
    digester.addBeanPropertySetter("$/statusInfo", "statusInfo");
    digester.addBeanPropertySetter("$/url");
    digester.addBeanPropertySetter("$/language");
    digester.addObjectCreate("$/entities", Entity.class);
View Full Code Here

    digester.addObjectCreate("$", EntitiesResults.class);
    digester.addBeanPropertySetter("$/status");
    digester.addBeanPropertySetter("$/statusInfo", "statusInfo");
    digester.addBeanPropertySetter("$/url");
    digester.addBeanPropertySetter("$/language");
    digester.addObjectCreate("$/entities", Entity.class);
    digester.addBeanPropertySetter("$/entities/type");
    digester.addBeanPropertySetter("$/entities/relevance");
    digester.addBeanPropertySetter("$/entities/count");
    digester.addBeanPropertySetter("$/entities/text");
    digester.addObjectCreate("$/entities/disambiguated", Disambiguated.class);
View Full Code Here

    digester.addObjectCreate("$/entities", Entity.class);
    digester.addBeanPropertySetter("$/entities/type");
    digester.addBeanPropertySetter("$/entities/relevance");
    digester.addBeanPropertySetter("$/entities/count");
    digester.addBeanPropertySetter("$/entities/text");
    digester.addObjectCreate("$/entities/disambiguated", Disambiguated.class);
    digester.addBeanPropertySetter("$/entities/disambiguated/name", "name");
    digester.addBeanPropertySetter("$/entities/disambiguated/subType", "subType");
    digester.addBeanPropertySetter("$/entities/disambiguated/website", "website");
    digester.addBeanPropertySetter("$/entities/disambiguated/geo", "geo");
    digester.addBeanPropertySetter("$/entities/disambiguated/dbpedia", "dbpedia");
View Full Code Here

    digester.addBeanPropertySetter("$/entities/disambiguated/ciaFactbook", "ciaFactbook");
    digester.addBeanPropertySetter("$/entities/disambiguated/census", "census");
    digester.addBeanPropertySetter("$/entities/disambiguated/geonames", "geonames");
    digester.addBeanPropertySetter("$/entities/disambiguated/musicBrainz", "musicBrainz");
    digester.addSetNext("$/entities/disambiguated", "setDisambiguated");
    digester.addObjectCreate("$/entities/quotations", Quotations.class);
    digester.addBeanPropertySetter("$/entities/quotations/quotation", "quotation");
    digester.addSetNext("$/entities/quotations", "setQuotations");
    digester.addSetNext("$/entities", "addEntity");
    return (Results) digester.parse(stream);
  }
View Full Code Here

  public Results parseAlchemyXML(InputStream stream) throws IOException, SAXException,
          URISyntaxException {

    Digester digester = new JsonDigester();
    digester.setValidating(false);
    digester.addObjectCreate("$", CategorizationResults.class);
    digester.addBeanPropertySetter("$/status", "status");
    digester.addBeanPropertySetter("$/statusInfo", "statusInfo");
    digester.addBeanPropertySetter("$/url", "url");
    digester.addBeanPropertySetter("$/language", "language");
    digester.addBeanPropertySetter("$/category", "category");
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.