Package org.sindice.siren.analysis

Examples of org.sindice.siren.analysis.JsonTokenizer


      @Override
      protected TokenStreamComponents createComponents(final String fieldName,
                                                       final Reader reader) {
        final Version matchVersion = Version.LUCENE_40;
        final JsonTokenizer src = new JsonTokenizer(reader);
        TokenStream tok = new DatatypeAnalyzerFilter(matchVersion, src,
          new StandardAnalyzer(matchVersion),
          new StandardAnalyzer(matchVersion));
        tok = new LowerCaseFilter(matchVersion, tok);
        // The PositionAttributeFilter and SirenPayloadFilter are mandatory
View Full Code Here


    super.init(args);
  }

  @Override
  public JsonTokenizer create(final Reader input) {
    return new JsonTokenizer(input);
  }
View Full Code Here

    args.put(URILocalnameFilterFactory.MAXLENGTH_KEY, "8");
    final URILocalnameFilterFactory factory = new URILocalnameFilterFactory();
    factory.init(args);

    final Reader reader = new StringReader("{ \"uri\" : \"http://test/anotherLocalname\" }");
    final TokenStream stream = factory.create(new JsonTokenizer(reader));
    this.assertTokenStreamContents(stream,
        new String[] { "uri", "anotherLocalname", "http://test/anotherLocalname" });
  }
View Full Code Here

TOP

Related Classes of org.sindice.siren.analysis.JsonTokenizer

Copyright © 2018 www.massapicom. 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.