Package com.hp.hpl.jena.shared

Examples of com.hp.hpl.jena.shared.JenaException


            return false ;

    StmtIterator pointsToIter = obj.getModel().listStatements(null, null, obj) ;
    if ( ! pointsToIter.hasNext() )
      // Corrupt graph!
      throw new JenaException("N3: found object with no arcs!") ;

    Statement s = pointsToIter.nextStatement() ;
              
    if ( pointsToIter.hasNext() )
            return false ;
View Full Code Here


     */
    public static File getScratchDirectory( String prefix )
    {
        File result = new File( getTempDirectory(), prefix + randomNumber() );
        if (result.exists()) return getScratchDirectory( prefix );
        if (result.mkdir() == false) throw new JenaException( "mkdir failed on " + result );
        result.deleteOnExit();
        return result;  
    }
View Full Code Here

        try {
            zipFileName = zfn ;
            zipFile = new ZipFile(zipFileName) ;
        } catch  (IOException ex)
        {
            throw new JenaException("Problems accessing "+zipFileName, ex) ;
        }
    }
View Full Code Here

            if ( classLoader != null )
                log.trace ( "Using system classloader" ) ;
        }
       
        if ( classLoader == null )
            throw new JenaException ( "Failed to find a classloader" ) ;

        return classLoader ;
    }
View Full Code Here

    /**
        We object strongly to null labels: for example, they make .equals flaky.
    */
    public static Node create( NodeMaker maker, Object label )
        {
        if (label == null) throw new JenaException( "Node.make: null label" );
        return maker.construct( label ) ;
        }
View Full Code Here

            // Alternatively, look for the a single resource of the right type.
            try {
                // Find the required description - the file can contain descriptions of many different types.
                root = GraphUtils.findRootByType(spec, VocabTDB.tDatasetTDB) ;
                if ( root == null )
                    throw new JenaException("Failed to find a suitable root") ;
            } catch (TypeNotUniqueException ex)
            { throw new JenaException("Multiple types for: "+DatasetAssemblerVocab.tDataset) ; }
        }

        Dataset ds = (Dataset)Assembler.general.open(root) ;
    }
View Full Code Here

  {
  protected final ModelCom model;

  protected StatementBase( ModelCom model )
    {
    if (model == null) throw new JenaException( "Statement models must no be null" );
    this.model = model;
    }
View Full Code Here

            byte[] digest = digester.digest(key.toString().getBytes());
            Node skolem = NodeFactory.createAnon( new AnonId( Base64.encode(digest) ) );
            return context.getEnv().bind(args[0], skolem);
           
        } catch (NoSuchAlgorithmException e) {
            throw new JenaException(e);
        }
    }
View Full Code Here

    @Override
    public void add(Quad quad)
    {
        Graph g = fetchGraph(quad.getGraph()) ;
        if ( g == null )
            throw new JenaException("No such graph: "+quad.getGraph()) ;
        g.add(quad.asTriple()) ;
    }
View Full Code Here

    @Override
    public void delete(Quad quad)
    {
        Graph g = fetchGraph(quad.getGraph()) ;
        if ( g == null )
            throw new JenaException("No such graph: "+quad.getGraph()) ;
        g.delete(quad.asTriple()) ;
    }
View Full Code Here

TOP

Related Classes of com.hp.hpl.jena.shared.JenaException

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.