Package com.hp.hpl.jena.sparql

Examples of com.hp.hpl.jena.sparql.ARQException


        @Override
        public void visit(P_NegPropSet pathNotOneOf)
        {
            List<P_Path0> props = pathNotOneOf.getNodes() ;
            if ( props.size() == 0 )
                throw new ARQException("Bad path element: NotOneOf found with no elements") ;
            out.print("!") ;
            if ( props.size() == 1 )
                output(props.get(0)) ;
            else
            {
View Full Code Here


           
            // X !(:a|:b|^:c|^:d) Y = { X !(:a|:b) Y } UNION { Y !(:c|:d) X }
           
            List<Node> props = pathNotOneOf.getFwdNodes() ;
            if ( props.size() == 0 )
                throw new ARQException("Bad path element: Negative property set found with no elements") ;
            //Iterator<Node> nodes = doOneExclude(pathNotOneOf.getFwdNodes(), pathNotOneOf.getBwdNodes()) ;
            Iterator<Node> nodes = doOneExclude(pathNotOneOf.getFwdNodes()) ;
            fill(nodes) ;
        }
View Full Code Here

                w.write(NL) ;
            }
            w.flush() ;
        } catch (IOException ex)
        {
            throw new ARQException(ex) ;
        }
    }
View Full Code Here

            else
                out.write(noBytes) ;
            out.write(NLBytes) ;
        } catch (IOException ex)
        {
            throw new ARQException(ex) ;
        }
    }
View Full Code Here

                  }
                  first = false;
            } else {
              int num_tokens = tokens.length;
                  if ( num_tokens != vars.size() ) {
                     throw new ARQException(String.format("Line %d has %d values instead of %d.", line, num_tokens, vars.size()));
                  }
                  BindingMap binding = BindingFactory.create();
                  for ( int i = 0; i < tokens.length; i++ ) {
                    String token = tokens[i];
                    Tokenizer tokenizer = TokenizerFactory.makeTokenizerString(token);
                    if ( tokenizer.hasNext() && token.length() > 0 ) {
                      Node node = tokenizer.next().asNode();
                      binding.add(vars.get(i), node);
                    }
                  }
                  bindings.add(binding);
            }
          }
        } catch ( IOException ex ) {
          throw new ARQException(ex) ;
        }

        return new ResultSetStream(varNames, null, new QueryIterPlainWrapper(bindings.iterator()));
    }
View Full Code Here

        {
            if ( components.get(i) != null )
                indexes[idx++] = i ;
        }
        if ( triples.size() != idx )
            throw new ARQException(String.format("Inconsistency: number of triples (%d) does not equal to number of indexes processed (%d)", triples.size(), idx)) ;
       
        ReorderProc proc = new ReorderProcIndexes(indexes) ;
       
        return proc ;
    }
View Full Code Here

    }
   
    private static void checkGraphName(String uri)
    {
        if ( uri == null )
            throw new ARQException("null for graph name") ;
    }
View Full Code Here

                out.print(s) ;
            }
            else
            {
                out.print("Target BROKEN") ;
                throw new ARQException("Malformed Target") ;
            }
        }
View Full Code Here

                out.print(s) ;
            }
            else
            {
                out.print("Target BROKEN / Update2") ;
                throw new ARQException("Malformed Target / Update2") ;
            }
        }
View Full Code Here

            }
           
            w.flush() ;
        } catch (IOException ex)
        {
            throw new ARQException(ex) ;
        }
    }
View Full Code Here

TOP

Related Classes of com.hp.hpl.jena.sparql.ARQException

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.