Examples of BindingSet


Examples of org.openrdf.query.BindingSet

    throws TupleQueryResultHandlerException, StoreException
  {
    handler.startQueryResult(tqr.getBindingNames());
    try {
      while (tqr.hasNext()) {
        BindingSet bindingSet = tqr.next();
        handler.handleSolution(bindingSet);
      }
    }
    finally {
      tqr.close();
View Full Code Here

Examples of org.openrdf.query.BindingSet

      Iterable<? extends BindingSet> queryResult2, Map<BNode, BNode> bNodeMapping, int idx)
  {
    boolean result = false;

    if (idx < queryResult1.size()) {
      BindingSet bs1 = queryResult1.get(idx);

      List<BindingSet> matchingBindingSets = findMatchingBindingSets(bs1, queryResult2, bNodeMapping);

      for (BindingSet bs2 : matchingBindingSets) {
        // Map bNodes in bs1 to bNodes in bs2
View Full Code Here

Examples of org.openrdf.query.BindingSet

      request.acceptTupleQueryResult();
      execute(request);
      TupleResult result = request.getTupleQueryResult();
      try {
        if (result.hasNext()) {
          BindingSet bindings = result.next();
          return (BNode)bindings.getValue(BNODE);
        }
        return null;
      }
      finally {
        result.close();
View Full Code Here

Examples of org.openrdf.query.BindingSet

    List<Resource> contextList = new ArrayList<Resource>();

    TupleResult contextIDs = client.contexts().list();
    try {
      while (contextIDs.hasNext()) {
        BindingSet bindingSet = contextIDs.next();
        Value context = bindingSet.getValue("contextID");

        if (context instanceof Resource) {
          contextList.add((Resource)context);
        }
      }
View Full Code Here

Examples of org.openrdf.query.BindingSet

          writeln(separatorLine);

          // Write table rows

          while (tupleQueryResult.hasNext()) {
            BindingSet bindingSet = tupleQueryResult.next();
            resultCount++;

            sb.setLength(0);
            for (String bindingName : bindingNames) {
              Value value = bindingSet.getValue(bindingName);
              String valueStr = getStringRepForValue(value, namespaces);

              sb.append("| ").append(valueStr);
              StringUtil.appendN(' ', columnWidth - valueStr.length(), sb);
            }
View Full Code Here

Examples of org.openrdf.query.BindingSet

    List<RepositoryInfo> result = new ArrayList<RepositoryInfo>();

    try {
      TupleResult responseFromServer = client.repositories().list();
      while (responseFromServer.hasNext()) {
        BindingSet bindingSet = responseFromServer.next();
        RepositoryInfo repInfo = new RepositoryInfo();

        String id = LiteralUtil.getLabel(bindingSet.getValue("id"), null);

        if (skipSystemRepo && id.equals(SystemRepository.ID)) {
          continue;
        }

        Value uri = bindingSet.getValue("uri");
        String description = LiteralUtil.getLabel(bindingSet.getValue("title"), null);

        if (uri instanceof URI) {
          try {
            repInfo.setLocation(new URL(uri.toString()));
          }
View Full Code Here

Examples of org.openrdf.query.BindingSet

   *---------*/

  public BindingSet next()
    throws StoreException
  {
    BindingSet rightBindings = rightCursor.next();

    while (rightBindings == null) {
      // right cursor exhausted
      rightCursor.close();

      BindingSet leftBindings = leftCursor.next();
      if (leftBindings != null) {
        rightCursor = strategy.evaluate(rightArg, leftBindings);
        rightBindings = rightCursor.next();
      }
      else {
View Full Code Here

Examples of org.openrdf.query.BindingSet

   *---------*/

  public BindingSet next()
    throws StoreException
  {
    BindingSet leftBindings = null;
    BindingSet rightBindings = rightCursor.next();

    while (rightBindings != null || (leftBindings = leftCursor.next()) != null) {
      if (rightBindings == null) {
        // right cursor exhausted
        rightCursor.close();
View Full Code Here

Examples of org.openrdf.query.BindingSet

    try {
      List<Entry> orderedEntries = new ArrayList<Entry>();
      Map<Key, Entry> entries = new HashMap<Key, Entry>();

      BindingSet bindingSet;
      while ((bindingSet = iter.next()) != null) {
        Key key = new Key(group, bindingSet);
        Entry entry = entries.get(key);

        if (entry == null) {
View Full Code Here

Examples of org.openrdf.query.BindingSet

    Cursor<BindingSet> iter = strategy.evaluate(group.getArg(), parentBindings);

    try {
      Map<Key, Entry> entries = new HashMap<Key, Entry>();

      BindingSet sol;
      while ((sol = iter.next()) != null) {
        Key key = new Key(group, sol);
        Entry entry = entries.get(key);

        if (entry == null) {
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.