Re: Dbpedia: Which is better way to extract data

2017-11-13 Thread Sidra shah
you need in > your application. Good luck. > > > On 12.11.2017 18:17, Sidra shah wrote: > > thank you Lorenz for your time and guidance. I am working on it and will > > get back to you, if required. > > > > Regards > > > > On Sun, Nov 12, 2017 at 4:41 PM,

Re: Dbpedia: Which is better way to extract data

2017-11-12 Thread Sidra shah
thank you Lorenz for your time and guidance. I am working on it and will get back to you, if required. Regards On Sun, Nov 12, 2017 at 4:41 PM, Lorenz Buehmann < buehm...@informatik.uni-leipzig.de> wrote: > > > On 12.11.2017 11:16, Sidra shah wrote: > > Hello Lo

Re: Dbpedia: Which is better way to extract data

2017-11-12 Thread Sidra shah
tion of Dbpedia data" should be via ontology. It means do not use Dbpedia endpoint inside your application. Regards On Sat, Nov 11, 2017 at 7:17 PM, Lorenz Buehmann < buehm...@informatik.uni-leipzig.de> wrote: > > > On 11.11.2017 14:58, Sidra shah wrote: > > Thank yo

Re: Dbpedia: Which is better way to extract data

2017-11-11 Thread Sidra shah
nk> <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2> On Sat, Nov 11, 2017 at 3:39 PM, Lorenz Buehmann < buehm...@informatik.uni-leipzig.de> wrote: > > > On 11.11.2017 12:55, Sidra shah wrote: > > Hello Lorenz and thank you for your information. > > > > * All the data

Re: Dbpedia: Which is better way to extract data

2017-11-11 Thread Sidra shah
ou mean by the second point ... what is an > >> "IRI editor"??? And then, how would that extract "some triples"? > >> > >> > >> As I don't know what you're asking about and to keep it short, the > >> common way to extract

Re: Dbpedia: Which is better way to extract data

2017-11-11 Thread Sidra shah
r" > > 2. I don't understand what you mean by the second point ... what is an > "IRI editor"??? And then, how would that extract "some triples"? > > > As I don't know what you're asking about and to keep it short, the > common way to extra

Re: Dbpedia: Which is better way to extract data

2017-11-10 Thread Sidra shah
This is question about Jena. We access Dbpedia inside Java/Jena application. On Fri, Nov 10, 2017 at 7:37 PM, dandh988 wrote: > This is a mailing list for Jena... > That said whatever solves your problem... > > > Dick > Original message ----From: Sidra shah >

Dbpedia: Which is better way to extract data

2017-11-10 Thread Sidra shah
Hello For instance, if we have to get some triples from Dbpedia, which one is better way to get? (1) Directly use Dbpedia endpoint inside application? (2) Use Ontology and use IRI editor like dbpedia.org/resource/SOMETHING? Thank you

Re: Filter query not working

2017-09-04 Thread Sidra shah
n't make the > project more complicated than necessary. > > > [1] https://jena.apache.org/documentation/query/text-query.html > > > On 01.09.2017 17:43, Sidra shah wrote: > > Sorry Rob, if my question bothered. > > > > I thought the problem is in my query and that

Re: Filter query not working

2017-09-01 Thread Sidra shah
then you should direct > your questions to a general programming forum e.g. StackOverflow > > Rob > > On 01/09/2017 16:22, "Sidra shah" wrote: > > Hello Rob, > > I have a string variable ss for string John kim, so when user enter > name, >

Re: Filter query not working

2017-09-01 Thread Sidra shah
ively if you wanted all that search words to be matched you might > do the following: > > FILTER(REGEX(?name, “John”, “i”) && REGEX(?name, “kim”, “i”)) > > However you have to do some work to decide how you want to translate the > user search words into an appropriate

Re: Filter query not working

2017-09-01 Thread Sidra shah
GEX "John kim" does not match the literal > "John". > > Simply split the string by white space and combine this in your REGEX > > > On 01.09.2017 15:31, Sidra shah wrote: > > Hello Lorenz, thank you > > > > It matches now matches the name when

Re: Filter query not working

2017-09-01 Thread Sidra shah
won't match the literal "John kim" > > > As I don't know the data nor your query, I only know that the query > > SELECT * > WHERE > { ?x mo:publishedBy ?y ; > mo:authorname ?name ; > rdfs:label ?label > FILTER regex(str(?

Filter query not working

2017-08-31 Thread Sidra shah
Hello I used Filter query in Jena which will filter the query using a name in text area. In my dataset, the name is John Kim but I want if a user enter even John, it display the result. I use this query but it does not display. select * WHERE { ?x mo:publishedBy ?y.?x mo:authorname ?name. ?x rdf

Re: Construct query from DBpedia

2017-08-22 Thread Sidra shah
also be written: > > CONSTRUCT WHERE { :France onto:anthem ?x } > > Andy > > > On 22/08/17 14:04, Sidra shah wrote: > >> Hello >> >> What is the purpose of this query? The where clause shows the triple >> already exist but then why one would ne

Construct query from DBpedia

2017-08-22 Thread Sidra shah
Hello What is the purpose of this query? The where clause shows the triple already exist but then why one would need it in Construct? PREFIX : PREFIX onto: CONSTRUCT { :France onto:anthem ?x } WHERE { :France onto:anthem ?x . }

Re: Jena rules work as SPARQL query

2017-08-15 Thread Sidra shah
Hello Lorenz and thank you. To some extent, I got the point, now time to practice it :) Regards On Tue, Aug 15, 2017 at 1:10 PM, Lorenz Buehmann < buehm...@informatik.uni-leipzig.de> wrote: > > > On 15.08.2017 10:56, Sidra shah wrote: > > Hi Lorenz, I know him and I have

Re: Jena rules work as SPARQL query

2017-08-15 Thread Sidra shah
te + insert: > > > > > > DELETE { > > > > } > > > > INSERT { > > > > } > > > > WHERE { > > > > } > > > [1] > https://mail-archives.apache.org/mod_mbox/jena-users/ > 201707.mbox/%3CCAJhui%2BtTHYsz4qtYjpsVBmZp

Re: Jena rules work as SPARQL query

2017-08-14 Thread Sidra shah
e of StarPlayer while the old value also exists i-e remains the instance of Player class. I am not sure if same problem will arise also when we use INSERT query rather than jena rules. Regards On Mon, Aug 14, 2017 at 11:39 PM, Dave Reynolds wrote: > On 14/08/17 21:31, Sidra shah wrote: > &

Re: Jena rules work as SPARQL query

2017-08-14 Thread Sidra shah
) and want if it could be replaced with SPARQL queries. Regards On Mon, Aug 14, 2017 at 11:20 PM, Dave Reynolds wrote: > On 14/08/17 19:05, Sidra shah wrote: > >> Can we perform jena rules duties from SPARQL? >> >> (?x rdf:type :Player) (?x :Score ?score) greatert

Jena rules work as SPARQL query

2017-08-14 Thread Sidra shah
Can we perform jena rules duties from SPARQL? (?x rdf:type :Player) (?x :Score ?score) greaterthan (?score "10") -? (?x rdf:type :StarPlayer) Construct {?x rdf:type :StarPlayer} Where { ?x rdf:type :Player. ?x :Score ?score. > ?score 10) Regards

(Real) functions of construct query

2017-08-05 Thread Sidra shah
Hello. I am not sure if the Sparql Construct query work works the same like we add a statement using Rdf API? I have read an example which shows: ?x :hascapital ?y which outputs several triples. The article then used Construct query as Construct { ?y :capitalOf ?x} WHERE { ?x :hascapital ?y } S

Re: The query not working

2017-07-03 Thread Sidra shah
book is not equal to (i.e. exactly) the string 'Semantic > Web'. > > In your original email, you had: > >?book ='str' > > (It is easy to run out of date code.) > > Andy > > > > On 03/07/17 12:34, Sidra shah wrote: &g

Re: The query not working

2017-07-03 Thread Sidra shah
= results.nextSolution(); Resource subj = (Resource) binding.get("s"); ss= subj.getLocalName().toString(); System.out.println(ss); On Mon, Jul 3, 2017 at 2:12 PM, Sidra shah wrote: > Hello Lorenz, BookCategory is a data property whose value is string (Java >

Re: The query not working

2017-07-03 Thread Sidra shah
; > Print the query string that is created. > > Check the prefixes. > > Make sure that you properly distinguish between literals and URIs -> is > a book category a literal or a resource? Is the value of str a URI or a > literal? > > > On 03.07.2017 07:12, Sidra shah wr

The query not working

2017-07-02 Thread Sidra shah
Hello I have a Book class having Java and Semantic Web sub classes. Java class have some instances: JSP, Java by Dietel, JDBC Semantic Web has also some instances: SPARQL, Semantic Programming, etc. I have a data property BookCategory for each instance which will be either Java or Semantic Web I

Semantic web meta data

2017-05-07 Thread Sidra shah
Hi I do not know if it is relevant question to this forum but I will appreciate if some one explain how semantic web works and is better than the current web in "expressing meaning" of data. There is also meta data available for current web like we use in databases i-e title, name etc so what is S

Re: OFFSET

2017-02-07 Thread Sidra shah
t. Don't forget to sort. > > Andy > > > On 07/02/17 14:42, Sidra shah wrote: > >> Hello, I have ten questions and want to display questions from 3-6 first >> and the rest after that. Is it possible through Order by and Offset >> keyword? >> >> Regards >> >>

OFFSET

2017-02-07 Thread Sidra shah
Hello, I have ten questions and want to display questions from 3-6 first and the rest after that. Is it possible through Order by and Offset keyword? Regards

Re: Query works in Protege, not in Jena code

2017-02-04 Thread Sidra shah
?CatName. ?Qs mo:hasLevel ?lev. ?lev mo:level ?LevName. ?Qs mo:hasScore ?point.?point mo:score ?Score. ?Qs mo:hasComplexity ?l. FILTER ( ?CatName ='Physics' ). FILTER ( ?LevName ='Easy' ). }ORDER BY ?l On Sat, Feb 4, 2017 at 7:52 PM, Sidra shah wrote: > I have inc

Re: Query works in Protege, not in Jena code

2017-02-04 Thread Sidra shah
I have included the hasComplexity property values just in five questions and it loads only these five questions, it means it recognizes this property but again not in order. Regards On Sat, Feb 4, 2017 at 7:44 PM, Sidra shah wrote: > Hello, I copied the object properties here. I have obj

Re: Query works in Protege, not in Jena code

2017-02-04 Thread Sidra shah
strates the problem. > > A minimal-complete-example is not a dump of everything you have. It is > creating a focused question. In fact, just the act of creating it can help > you understand the problem. > > Andy > > > >> --- >> A. Soroka >> The University of

Re: Query works in Protege, not in Jena code

2017-02-04 Thread Sidra shah
t;> Moreover what's missing: > >> > >> 1. sample code > >> 2. sample data > >> 3. sample output > >> > >>> The queries are different because in Protege I retrieve only questions > >> and > >>> their complexity num

Re: Query works in Protege, not in Jena code

2017-02-04 Thread Sidra shah
in Jena I get questions, answers, choices, > > scores and its complexity order. > > > > Regards > > > > On Fri, Feb 3, 2017 at 6:36 PM, Sidra shah > wrote: > > > >> Thank you Lorenz, 1,2,3,4,5 are resources and it has URIs. Question has > >&g

Re: Query works in Protege, not in Jena code

2017-02-03 Thread Sidra shah
The queries are different because in Protege I retrieve only questions and their complexity number while in Jena I get questions, answers, choices, scores and its complexity order. Regards On Fri, Feb 3, 2017 at 6:36 PM, Sidra shah wrote: > Thank you Lorenz, 1,2,3,4,5 are resources and it

Re: Query works in Protege, not in Jena code

2017-02-03 Thread Sidra shah
d > be clear that you should compare the SAME queries > > > It remains open what kind of RDF term the complexity values > are...literals or resources > > > On 03.02.2017 16:18, Sidra shah wrote: > > Hello, This query works fine and get data i-e Questions, answers, choices &g

Query works in Protege, not in Jena code

2017-02-03 Thread Sidra shah
Hello, This query works fine and get data i-e Questions, answers, choices and their score. But when I want to include object property hasComplexity (its values are 1,2,3,4,5) and try to order it, its not working. (The query still get data but not in order). While this works inside Protege and show

Re: Store Questions in owl file

2017-01-31 Thread Sidra shah
they likely to be in an array. user1.setPropertyValue gets one value, how set all these array of values. Regards On Tue, Jan 31, 2017 at 5:58 PM, Sidra shah wrote: > Thank you Chris, I have already a Question class which contains all the > questions. Should I take its sub classes CorrectQue

Re: Store Questions in owl file

2017-01-31 Thread Sidra shah
, probably by SPARQL Order By query. All other data about user will be stored in the main/first owl file. Regards On Tue, Jan 31, 2017 at 5:43 PM, Chris Dollin wrote: > > > On 31/01/17 14:19, Sidra shah wrote: > >> Thank you Chris, but I think it will look like strange if we have: >

Re: Store Questions in owl file

2017-01-31 Thread Sidra shah
Dollin wrote: > > > On 31/01/17 14:05, Sidra shah wrote: > >> Thank you Chris, but how? >> > > You already know how to associate scores with users, yes? > > Associating questions with users is the same thing, except > using a different property and different v

Re: Store Questions in owl file

2017-01-31 Thread Sidra shah
gt; > On 31/01/17 13:45, Sidra shah wrote: > >> Hello >> I have a quiz type game in which questions/answers and user information is >> given in the quiz and stored in owl file. >> Now I want if a user incorrectly solve some questions, I store them in owl >> file an

Store Questions in owl file

2017-01-31 Thread Sidra shah
Hello I have a quiz type game in which questions/answers and user information is given in the quiz and stored in owl file. Now I want if a user incorrectly solve some questions, I store them in owl file and associate it with that user like we associate user score to a particular user. Is it possib

Re: How I handle "Null Pointer Exception"

2017-01-18 Thread Sidra shah
Hello Lorenz, where should I upload my file? On Wed, Jan 18, 2017 at 6:26 PM, Lorenz Buehmann < buehm...@informatik.uni-leipzig.de> wrote: > > > On 18.01.2017 14:43, Sidra shah wrote: > > Similarly, how can I make BestCategory as data property? When I take it > as >

Re: How I handle "Null Pointer Exception"

2017-01-18 Thread Sidra shah
, Jan 18, 2017 at 4:14 PM, Sidra shah wrote: > Hello Lorenz, its not giving me the exception now but it does not display > the message JOption,. It does not read the * if (s1=="CatPhysics")* > > > RDFNode phFav=indiv.getPropertyValue(favcat); >

Re: How I handle "Null Pointer Exception"

2017-01-18 Thread Sidra shah
ring s1=l1.toString(); } if (s1=="CatPhysics"){ JOptionPane.showMessageDialog(null, "Phyics category"); } On Wed, Jan 18, 2017 at 2:12 PM, Sidra shah wrote: > Thank you Lorenz, let me read the document you mention here. I w

Re: How I handle "Null Pointer Exception"

2017-01-18 Thread Sidra shah
gt; "greaterThan(?cat1,?cat2), greaterThan(?cat1,?cat3)" > >>> + " -> (?x http://www.semanticweb.org/t/ > >>> ontologies/2016/7/myOWL#BestCategory http://www.semanticweb.org/t/ > >>> ontologies/2016/7/myOWL#BestCategory#Phy

Re: How I handle "Null Pointer Exception"

2017-01-18 Thread Sidra shah
gt; + " -> (?x http://www.semanticweb.org/t/ > > ontologies/2016/7/myOWL#BestCategory http://www.semanticweb.org/t/ > > ontologies/2016/7/myOWL#BestCategory#Physics )]"; > > > > > > The BestCategory is object property. > > > > Regar

Re: How I handle "Null Pointer Exception"

2017-01-17 Thread Sidra shah
tCategory#Physics )]"; The BestCategory is object property. Regards On Tue, Jan 17, 2017 at 8:16 PM, Andy Seaborne wrote: > A Complete, Minimal Example please. > > > Partial code, no data is not complete. > It must compile and run to be complete. > > Minimal m

Re: How I handle "Null Pointer Exception"

2017-01-17 Thread Sidra shah
ot;); RDFNode phFav=indiv.getPropertyValue(favcat); if (phFav!=null){ Literal l1=phFav.asLiteral(); s1=l1.toString();} if (s1=="CatPhysics"){ JOptionPane.showMessageDialog(null, "Physics"); } Best regards On

Re: How I handle "Null Pointer Exception"

2017-01-17 Thread Sidra shah
Hello Chris, thanks a lot for your suggestion. Best regards. On Tue, Jan 17, 2017 at 5:37 PM, Chris Dollin wrote: > > > On 17/01/17 13:30, Sidra shah wrote: > >> Hi Lorenz, I am sorry but with much regards, you discussed here the >> problem, not the solution :) :) &g

Re: How I handle "Null Pointer Exception"

2017-01-17 Thread Sidra shah
correct result. Regards On Tue, Jan 17, 2017 at 4:30 PM, Sidra shah wrote: > Hi Lorenz, I am sorry but with much regards, you discussed here the > problem, not the solution :) :) > > I know this if there is no value, there must be Null exception, but can > you suggest me a way

Re: How I handle "Null Pointer Exception"

2017-01-17 Thread Sidra shah
Hi Lorenz, I am sorry but with much regards, you discussed here the problem, not the solution :) :) I know this if there is no value, there must be Null exception, but can you suggest me a way where we dodge the compiler and it skip the lines when there is no value. I know this is more a Java pro

Re: How I handle "Null Pointer Exception"

2017-01-17 Thread Sidra shah
I mean Lorenz, is there any way, if there is no value, it do nothing (do not give exception) and if there is value, it should simply give us the value. if (l1!=null) supposed to work. :) Is it possible if we use something if (li==null) break; And we should get out of this snippet? Regards On

Re: How I handle "Null Pointer Exception"

2017-01-17 Thread Sidra shah
Hello Lorenz, thanks. Is there any way (alternative) to get this value as I need it further in my operation? Regards On Tue, Jan 17, 2017 at 4:03 PM, Lorenz B. < buehm...@informatik.uni-leipzig.de> wrote: > > > > Hello Lorenz, believe me I have tried this before I write my problem here > > in t

Re: How I handle "Null Pointer Exception"

2017-01-17 Thread Sidra shah
Hello Lorenz, believe me I have tried this before I write my problem here in the forum but the problem persists. I also tried if s1!=null. . RDFNode physicsBestCat=indiv.getPropertyValue(bestcat); Literal l1=physicsBestCat.asLiteral(); if (l1!=null){ String s1=l1.toSt

How I handle "Null Pointer Exception"

2017-01-17 Thread Sidra shah
Hello, I asked about this rule few days ago. String rule ="[rule1: ( ?x http://www.semanticweb.org/t/o ntologies/2016/7/myOWL#Physics_Preferred_Category ?cat1 )" + "( ?x http://www.semanticweb.org/t/ontologies/2016/7/myOWL#Chem_Pr eferred_Category ?cat2 )" + // "( ?x http://www.semanticw

Re: Problem in Rule

2017-01-15 Thread Sidra shah
pertyValue-org.apache. > jena.rdf.model.Property- > [2] > https://jena.apache.org/documentation/javadoc/jena/ > org/apache/jena/ontology/ObjectProperty.html > > > > Again thank you. > > > > On Sat, Jan 14, 2017 at 10:00 PM, Sidra shah > wrote: > > &g

Re: Problem in Rule

2017-01-15 Thread Sidra shah
y class have three members, that is catPhysics, catChemistry and > catGeography. > I will let you know the outcome. > > Thanks again Dave, > > Kind regards > > On Sat, Jan 14, 2017 at 9:29 PM, Dave Reynolds > wrote: > >> On 14/01/17 18:22, Sidra shah wrote: >> &g

Re: Problem in Rule

2017-01-14 Thread Sidra shah
catPhysics, catChemistry and catGeography. I will let you know the outcome. Thanks again Dave, Kind regards On Sat, Jan 14, 2017 at 9:29 PM, Dave Reynolds wrote: > On 14/01/17 18:22, Sidra shah wrote: > >> Thank you Dave for such a detailed reply. Actually you got my problem, but >

Re: Problem in Rule

2017-01-14 Thread Sidra shah
you are > trying to do). If I load that into protege then I can see the individual > fred and the ex:BestCategory property is shown as being a property > assertion not an axiom. > > So on the face of it there is nothing wrong. > > Now if that's not enough to help you s

Problem in Rule

2017-01-14 Thread Sidra shah
Hello All, I have a problem, very same to Neha. I was waiting some answer will come and I will get help but I think it did not solve. I have quiz game for three categories(subjects) Physics, Chemistry and Geography. User have to select one category and questions of that category will come. When us

Re: Ont Property

2016-11-22 Thread Sidra shah
Thanks Lorenz for your guidance. Best regards On Tue, Nov 22, 2016 at 4:29 PM, Lorenz B. < buehm...@informatik.uni-leipzig.de> wrote: > Ok, I overlooked that you have the value given. > > > > Lorenz, with regards, > > > > Is it mandatory to use : if( Value == null) > No, not if you can ensure th

Re: Ont Property

2016-11-22 Thread Sidra shah
Lorenz, with regards, Is it mandatory to use : if( Value == null) I mean every property will have a value. In my case, the property supposed to have three values so I need: if (Value=="Value1") //do this if (Value=="Value2") //do this else // do this However, in general case, I want to ask

Re: Ont Property

2016-11-22 Thread Sidra shah
Hello Lorenz thanks, You mean something like this: RDFNode Value =individual.getPropertyValue(myPropertyName); if (Value=="PropertyValue") // On Tue, Nov 22, 2016 at 3:36 PM, Lorenz B. < buehm...@informatik.uni-leipzig.de> wrote: > You can use Individual::getPropertyValue, see [1] > > [1] > h

Ont Property

2016-11-22 Thread Sidra shah
Does Jena have hasOntProperty() like we have hasOntClass()? In my project I need something like if instance/individual has "this property value", do some operation. Thank you for your time.

Re: rdfs:comment

2016-09-08 Thread Sidra shah
n via Jena. > > > On 08.09.2016 12:18, Sidra shah wrote: > > Hello Lorenz sir, do we have some alternative way to get this like > > downloading rdfs:comment of all resources from DBpedia and process it > > locally? > > Actually my data i-e about hundred cities are in

Re: rdfs:comment

2016-09-08 Thread Sidra shah
se would also > be your task to first get the data from the remote endpoint > > b) get the information from the remote endpoint via SPARQL > > > On 07.09.2016 13:46, Sidra shah wrote: > > Cant we access it through a Resource? If I include comment with every > > instan

Re: rdfs:comment

2016-09-07 Thread Sidra shah
wrote: > How many students of you are doing the same homework assignment? > > > Write a SPARQL query to get the rdfs:comment from the DBpedia endpoint. > > On 06.09.2016 14:17, Sidra shah wrote: > > I have a question class in my ontolgy which have instance: What is > capit

Re: rdfs:comment

2016-09-06 Thread Sidra shah
;t see the image, probably attachments are not allowed here > > Lorenz > > On 06.09.2016 12:43, Sidra shah wrote: > > Hi > > > > How can we get the rdfs:comment of certain resource in dbpedia? I give > > the address of resource in protege, but when I close

rdfs:comment

2016-09-06 Thread Sidra shah
Hi How can we get the rdfs:comment of certain resource in dbpedia? I give the address of resource in protege, but when I close it and open again, the address changes again to my ontology address and under comment Annotation only the address appears like http://dbpedia.org/Madrid instead of the com

Adding property value to individual (data property)

2016-08-30 Thread Sidra shah
I have OntClass student = model.createClass(ns + "Student"); OntClass std = model.getOntClass(ns + "Student "); Individual bob = user1.createIndividual(ns + name); Property prop= model.getProperty(ns,"marks"); I have now datatype property "marks" in my ontology. How can I assign