OntModel is the in-memory knowledge base.That's where you create the
individual. By the way, some of your class mates asked similar things on
Stackoverflow, so it looks like you're doing some assignments.
I also don't see the problem. A user enters a String and you use this to
create the individual
Bad XML in RDF/XML.
On 14/07/16 16:48, tina sani wrote:
I will, currently I am away from code.
On Thu, Jul 14, 2016 at 8:47 AM, A. Soroka wrote:
Please give us a more complete example, including data, code, and a
complete stacktrace.
---
A. Soroka
The University of Virginia Library
On Jul
Yep, now that I know that's not legal syntax, I'll rewrite my query
using the second syntax you quoted.
Chris
On 7/14/2016 11:58 AM, Andy Seaborne wrote:
?s ?p1/?p2 ?o
is also
?s ?p1 [ ?p2 ?o ] .
ARQ expands / anyway.
Or
?s ?p1 ?X .
?X ?p2 ?o .
(internally the ?X is a variable that can'
In that case, can I request a better error message? What it told me was
confusing.
Chris
On 7/14/2016 10:58 AM, Joshua TAYLOR wrote:
You can't use variables in property paths, so
?p1/?p2
isn't a legal property path. You shouldn't be able to parse it as a
legal query. As an alternative (wh
You're right; my mistake. Correcting the typo doesn't affect the error,
though.
Chris
On 7/14/2016 10:47 AM, A. Soroka wrote:
I don't quite see how this would cause the problem, but I do note that of the three bindings in
your code below, the first is _not_ to "s" (as you say in your descrip
?s ?p1/?p2 ?o
is also
?s ?p1 [ ?p2 ?o ] .
ARQ expands / anyway.
Or
?s ?p1 ?X .
?X ?p2 ?o .
(internally the ?X is a variable that can't clash with one in the query)
Andy
On 14/07/16 17:58, Joshua TAYLOR wrote:
You can't use variables in property paths, so
?p1/?p2
isn't a legal prope
You can't use variables in property paths, so
?p1/?p2
isn't a legal property path. You shouldn't be able to parse it as a
legal query. As an alternative (which I'm not sure will work, but it
might be worth investigating), you could use a
ParameterizedSparqlString with "?s ?p1/?p2 ?o" as content
I don't quite see how this would cause the problem, but I do note that of the
three bindings in your code below, the first is _not_ to "s" (as you say in
your description), but to "o".
---
A. Soroka
The University of Virginia Library
> On Jul 14, 2016, at 12:09 PM, Chris Jones wrote:
>
> I'm
I'm building a simple query of the form "?s ?p1 / ?p2 ?o" and binding s,
p1, and p2 using QuerySolutionMap. I get this error back:
Exception in thread "main" org.apache.jena.query.QueryParseException:
Encountered " "/" "/ "" at line 1, column 26.
Here's the code that reproduces the error, usi
I will, currently I am away from code.
On Thu, Jul 14, 2016 at 8:47 AM, A. Soroka wrote:
> Please give us a more complete example, including data, code, and a
> complete stacktrace.
>
> ---
> A. Soroka
> The University of Virginia Library
>
> > On Jul 14, 2016, at 11:46 AM, tina sani wrote:
> >
Please give us a more complete example, including data, code, and a complete
stacktrace.
---
A. Soroka
The University of Virginia Library
> On Jul 14, 2016, at 11:46 AM, tina sani wrote:
>
> No my ontology has at least 8-10 classes and similarly properties.
>
> On Thu, Jul 14, 2016 at 8:41 AM
No my ontology has at least 8-10 classes and similarly properties.
On Thu, Jul 14, 2016 at 8:41 AM, A. Soroka wrote:
> It can be from reading an empty file. Is the file you are trying to read
> empty?
>
> ---
> A. Soroka
> The University of Virginia Library
>
> > On Jul 14, 2016, at 11:25 AM, ti
It can be from reading an empty file. Is the file you are trying to read empty?
---
A. Soroka
The University of Virginia Library
> On Jul 14, 2016, at 11:25 AM, tina sani wrote:
>
> I am getting this type of error/exception: Pre Mature end of file". Is this
> coming from reading a file which is
I am getting this type of error/exception: Pre Mature end of file". Is this
coming from reading a file which is empty or something else?
I have written this code
InputStream in = FileManager.get().open( somefile
if (in == null) {
throw new IllegalArgumentException( "File: " + file + " no file exi
Should I open a Jira for this as well? Seems like a bug to me.
On Thu, 14 Jul 2016 at 15:48, Andy Seaborne wrote:
> On 13/07/16 22:33, Martynas Jusevičius wrote:
> > Hey,
> >
> > I upgraded Jena from 2.11.0 to 3.0.1 and OntModel imports stopped
> > working when getOntology() is called.
> >
> > I
I don't know if startRequest was called or not, since I didn't write any log
there, other than capturing the start time.
This is my code (the graphDataset is the subclass code I mentioned):
UpdateRequest request = UpdateFactory.read(stream, Syntax.syntaxARQ);
GraphStore graphStore = GraphStore
On 14/07/16 13:48, Zen 98052 wrote:
Hi,
I subclass DatasetGraphBase and implements GraphStore interface.
The interface has method of startRequest and finishRequest.
I don't bother startRequest, but I add code to call flush (to our back-end
store) in finishRequest.
Yesterday we encountered sa
On 13/07/16 22:33, Martynas Jusevičius wrote:
Hey,
I upgraded Jena from 2.11.0 to 3.0.1 and OntModel imports stopped
working when getOntology() is called.
I traced the problem to AdapterFileManager.readModelWorker(Model
model, String filenameOrURI, String baseURI, String syntax), where
mode
Hi,
I subclass DatasetGraphBase and implements GraphStore interface.
The interface has method of startRequest and finishRequest.
I don't bother startRequest, but I add code to call flush (to our back-end
store) in finishRequest.
Yesterday we encountered same issue again, which finishRequest ne
I am sorry but I thought if Ontclass can be passed as null, so shall be
OntModel. My sole purpose is to pass the string entered by user to the
read() which can be used create individuals.
On Thu, Jul 14, 2016 at 5:03 AM, Lorenz B. <
buehm...@informatik.uni-leipzig.de> wrote:
> In which the seco
On 14/07/16 11:38, Andy Seaborne wrote:
On 14/07/16 10:10, Martynas Jusevičius wrote:
Hey,
Jena seems to use another DTD than the one hosted by W3C:
https://www.w3.org/2004/03/trix/trix-1/trix-1.0.dtd vs.
https://github.com/apache/jena/blob/master/jena-arq/src/main/java/org/apache/jena/riot/lan
In which the second argument is the class and not the model as in your
code. It looks like you did mostly copy and paste without understanding
the code.
In your case the model is ALWAYS null, do you understand that?
> I have read it here:
> http://tutorial-academy.com/category/java/
>
> He used nu
I have read it here:
http://tutorial-academy.com/category/java/
He used null argument in the main() method:
public static void main(String[] args)
{
// create OntModel
OntModel model = ModelFactory.createOntologyModel();
// read camera ontology
readOntology( "./ontology/camera.owl", model );
// s
I don't get it. Where did you saw this in the Jena tutorial?
And do you understand that when you call in your main()
read(str, null);
that the second argument is always null, thus, the code will never go
into the if-clause?
> The read() method is given below: I used null reference after reading
On 14/07/16 10:10, Martynas Jusevičius wrote:
Hey,
Jena seems to use another DTD than the one hosted by W3C:
https://www.w3.org/2004/03/trix/trix-1/trix-1.0.dtd vs.
https://github.com/apache/jena/blob/master/jena-arq/src/main/java/org/apache/jena/riot/lang/TriX.java
As per the comments : it us
The read() method is given below: I used null reference after reading this
tutorial of Jena which used it in main().
*Since I have to create individual of name entered in text field and then
button clicked, either I need OntClass in button handler or the string of
text field in the read() method.*
Hey,
Jena seems to use another DTD than the one hosted by W3C:
https://www.w3.org/2004/03/trix/trix-1/trix-1.0.dtd vs.
https://github.com/apache/jena/blob/master/jena-arq/src/main/java/org/apache/jena/riot/lang/TriX.java
>From the first glance, at least the root element differs: vs. .
The TriX
Andy already told you correctly that you call
read(str, null) thus the second argument is null.
Moreover, you did not show the read() method but only readOntology(),
thus, nobody knows what's going inside the read() method. But obviously,
some object is null and you call a method on that. I sugge
*As I also mentioned in the code: model.write(), it writes the rdf to
console and load the GUI also.*
*But when I enter text and press button ,it gives exception error:*
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at javaapplication4.NewJFrame.read(NewJFrame.java:53)
at j
29 matches
Mail list logo