Examples of QueryModel


Examples of org.jzkit.search.util.QueryModel.QueryModel

    log.info("JZKit server startup completed");

    Vector collection_ids = new Vector();
    collection_ids.add("LC/BOOKS");

    QueryModel qm = new PrefixString("@attrset bib-1 @attr 1=4 Science");

    System.err.println("Processing search......");

    try {
      Map additional_properties = new HashMap();
View Full Code Here

Examples of org.jzkit.search.util.QueryModel.QueryModel

    SearchSession search_service = (SearchSession) app_context.getBean("SearchSession",SearchSession.class);

    Vector collection_ids = new Vector();
    collection_ids.add("LC/BOOKS");

    QueryModel qm = new PrefixString("@attrset bib-1 @attr 1=4 Science");

    System.err.println("Processing search......");

    TransformingIRResultSet result_set=
               search_service.search(new org.jzkit.search.landscape.SimpleLandscapeSpecification(collection_ids),qm,request_spec);
View Full Code Here

Examples of org.onebusaway.webapp.gwt.oba_application.model.QueryModel

    ModelEventSourceAndSink<StateEvent> stateEvents = events.getEventSourceAndSink(StateEvent.class);

    /**
     * Model Layer
     */
    QueryModel queryModel = new QueryModel();
    queryModel.setEventSink(locationQueryModelEvents);
    queryModel.setQueryModelEventSink(queryModelEvents);

    TimedRegionModel timedRegionModel = new TimedRegionModel();
    TimedPolygonModel timedPolygonModel = new TimedPolygonModel();

    ResultsModel resultsModel = new ResultsModel();
View Full Code Here

Examples of org.openrdf.query.algebra.QueryModel

   *         If the specified query language is not supported.
   */
  public static TupleQueryModel parseTupleQuery(QueryLanguage ql, String query, String baseURI)
    throws MalformedQueryException, UnsupportedQueryLanguageException
  {
    QueryModel q = parseQuery(ql, query, baseURI);

    if (q instanceof TupleQueryModel) {
      return (TupleQueryModel)q;
    }

View Full Code Here

Examples of org.openrdf.query.algebra.QueryModel

   *         If the specified query language is not supported.
   */
  public static GraphQueryModel parseGraphQuery(QueryLanguage ql, String query, String baseURI)
    throws MalformedQueryException, UnsupportedQueryLanguageException
  {
    QueryModel q = parseQuery(ql, query, baseURI);

    if (q instanceof GraphQueryModel) {
      return (GraphQueryModel)q;
    }

View Full Code Here

Examples of org.openrdf.query.algebra.QueryModel

   *         If the specified query language is not supported.
   */
  public static BooleanQueryModel parseBooleanQuery(QueryLanguage ql, String query, String baseURI)
    throws MalformedQueryException, UnsupportedQueryLanguageException
  {
    QueryModel q = parseQuery(ql, query, baseURI);

    if (q instanceof BooleanQueryModel) {
      return (BooleanQueryModel)q;
    }

View Full Code Here

Examples of org.openrdf.query.algebra.QueryModel

  }

  private void evaluateQuery(QueryLanguage ql, String queryString) {
    try {
      queryString = addQueryPrefixes(ql, queryString);
      QueryModel query = QueryParserUtil.parseQuery(ql, queryString, null);
      if (query instanceof TupleQueryModel) {
        evaluateTupleQuery(ql, queryString);
      }
      else if (query instanceof GraphQueryModel) {
        evaluateGraphQuery(ql, queryString);
View Full Code Here

Examples of org.openrdf.query.algebra.QueryModel

  }

  public SailQuery prepareQuery(QueryLanguage ql, String queryString, String baseURI)
    throws MalformedQueryException
  {
    QueryModel parsedQuery = QueryParserUtil.parseQuery(ql, queryString, baseURI);

    if (parsedQuery instanceof TupleQueryModel) {
      return new SailTupleQuery((TupleQueryModel)parsedQuery, this);
    }
    else if (parsedQuery instanceof GraphQueryModel) {
      return new SailGraphQuery((GraphQueryModel)parsedQuery, this);
    }
    else if (parsedQuery instanceof BooleanQueryModel) {
      return new SailBooleanQuery((BooleanQueryModel)parsedQuery, this);
    }
    else {
      throw new RuntimeException("Unexpected query type: " + parsedQuery.getClass());
    }
  }
View Full Code Here

Examples of org.openrdf.query.algebra.QueryModel

      // TODO: check use of unbound variables?

      TupleExpr tupleExpr = QueryModelBuilder.buildQueryModel(qc, new ValueFactoryImpl());

      ASTQuery queryNode = qc.getQuery();
      QueryModel query;
      if (queryNode instanceof ASTTupleQuery) {
        query = new TupleQueryModel(tupleExpr);
      }
      else if (queryNode instanceof ASTGraphQuery) {
        query = new GraphQueryModel(tupleExpr, namespaces);
View Full Code Here

Examples of org.openrdf.query.algebra.QueryModel

      Map<String, String> prefixes = PrefixDeclProcessor.process(qc);
      WildcardProjectionProcessor.process(qc);
      BlankNodeVarProcessor.process(qc);
      TupleExpr tupleExpr = buildQueryModel(qc);

      QueryModel query;

      ASTQuery queryNode = qc.getQuery();
      if (queryNode instanceof ASTSelectQuery) {
        query = new TupleQueryModel(tupleExpr);
      }
      else if (queryNode instanceof ASTConstructQuery) {
        query = new GraphQueryModel(tupleExpr, prefixes);
      }
      else if (queryNode instanceof ASTAskQuery) {
        query = new BooleanQueryModel(tupleExpr);
      }
      else if (queryNode instanceof ASTDescribeQuery) {
        query = new GraphQueryModel(tupleExpr, prefixes);
      }
      else {
        throw new RuntimeException("Unexpected query type: " + queryNode.getClass());
      }

      // Handle dataset declaration
      Dataset dataset = DatasetDeclProcessor.process(qc);
      if (dataset != null) {
        query.setDefaultGraphs(dataset.getDefaultGraphs());
        query.setNamedGraphs(dataset.getNamedGraphs());
      }

      return query;
    }
    catch (ParseException e) {
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.