Examples of newTwig()


Examples of org.sindice.siren.qparser.json.dsl.QueryBuilder.newTwig()

      b.newTwig("identifier").with(
        // here, twig with empty root node to represent first nested entity node
        b.newTwig().with(b.newTwig("id").with(b.newNode("9780852935392")))
                   .with(b.newTwig("type").with(b.newNode("isbn")))
      ).toString(),
      b.newBoolean().with(b.newTwig("subject").with(b.newNode("Computer security")))
                    .with(b.newTwig("isPartOf").with(
                      // here, twig with empty root node to represent first nested entity node
                      b.newTwig().with(
                        b.newTwig("identifier").with(
                          // here, twig with empty root node to represent second nested entity node
View Full Code Here

Examples of org.sindice.siren.qparser.json.dsl.QueryBuilder.newTwig()

        // here, twig with empty root node to represent first nested entity node
        b.newTwig().with(b.newTwig("id").with(b.newNode("9780852935392")))
                   .with(b.newTwig("type").with(b.newNode("isbn")))
      ).toString(),
      b.newBoolean().with(b.newTwig("subject").with(b.newNode("Computer security")))
                    .with(b.newTwig("isPartOf").with(
                      // here, twig with empty root node to represent first nested entity node
                      b.newTwig().with(
                        b.newTwig("identifier").with(
                          // here, twig with empty root node to represent second nested entity node
                          b.newTwig().with(
View Full Code Here

Examples of org.sindice.siren.qparser.json.dsl.QueryBuilder.newTwig()

                   .with(b.newTwig("type").with(b.newNode("isbn")))
      ).toString(),
      b.newBoolean().with(b.newTwig("subject").with(b.newNode("Computer security")))
                    .with(b.newTwig("isPartOf").with(
                      // here, twig with empty root node to represent first nested entity node
                      b.newTwig().with(
                        b.newTwig("identifier").with(
                          // here, twig with empty root node to represent second nested entity node
                          b.newTwig().with(
                            b.newTwig("id").with(b.newNode("\"0302-9743\""))
                          )
View Full Code Here

Examples of org.sindice.siren.qparser.json.dsl.QueryBuilder.newTwig()

      ).toString(),
      b.newBoolean().with(b.newTwig("subject").with(b.newNode("Computer security")))
                    .with(b.newTwig("isPartOf").with(
                      // here, twig with empty root node to represent first nested entity node
                      b.newTwig().with(
                        b.newTwig("identifier").with(
                          // here, twig with empty root node to represent second nested entity node
                          b.newTwig().with(
                            b.newTwig("id").with(b.newNode("\"0302-9743\""))
                          )
                        )
View Full Code Here

Examples of org.sindice.siren.qparser.json.dsl.QueryBuilder.newTwig()

                    .with(b.newTwig("isPartOf").with(
                      // here, twig with empty root node to represent first nested entity node
                      b.newTwig().with(
                        b.newTwig("identifier").with(
                          // here, twig with empty root node to represent second nested entity node
                          b.newTwig().with(
                            b.newTwig("id").with(b.newNode("\"0302-9743\""))
                          )
                        )
                      )
                    )).toString()
View Full Code Here

Examples of org.sindice.siren.qparser.json.dsl.QueryBuilder.newTwig()

                      // here, twig with empty root node to represent first nested entity node
                      b.newTwig().with(
                        b.newTwig("identifier").with(
                          // here, twig with empty root node to represent second nested entity node
                          b.newTwig().with(
                            b.newTwig("id").with(b.newNode("\"0302-9743\""))
                          )
                        )
                      )
                    )).toString()
    };
View Full Code Here

Examples of org.sindice.siren.qparser.json.dsl.QueryBuilder.newTwig()

    final NodeTermQuery owner = new NodeTermQuery(new Term("", "DeviceOwner"));
    owner.setDatatype("json:field");

    // Use the query builder to create twig query using the JSON query syntax.
    final QueryBuilder builder = new QueryBuilder();
    final TwigQuery twq = builder.newTwig(owner.toString("json"))
                           .with(
                             builder.newTwig(website.toString("json"))
                                    .with(builder.newNode(uri.toString("json"))),
                             2);
View Full Code Here

Examples of org.sindice.siren.qparser.json.dsl.QueryBuilder.newTwig()

    // Use the query builder to create twig query using the JSON query syntax.
    final QueryBuilder builder = new QueryBuilder();
    final TwigQuery twq = builder.newTwig(owner.toString("json"))
                           .with(
                             builder.newTwig(website.toString("json"))
                                    .with(builder.newNode(uri.toString("json"))),
                             2);

    query.setQuery(twq.toString());
    return query;
View Full Code Here

Examples of org.sindice.siren.qparser.json.dsl.QueryBuilder.newTwig()

   */
  private String[] getJsonQueries() throws QueryNodeException {
    final QueryBuilder b = new QueryBuilder();
    final String[] queries = {
      b.newNode("\"Marie Antoinette\"").toString(),
      b.newTwig("genre").with(b.newNode("Drama")).toString(),
      b.newBoolean().with(b.newTwig("genre").with(b.newNode("Drama")))
                    .with(b.newTwig("year").with(b.newNode("2010"))).toString(),
      b.newTwig("director").with(
        // here, twig with empty root node to represent first nested entity node
        b.newTwig().with(b.newTwig("last_name").with(b.newNode("Eastwood")))
View Full Code Here

Examples of org.sindice.siren.qparser.json.dsl.QueryBuilder.newTwig()

  private String[] getJsonQueries() throws QueryNodeException {
    final QueryBuilder b = new QueryBuilder();
    final String[] queries = {
      b.newNode("\"Marie Antoinette\"").toString(),
      b.newTwig("genre").with(b.newNode("Drama")).toString(),
      b.newBoolean().with(b.newTwig("genre").with(b.newNode("Drama")))
                    .with(b.newTwig("year").with(b.newNode("2010"))).toString(),
      b.newTwig("director").with(
        // here, twig with empty root node to represent first nested entity node
        b.newTwig().with(b.newTwig("last_name").with(b.newNode("Eastwood")))
                   .with(b.newTwig("first_name").with(b.newNode("Clint")))
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.