You can subscribe to this list here.
2005 |
Jan
|
Feb
(16) |
Mar
(6) |
Apr
(38) |
May
(23) |
Jun
(5) |
Jul
(1) |
Aug
|
Sep
(10) |
Oct
(7) |
Nov
(6) |
Dec
(4) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(20) |
Feb
(32) |
Mar
(24) |
Apr
(29) |
May
(5) |
Jun
(10) |
Jul
(12) |
Aug
(7) |
Sep
(1) |
Oct
(2) |
Nov
(27) |
Dec
(4) |
2007 |
Jan
(37) |
Feb
(10) |
Mar
(19) |
Apr
(10) |
May
(10) |
Jun
(7) |
Jul
(19) |
Aug
(29) |
Sep
(5) |
Oct
(17) |
Nov
(14) |
Dec
(2) |
2008 |
Jan
(4) |
Feb
(4) |
Mar
|
Apr
(8) |
May
|
Jun
(8) |
Jul
(1) |
Aug
(7) |
Sep
|
Oct
(1) |
Nov
(4) |
Dec
|
2009 |
Jan
|
Feb
(1) |
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
(2) |
2010 |
Jan
|
Feb
(2) |
Mar
(2) |
Apr
|
May
(4) |
Jun
|
Jul
|
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
|
2011 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(4) |
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
(2) |
2019 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <es...@gm...> - 2006-04-11 08:48:00
|
Hello. I am a new user from RDFAPI-PHP and I can 't assume a owl to read. I want to mount all of classes, properties and instances defined in owl fil= e to memory. Exactly, I can load the file but don 't know how I can get the classes, properties and instances. OntModel only supports the API, listClasses() to get classes. Am I right?? listClasses() returns Resource data type. How can I change Resource to OntClass.. This is the part of code to get classes in owl file. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D //create new memory model $ontModel =3D ModelFactory::getOntModel(MEMMODEL,RDFS_VOCABULARY); //load the parse document $ontModel->load(ROOT_DIRECTORY."software.owl"); // load classes $array =3D $ontModel->listClasses("http://ozzy.cbnu.ac.kr/ontology/ "); foreach( $array as $resource ){ echo $resouce->getLabel(); // How can I get the classes, properties and instances ?? } =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D I'll very happy if you give me a answer Thank you. Yang. |
From: Onno P. <onn...@gm...> - 2006-04-03 15:35:18
|
Dear Richard, The question is if RAP SPARQL can do it. I suppose the answer is no. I think we should not talk about *any* RDF+SPARQL tool. PHP is highly popular and every webhost offers it (albeit not PHP5). I think we should do an effort to make RAP the best. I believe ontology browsers are the future; they must be able to 'surf' triple stores. Onno Paap On 4/3/06, Richard Cyganiak <ri...@cy...> wrote: > > Hi Onno, > > On 3 Apr 2006, at 13:59, Onno Paap wrote: > > I would like to combine different ontology's resident in triple > > stores on different servers. Eventually, thousands of them. > > I am not certain but I suppose the SPARQL syntax provides for that. > Well ... SPARQL has syntax for querying multiple *graphs*. A graph > can be anything with a URI. > > The question is, what kind of URIs can you use in the FROM clause? > That depends totally on the triple store/toolkit you're using. > > In most SPARQL stores, you can put URIs of RDF files in the FROM > clause. This means you can query multiple RDF *files* that reside on > different servers. > > What you want to do is query multiple *endpoints*. I don't know of > *any* tool that can do this yet, but it would certainly be very > useful and cool. So if you build it, be sure to tell us about it! > > Richard > > |
From: Richard C. <ri...@cy...> - 2006-04-03 14:54:39
|
Hi Onno, On 3 Apr 2006, at 13:59, Onno Paap wrote: > I would like to combine different ontology's resident in triple > stores on different servers. Eventually, thousands of them. > I am not certain but I suppose the SPARQL syntax provides for that. Well ... SPARQL has syntax for querying multiple *graphs*. A graph can be anything with a URI. The question is, what kind of URIs can you use in the FROM clause? That depends totally on the triple store/toolkit you're using. In most SPARQL stores, you can put URIs of RDF files in the FROM clause. This means you can query multiple RDF *files* that reside on different servers. What you want to do is query multiple *endpoints*. I don't know of *any* tool that can do this yet, but it would certainly be very useful and cool. So if you build it, be sure to tell us about it! Richard > If not, I can work around it in plain old PHP programming, issuing > separate SPARQL queries for separate servers, but I would like to > know if that is the course of action or not. > > For example, I have two different SPARQL endpoints (they really > exist): > http://www.15926.org/2006/02/oim and > http://www.15926.org/2006/02/rdl > with named graphs in them of the same names. > They are not, but suppose they are on different servers. > Now I want to combine them like this: > > prefix dm: <http://www.15926.org/2006/02/dm#> > select ?id ?superclass > from < http://www.15926.org/2006/02/oim> > from <http://www.15926.org/2006/02/rdl> > where { > ?id rdfs:subClassOf ?x . > ?x owl:hasValue ?superclass . > ?superclass rdf:type dm:ClassOfInanimatePhysicalObject . > } > > Note: in RAP the namespaces rdfs, owl, and rdf don't need to be > declared with prefix. > > The top two triples in the where clause work for the .../rdl graph > and the bottom for the .../oim graph. > This combined query doesn't work in RAP SPARQL (I'm using netapi). > My question is: should it work? Or would it work with different > syntax? Or totally not? > Onno Paap |
From: Onno P. <onn...@gm...> - 2006-04-03 11:59:20
|
I would like to combine different ontology's resident in triple stores on different servers. Eventually, thousands of them. I am not certain but I suppose the SPARQL syntax provides for that. If not, I can work around it in plain old PHP programming, issuing separate SPARQL queries for separate servers, but I would like to know if that is the cours= e of action or not. For example, I have two different SPARQL endpoints (they really exist): http://www.15926.org/2006/02/oim and http://www.15926.org/2006/02/rdl with named graphs in them of the same names. They are not, but suppose they are on different servers. Now I want to combine them like this: prefix dm: <http://www.15926.org/2006/02/dm#> select ?id ?superclass from <http://www.15926.org/2006/02/oim> from <http://www.15926.org/2006/02/rdl> where { ?id rdfs:subClassOf ?x . ?x owl:hasValue ?superclass . ?superclass rdf:type dm:ClassOfInanimatePhysicalObject . } Note: in RAP the namespaces rdfs, owl, and rdf don't need to be declared with prefix. The top two triples in the where clause work for the .../rdl graph and the bottom for the .../oim graph. This combined query doesn't work in RAP SPARQL (I'm using netapi). My question is: should it work? Or would it work with different syntax? Or totally not? Onno Paap |
From: <h95...@wu...> - 2006-04-03 07:57:10
|
Thanks for your answers. I haven't checked it yet, but I think RDQL will be enough. I just started out with SPARQL because it was recommended over RDQL somewhere. Bye, Thomas |
From: Richard C. <ri...@cy...> - 2006-04-02 19:03:48
|
On 2 Apr 2006, at 20:39, Onno Paap wrote: > Dear Richard, > > This solution works perfectly. Great! > I hope you will put it in the CVS. Sure, as soon as SourceForge has repaired the developer CVS server. Richard > > Thank you! > Onno Paap > > > On 4/2/06, Richard Cyganiak <ri...@cy...> wrote: Onno, > > You're right, the xml namespace declaration doesn't have to be there, > and removing it is probably the right thing. I *think* that you > simply have to remove line 335 of /api/constants.php, which is the > middle line of these: > > $default_prefixes = array( > XML_NAMESPACE_PREFIX => XML_NAMESPACE_URI, > RDF_NAMESPACE_PREFIX => RDF_NAMESPACE_URI, > > This should remove the declaration from the CONSTRUCT output. I > haven't tested if it causes any breakage elsewhere. Can you please > let us know if it works for you? > > Thanks, > Richard > > > On 2 Apr 2006, at 17:46, Onno Paap wrote: > > When using SPARQL netapi, when outputting an entire model or > > outputting a CONSTRUCT query the output starts with: > > <rdf:RDF > > xml:base=" http://www.15926.org/2006/02/dm# > > xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" > > xmlns:xsd=" http://www.w3.org/2001/XMLSchema #" > > xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" > > xmlns:owl=" http://www.w3.org/2002/07/owl #" > > xmlns:xml="http://www.w3.org/XML/1998/namespace" > > xmlns:dc= http://purl.org/dc/elements/1.1/ > > ... etc > > > > This works fine in Firefox, but in Internet Explorer an error > > message comes up: > > > > > ---------------------------------------------------------------------- > > ---------- > > The XML page cannot be displayed > > Cannot view XML input using XSL style sheet. Please correct the > > error and then click the Refresh button, or try again later. > > The namespace prefix is not allowed to start with the reserved > > string "xml". Error processing resource ' http://localhost/be... > > xmlns:xml="http://www.w3.org/XML/1998/namespace " > > ---^ > > > ---------------------------------------------------------------------- > > ----------- > > The xml: namespace is not required to be declared (I think). It is > > not part of the model's namespaces stored in the RAP namespaces > > table, neither does it come up anywhere in the SPARQL sources. I am > > not able to solve it quickly. > > > > Onno Paap > > > > > > > > > -- > Onno Paap > Fluor corporation > +31 23 5432116 (work) > +31 6 21625149 (mobile) |
From: Onno P. <onn...@gm...> - 2006-04-02 18:39:14
|
Dear Richard, This solution works perfectly. I hope you will put it in the CVS. Thank you! Onno Paap On 4/2/06, Richard Cyganiak <ri...@cy...> wrote: > > Onno, > > You're right, the xml namespace declaration doesn't have to be there, > and removing it is probably the right thing. I *think* that you > simply have to remove line 335 of /api/constants.php, which is the > middle line of these: > > $default_prefixes =3D array( > XML_NAMESPACE_PREFIX =3D> XML_NAMESPACE_URI, > RDF_NAMESPACE_PREFIX =3D> RDF_NAMESPACE_URI, > > This should remove the declaration from the CONSTRUCT output. I > haven't tested if it causes any breakage elsewhere. Can you please > let us know if it works for you? > > Thanks, > Richard > > > On 2 Apr 2006, at 17:46, Onno Paap wrote: > > When using SPARQL netapi, when outputting an entire model or > > outputting a CONSTRUCT query the output starts with: > > <rdf:RDF > > xml:base=3D"http://www.15926.org/2006/02/dm# > > xmlns:rdf=3D"http://www.w3.org/1999/02/22-rdf-syntax-ns#" > > xmlns:xsd=3D"http://www.w3.org/2001/XMLSchema #" > > xmlns:rdfs=3D"http://www.w3.org/2000/01/rdf-schema#" > > xmlns:owl=3D"http://www.w3.org/2002/07/owl #" > > xmlns:xml=3D"http://www.w3.org/XML/1998/namespace" > > xmlns:dc=3Dhttp://purl.org/dc/elements/1.1/ > > ... etc > > > > This works fine in Firefox, but in Internet Explorer an error > > message comes up: > > > > ---------------------------------------------------------------------- > > ---------- > > The XML page cannot be displayed > > Cannot view XML input using XSL style sheet. Please correct the > > error and then click the Refresh button, or try again later. > > The namespace prefix is not allowed to start with the reserved > > string "xml". Error processing resource ' http://localhost/be... > > xmlns:xml=3D"http://www.w3.org/XML/1998/namespace" > > ---^ > > ---------------------------------------------------------------------- > > ----------- > > The xml: namespace is not required to be declared (I think). It is > > not part of the model's namespaces stored in the RAP namespaces > > table, neither does it come up anywhere in the SPARQL sources. I am > > not able to solve it quickly. > > > > Onno Paap > > > > > > -- Onno Paap Fluor corporation +31 23 5432116 (work) +31 6 21625149 (mobile) |
From: Richard C. <ri...@cy...> - 2006-04-02 17:14:59
|
Onno, You're right, the xml namespace declaration doesn't have to be there, and removing it is probably the right thing. I *think* that you simply have to remove line 335 of /api/constants.php, which is the middle line of these: $default_prefixes = array( XML_NAMESPACE_PREFIX => XML_NAMESPACE_URI, RDF_NAMESPACE_PREFIX => RDF_NAMESPACE_URI, This should remove the declaration from the CONSTRUCT output. I haven't tested if it causes any breakage elsewhere. Can you please let us know if it works for you? Thanks, Richard On 2 Apr 2006, at 17:46, Onno Paap wrote: > When using SPARQL netapi, when outputting an entire model or > outputting a CONSTRUCT query the output starts with: > <rdf:RDF > xml:base="http://www.15926.org/2006/02/dm# > xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" > xmlns:xsd="http://www.w3.org/2001/XMLSchema #" > xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" > xmlns:owl="http://www.w3.org/2002/07/owl #" > xmlns:xml="http://www.w3.org/XML/1998/namespace" > xmlns:dc=http://purl.org/dc/elements/1.1/ > ... etc > > This works fine in Firefox, but in Internet Explorer an error > message comes up: > > ---------------------------------------------------------------------- > ---------- > The XML page cannot be displayed > Cannot view XML input using XSL style sheet. Please correct the > error and then click the Refresh button, or try again later. > The namespace prefix is not allowed to start with the reserved > string "xml". Error processing resource ' http://localhost/be... > xmlns:xml="http://www.w3.org/XML/1998/namespace" > ---^ > ---------------------------------------------------------------------- > ----------- > The xml: namespace is not required to be declared (I think). It is > not part of the model's namespaces stored in the RAP namespaces > table, neither does it come up anywhere in the SPARQL sources. I am > not able to solve it quickly. > > Onno Paap > > |
From: Onno P. <onn...@gm...> - 2006-04-02 15:46:45
|
When using SPARQL netapi, when outputting an entire model or outputting a CONSTRUCT query the output starts with: <rdf:RDF xml:base=3D"http://www.15926.org/2006/02/dm# xmlns:rdf=3D"http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:xsd=3D"http://www.w3.org/2001/XMLSchema#" xmlns:rdfs=3D"http://www.w3.org/2000/01/rdf-schema#" xmlns:owl=3D"http://www.w3.org/2002/07/owl#" xmlns:xml=3D"http://www.w3.org/XML/1998/namespace" xmlns:dc=3Dhttp://purl.org/dc/elements/1.1/ ... etc This works fine in Firefox, but in Internet Explorer an error message comes up: ---------------------------------------------------------------------------= ----- The XML page cannot be displayed Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later. The namespace prefix is not allowed to start with the reserved string "xml"= . Error processing resource 'http://localhost/be... xmlns:xml=3D"http://www.w3.org/XML/1998/namespace" ---^ ---------------------------------------------------------------------------= ------ The xml: namespace is not required to be declared (I think). It is not part of the model's namespaces stored in the RAP namespaces table, neither does it come up anywhere in the SPARQL sources. I am not able to solve it quickly. Onno Paap |
From: Richard C. <ri...@cy...> - 2006-04-02 08:13:35
|
Thanks Onno, good catch. I fixed this and a couple of other places where <? was used in rdfdb-utils and the tests. The SourceForge developer CVS has been down since Friday so I can't commit the changes yet, but will do as soon as the SourceForge folks get their act together. Richard On 1 Apr 2006, at 16:59, Onno Paap wrote: > The file SparqlParserException.php starts with <? instead of <?php > This caused the source of this file to be displayed before each > SPARQL result, on my (Windows+Apache) system. > Onno Paap |
From: Gunnar A. G. <ggr...@cs...> - 2006-04-01 18:43:55
|
> I tried changing private variables to "var", public functions to > just "function" > etc., but I still get a error in SparqlEngine.php from this line: > $element = $it->current()->getStatement() In PHP4 this had to be done in two steps: $element1 = $it->current(); $element=$element1->getStatement() This might not solve any of your problems though :) I dont know anything about the sparql engine. -- Gunnar Aastrand Grimnes ggr...@cs... http://www.dfki.uni-kl.de/~grimnes |
From: Onno P. <onn...@gm...> - 2006-04-01 14:59:13
|
The file SparqlParserException.php starts with <? instead of <?php This caused the source of this file to be displayed before each SPARQL result, on my (Windows+Apache) system. Onno Paap |
From: Chris B. <bi...@ze...> - 2006-03-31 11:59:12
|
Hi Thomas, > > I tried to run RAP 0.9.3 on servers with PHP 4.3.10 and 4.4.2, but the > sparql > classes use features exclusive to PHP 5 (I guess - I'm new to OOP). > > Is it possible to use SPARQL with that RAP and PHP versions? [1] Sorry, the SPARQL package only works with PHP5. > Or is there an older version of RAP that will work? (I didn't find it > mentioned > in the release notes on sourceforge or in the documentation)? Do you really need SPARQL functionality or would RDQL be enough? If yes, you could use RAP's RDQL engine which works with PHP4. Cheers Chris > Any hints would be great! > > Bye, > Thomas > > [1] > I tried changing private variables to "var", public functions to just > "function" > etc., but I still get a error in SparqlEngine.php from this line: > $element = $it->current()->getStatement(); > > > > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a groundbreaking scripting > language > that extends applications into web and mobile media. Attend the live > webcast > and join the prime developer group breaking into this new coding > territory! > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 > _______________________________________________ > Rdfapi-php-interest mailing list > Rdf...@li... > https://lists.sourceforge.net/lists/listinfo/rdfapi-php-interest |
From: <h95...@wu...> - 2006-03-31 08:24:26
|
Hello! I tried to run RAP 0.9.3 on servers with PHP 4.3.10 and 4.4.2, but the sparql classes use features exclusive to PHP 5 (I guess - I'm new to OOP). Is it possible to use SPARQL with that RAP and PHP versions? [1] Or is there an older version of RAP that will work? (I didn't find it mentioned in the release notes on sourceforge or in the documentation)? Any hints would be great! Bye, Thomas [1] I tried changing private variables to "var", public functions to just "function" etc., but I still get a error in SparqlEngine.php from this line: $element = $it->current()->getStatement(); |
From: <h95...@wu...> - 2006-03-30 20:35:33
|
Hello! I tried to run RAP 0.9.3 on servers with PHP 4.3.10 and 4.4.2, but the sparql classes use features exclusive to PHP 5 (I guess - I'm new to OOP). Is it possible to use SPARQL with that RAP and PHP versions? [1] Or is there an older version of RAP that will work? (I didn't find it mentioned in the release notes on sourceforge or in the documentation)? Any hints would be really great! Bye, Thomas [1] I tried changing private variables to "var", public functions to just "function" etc., but I still get a error in SparqlEngine.php from this line: $element = $it->current()->getStatement(); |
From: sampath v. <sam...@gm...> - 2006-03-27 18:17:03
|
Hi, I am using RAP(Statement-Centric MemModel API) for my conference publications management project. For each publication we automatically generate RDF file. All the files are kept on the server. I am building the interface for reporting and querying. I am using the find method. Here is my rdf file and the code for querying. Problems: 1) I do not want the results in html table format. I want it as a list wher= e I get the file name. 2) I have to search a number of RDF files. Can you suggest me a way. Sample publication rdf file: <?xml version=3D"1.0" encoding=3D"UTF-8" ?> <?xml-stylesheet type=3D"text/xsl" href=3D"../publication.xsl"?> <rdf:RDF xml:base=3D"../index.rdf#" xmlns:rdf=3D"http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs=3D"http://www.w3.org/2000/01/rdf-schema#" xmlns:ns1=3D"http://purl.org/dc/elements/1.1/" xmlns:ns2=3D"http://purl.org/dc/terms/"> <rdf:Description rdf:about=3D"./p1.pdf"> <ns1:title>Foreground Object Detection from Videos Containing Complex Background </ns1:title> <ns1:type>subunit</ns1:type> <ns2:DCMIType>publication</ns2:DCMIType> <ns2:abstract>This paper proposes a novel method for detection and segmentation of foreground objects from a video which contains both stationary and moving background objects and undergoes both gradual and sudden changes. A Bayes decision rule for classification of background and foreground from selected feature vectors i= s formulated. Under this rule, different types of background objects will be classified from foregroun= d objects by choosing a proper feature vector. The stationary background object is described by the color feature, and the moving background object is represented by the color co-occurrence feature. Foreground objects are extracted by fusing the classification results from both stationary and moving pixels. Learning strategies for the gradual and sudden background changes are proposed to adapt to various changes in background through the video. The convergence of the learning process is proved and a formula to select a proper learning rate is also derived. Experiments have shown promising results in extracting foreground objects from many complex backgrounds including wavering tre= e branches, flickering screens and water surfaces, moving escalators, opening and closing doors, switching light= s and shadows of moving objects.</ns2:abstract> <ns1:subject>Video processing, background modeling, foreground segmentation, video surveillance, Bayes model, color co-occurrence. </ns1:subject> <ns2:references>I. Haritaoglu, D. Harwood, and L. Davis. W4: Real-time surveillance of people and their activities. </ns2:references> <ns1:contributor>L. Li, W. Huang, I. Y. H. Gu, Q. Tian</ns1:contributor= > <ns1:format>pdf</ns1:format> <ns2:isPartOf> http://www.ndsu.edu/ndsu/velupula/cms/conference1/index.rdf</ns2:isPartOf> <ns2:isFormatOf>Content Analysis</ns2:isFormatOf> </rdf:Description> </rdf:RDF> Sample Code to Query: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>Conference Management System</title> </head> <body> <h1 align=3D"center">Conference Management System </h1> <p> </p> <p><strong>SEARCH RESULTS:</strong></p> <?php define("RDFAPI_INCLUDE_DIR", "rdfapi-php/api/"); include_once(RDFAPI_INCLUDE_DIR."RdfAPI.php"); // Filename of an RDF document $base=3D"./conference1/p1.rdf"; // Create a new MemModel $model =3D ModelFactory::getDefaultModel(); // Load and parse document $model->load($base); $homepage =3D new Literal("Content Analysis"); $res =3D $model->find(NULL, NULL, $homepage); $res->writeAsHtmlTable(); echo $res->toStringIncludingTriples(); echo "<P>"; ?> </body> </html> Please do reply me. Thanks in advance. -- Sampath Velupula |
From: sampath v. <sam...@gm...> - 2006-03-20 02:53:37
|
Hi! I just signed up for a great promotion that I think you should check out. We can both get a free new IPOD nano! http://www.entakety.com/?r=3DMVGEAigikxY2A2oHAy4O&i=3Dgmail&z=3D1&tc=3D18 Talk to you soon! |
From: Alexandre P. <al...@pa...> - 2006-03-12 12:45:09
|
Hi, FYI, I managed to do what I wanted using InfModel, and not OntModel. The 3 steps are: - Adding the vocabulary in RAP vocabularies - Defining the model as an instance of InfModelF - Adding subproperties statements as: $this->add(new Statement(RELATIONSHIP::ACQUAINTANCE_OF(), RDFS::SUB_PROPERTY_OF(), FOAF::KNOWS()); So that any findFirstMatchingStatement($subject, FOAF::KNOWS, $null) query returns all statements with rel:xxx as a predicate. As I have to add the Relationship vocabulary in RAP, I created a small script to quickly do it, instead of writing or copy/pasting properties/class definition. The script can be used for any vocabulary, and can be downloaded here: http://apassant.net/share/semweb/vocab2rap-0.1.tgz. Feel free to add it in RAP if you think it's usefull. Alex. 2006/2/23, Josef Petr=E1k <jsp...@gm...>: > Hi, > > I am not sure how exactly the OntModel works but be aware! FOAF and > relationship module are not ontologies but "plain" RDF Schemas. While > I was playing with Java tool Jastor for generating model from > ontologies I was faced with this problem and got into trouble. > > Josef Petr=E1k > > On 2/23/06, Alexandre Passant <al...@pa...> wrote: > > Hi, > > > > I used RAP to write a FOAF parser [1], in which I use MemModel to read > > my RDF files. > > > > I recently thaught about FOAF extensions, as the Relationship > > vocabulary [2], which defines some subproperties of foaf:knows. > > > > At the moment, with my MemModel, I use > > findFirstMatchingStatement($subject, FOAF::KNOWS, $null) to get all > > foaf:knows classes related to my subject. > > > > But, I assume, it won't work if the RDF files that use rel:worksWith > > instead of foaf:knows. > > > > Is that the role of OntModel to make this kind of queries work ? If > > so, should I have to write somewhere (in vocabulary folder) the > > Relationship model and its mapping with FOAF ? > > > > Thanx for any advice on this point. > > > > [1] http://gna.org/projects/phoaf > > [2] http://vocab.org/relationship/ > > > > > > ------------------------------------------------------- > > This SF.Net email is sponsored by xPML, a groundbreaking scripting lang= uage > > that extends applications into web and mobile media. Attend the live we= bcast > > and join the prime developer group breaking into this new coding territ= ory! > > http://sel.as-us.falkag.net/sel?cmdlnk&kid=110944&bid$1720&dat=121642 > > _______________________________________________ > > Rdfapi-php-interest mailing list > > Rdf...@li... > > https://lists.sourceforge.net/lists/listinfo/rdfapi-php-interest > > > > > -- > *** jspetrak (HW) *** > > Weblog: http://zapisky.info/ > Homepage: http://zapisky.info/home/ > > ICQ: 179271149 > Jabber: Imp...@nj... > > > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a groundbreaking scripting langua= ge > that extends applications into web and mobile media. Attend the live webc= ast > and join the prime developer group breaking into this new coding territor= y! > http://sel.as-us.falkag.net/sel?cmdlnk&kid=110944&bid$1720&dat=121642 > _______________________________________________ > Rdfapi-php-interest mailing list > Rdf...@li... > https://lists.sourceforge.net/lists/listinfo/rdfapi-php-interest > |
From: <tob...@we...> - 2006-03-09 10:56:55
|
Hi Markus, thank you for your bug report. The problem is in method findInNamedGraphs($graphnode,$subject,$predicate,$object) of DatasetMem and DatasetDb. The method of DatasetMem returns an iterator over all matched triples OR quads depending on the value of $graphnode. The method of DatasetDb returns always an iterator over all matched quads. I fixed it and put it in our CVS. Regards, Tobias > Hi again, > > i fixed the problem in ../rap/api/sparql/SparqlEngine.php in method > _buildResultSet(). The problem was, that the value of $triple in the > foreach loop is a Statement object if queried against the default > graph and otherwise the value is a Quad object if queried against a > named graph. I hope this fits to your needs and is a real bugfix > without following a new bug! > > regards, markus > > > /** > * Builds the resultset. > * > * @param GraphPattern $pattern > * @param Array $resmodel > * @return Array > */ > protected function _buildResultSet($pattern,$resmodel){ > // determine variables and their corresponding values > $result = null; > if(is_string($pattern->getSubject())){ > $n = 0; > foreach($resmodel['trip'] as $key => $triple){ > if(isset($resmodel['graphvar'][$key])) > $result[$n][$resmodel['graphvar'][$key]] = > $resmodel['graph'][$key]; > > // FIXED > if(isset($triple->subj)) { > $result[$n++][$pattern->getSubject()] = $triple->subj; > } else { > $result[$n++][$pattern->getSubject()] = $triple->statement->subj; > } > } > } > if(is_string($pattern->getPredicate())){ > $n = 0; > foreach($resmodel['trip'] as $key => $triple){ > if(isset($resmodel['graphvar'][$key])) > $result[$n][$resmodel['graphvar'][$key]] = > $resmodel['graph'][$key]; > > // FIXED > if(isset($triple->pred)) { > $result[$n++][$pattern->getPredicate()] = $triple->pred; > } else { > $result[$n++][$pattern->getPredicate()] = > $triple->statement->pred; > } > } > } > if(is_string($pattern->getObject())){ > $n = 0; > foreach($resmodel['trip'] as $key => $triple){ > if(isset($resmodel['graphvar'][$key])) > $result[$n][$resmodel['graphvar'][$key]] = > $resmodel['graph'][$key]; > > // FIXED > if(isset($triple->obj)) { > $result[$n++][$pattern->getObject()] = $triple->obj; > } else { > $result[$n++][$pattern->getObject()] = $triple->statement->obj; > } > } > } > > return $result; > } > > > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a groundbreaking scripting > language > that extends applications into web and mobile media. Attend the live > webcast > and join the prime developer group breaking into this new coding > territory! > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 > _______________________________________________ > Rdfapi-php-interest mailing list > Rdf...@li... > https://lists.sourceforge.net/lists/listinfo/rdfapi-php-interest |
From: Markus S. <m.s...@hi...> - 2006-03-08 18:51:17
|
Hi again, i fixed the problem in ../rap/api/sparql/SparqlEngine.php in method _buildResultSet(). The problem was, that the value of $triple in the foreach loop is a Statement object if queried against the default graph and otherwise the value is a Quad object if queried against a named graph. I hope this fits to your needs and is a real bugfix without following a new bug! regards, markus /** * Builds the resultset. * * @param GraphPattern $pattern * @param Array $resmodel * @return Array */ protected function _buildResultSet($pattern,$resmodel){ // determine variables and their corresponding values $result = null; if(is_string($pattern->getSubject())){ $n = 0; foreach($resmodel['trip'] as $key => $triple){ if(isset($resmodel['graphvar'][$key])) $result[$n][$resmodel['graphvar'][$key]] = $resmodel['graph'][$key]; // FIXED if(isset($triple->subj)) { $result[$n++][$pattern->getSubject()] = $triple->subj; } else { $result[$n++][$pattern->getSubject()] = $triple->statement->subj; } } } if(is_string($pattern->getPredicate())){ $n = 0; foreach($resmodel['trip'] as $key => $triple){ if(isset($resmodel['graphvar'][$key])) $result[$n][$resmodel['graphvar'][$key]] = $resmodel['graph'][$key]; // FIXED if(isset($triple->pred)) { $result[$n++][$pattern->getPredicate()] = $triple->pred; } else { $result[$n++][$pattern->getPredicate()] = $triple->statement->pred; } } } if(is_string($pattern->getObject())){ $n = 0; foreach($resmodel['trip'] as $key => $triple){ if(isset($resmodel['graphvar'][$key])) $result[$n][$resmodel['graphvar'][$key]] = $resmodel['graph'][$key]; // FIXED if(isset($triple->obj)) { $result[$n++][$pattern->getObject()] = $triple->obj; } else { $result[$n++][$pattern->getObject()] = $triple->statement->obj; } } } return $result; } |
From: Markus S. <m.s...@hi...> - 2006-03-08 17:25:33
|
Hi all, first i have to say, RAP is a good work! But now i run into a problem with a sparql query on a dataset. This is my query: $q1_ = " PREFIX map: <http://intranet/sitemap#> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> SELECT * FROM NAMED </graph1> WHERE { ?y map:contains ?x } LIMIT 20 "; The named graph "/graph1" exists and has up to 41.000 entries. The result i got is as follows: $r = $dataset1->sparqlQuery($q1_); SPARQLEngine::writeQueryResultAsHtmlTable($r); No. ?y ?x 1. unbound unbound 2. unbound unbound 3. unbound unbound 4. unbound unbound 5. unbound unbound 6. unbound unbound 7. unbound unbound ... and so on till the 20th entry because of LIMIT 20. (Without the limit clause i would have more than 20.000 entries in the result). The problem is obvious, i get ?unbound results for each subject and object. Is this a "normal" behavior of sparql or is here a bug in the RAP sparql engine or better should i clean my eyeglasses? Any notes to this are very welcome! markus |
From: Richard C. <ri...@cy...> - 2006-03-02 17:55:16
|
Hi Geraint, On 2 Mar 2006, at 17:32, Geraint Edwards wrote: > My data is in a strict hierarchical tree, 'nodes' have one and only > one parent and when I delete a 'node', say a member of a container, > I really want to remove all its descendents. > If I use ResSeq->remove($myStatement) I am left with many orphans, > but if I use Model->findForward I should be able to find the 'sub- > tree' model and then remove this model from my master model. The > trouble is that my data is created by parsing the output from > another application which uses resources instead of blanknodes. > > Is there a reason that findForward only recurses down through > BlankNodes and not through resources too? Yes, there's a reason. findForward computes the blank node closure of a statement and can be used to compute concise bounded descriptions (CBDs). Both seem to be useful to some folks and rely on recursing only over the blank nodes. So it's a different use case. Richard (Terminology nitpick: Blank nodes are resources too.) > > thanks > > Geraint > > > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a groundbreaking scripting > language > that extends applications into web and mobile media. Attend the > live webcast > and join the prime developer group breaking into this new coding > territory! > http://sel.as-us.falkag.net/sel? > cmd=lnk&kid=110944&bid=241720&dat=121642 > _______________________________________________ > Rdfapi-php-interest mailing list > Rdf...@li... > https://lists.sourceforge.net/lists/listinfo/rdfapi-php-interest > |
From: Geraint E. <rd...@co...> - 2006-03-02 16:32:36
|
My data is in a strict hierarchical tree, 'nodes' have one and only one parent and when I delete a 'node', say a member of a container, I really want to remove all its descendents. If I use ResSeq->remove($myStatement) I am left with many orphans, but if I use Model->findForward I should be able to find the 'sub-tree' model and then remove this model from my master model. The trouble is that my data is created by parsing the output from another application which uses resources instead of blanknodes. Is there a reason that findForward only recurses down through BlankNodes and not through resources too? thanks Geraint |
From: Geraint E. <rd...@co...> - 2006-03-02 10:54:36
|
Just for completeness can we add: /** * Writes the RDF serialization of the MemModel as HTML. * * @access public */ function writeAsHTML() { $this->model->writeAsHtml(); } to ResModel.php thanks Geraint |
From: Richard C. <ri...@cy...> - 2006-03-02 09:44:58
|
Hi Shadi, On 2 Mar 2006, at 03:29, Shadi Abou-Zahra wrote: > Thanks for the feedback. The character encoding in the document =20 > headers are fine. After the query, the characters are escaped like =20 > this "\u00D0" (correct Unicode values but escaped instead of the =20 > actual characters). Set UNIC_RDF to FALSE again to avoid this. I've taken your example, saved the XML and PHP files to disk, changed =20= the URL for generateModel() to the filename, called the page from the =20= browser, and ithe bulgarian fragment is displayed correctly. (But the =20= bulgarian bit in the file that you copy&pasted into the email is =20 displayed as gibberish by my email client, so I copy&pasted it from =20 your original email where it appeared fine, and saved the file as =20 UTF-8. Not sure if this is related to the problem or just email =20 misbehaving.) Can you please verify that your version of the XML file is really =20 UTF-8 encoded? Or you could send it to me by *attaching* it to the =20 email, then I can check. Also, can you put the script onto a webserver where we can se it? Richard > Here is a more complete example: > > > *** DATA: <http://www.example.org/data.rdf> > > <?xml version=3D"1.0" encoding=3D"UTF-8"?> > <rdf:RDF xmlns:rdf=3D"http://www.w3.org/1999/02/22-rdf-syntax-ns#" > xmlns:doc=3D"http://www.example.org/my/schema#" > xmlns:dc=3D"http://purl.org/dc/elements/1.1/"> > > <doc:featureType rdf:ID=3D"lang"> > <dc:title rdf:parseType=3D"Literal">Language</dc:title> > <dc:description rdf:parseType=3D"Literal">The natural language of =20= > the document.</dc:description> > </doc:featureType> > > <doc:feature rdf:ID=3D"bg"> > <dc:title rdf:parseType=3D"Literal">Bulgarian</dc:title> > <dc:description rdf:parseType=3D"Literal"><span =20 > lang=3D"bg">=C3=90=E2=80=98=C3=91=C5=A0=C3=90=C2=BB=C3=90=C2=B3=C3=90=C2= =B0=C3=91=E2=82=AC=C3=91=C2=81=C3=90=C2=BA=C3=90=C2=B8</span> = (Bulgarian)</=20 > dc:description> > <doc:isFeatureType rdf:resource=3D"#lang"/> > </doc:feature> > </rdf:RDF> > > > *** PAGE: <http://www.example.org/data.php> > > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" =20 > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> > <html xmlns=3D"http://www.w3.org/1999/xhtml" xml:lang=3D"en-US" =20 > lang=3D"en-US"> > <head> > <meta http-equiv=3D"Content-Type" content=3D"text/html; = charset=3Dutf-8" /> > <title>Document Features</title> > </head> > <?php > /* include libraries */ > define("RDFAPI_INCLUDE_DIR", "/usr/local/lib/php/rdfapi-php/api/"); > include(RDFAPI_INCLUDE_DIR . "RdfAPI.php"); > include(RDFAPI_INCLUDE_DIR . "syntax/RdfParser.php"); > > $parser =3D new RdfParser(); > $DB =3D $parser->generateModel("http://www.example.org/data.rdf"); > > function getFeatureList($DB) { > /* build RDQL query */ > $query =3D "SELECT ?id, ?label, ?description WHERE (?id, =20 > <doc:isFeatureType>, ?type), (?id, <dc:description>, ?description), =20= > (?type, <dc:description>, ?label) USING dc FOR <http://purl.org/dc/=20 > elements/1.1/> doc FOR <http://www.example.org/my/schema#>"; > /* send query to database */ > $resultSet =3D $DB->rdqlQueryasIterator($query); > /* array of results */ > $features =3D array(); > while($resultSet->hasNext()) { > $feature =3D $resultSet->next(); > /* build array of results */ > $features[] =3D array("id" =3D> $feature["?id"]->getLocalName(), =20= > "label" =3D> $feature["?label"]->getLabel(), "description" =3D> = $feature=20 > ["?description"]->getLabel()); > } > return $features; > } > ?> > <body> > <dl> > <?php > $type =3D ""; > $features =3D getFeatureList($DB); > foreach($features as $feature) { > if($type !=3D $feature["label"]) { > if($type !=3D "") { > ?> > </ul></dd> > <?php > } > $type =3D $feature["label"]; > ?> > <dt><?php printf($feature["label"]); ?></dt> > <dd><ul> > <?php > } > ?> > <li><?php printf($feature["description"]); ?></li> > <?php > } > if($type !=3D "") { > ?> > </ul></dd> > <?php > } > ?> > </dl> > </body> > </html> > > > > > Richard Cyganiak wrote: >> Hi Shadi, >> On 1 Mar 2006, at 11:25, Shadi Abou-Zahra wrote: >>> Hi, >>> >>> Does RAP support non-ASCII characters in XML literals and if so, =20 >>> how? >> Yes, RAP can do that. But, as always, getting anything beyond US-=20 >> ASCII to work can be a serious pain. >> It's all a question of getting the character encoding right. By =20 >> default, RAP assumes all data to be UTF-8 encoded. If your data is =20= >> not UTF-8 encoded, then you either have to convert it to UTF-8 =20 >> (recommended) or set DEFAULT_ENCODING in constants.php to the =20 >> encoding of your data (For the cyrillic alphabet, try "iso-8859-5" =20= >> or "windows-1251"). >> Make sure that all your XML files start with an xml declaration =20 >> (e.g. "<?xml version=3D"1.0" encoding=3D"UTF-8"?>", or whatever =20 >> encoding you're using instead of UTF-8). RAP-generated XML files =20 >> will have this automatically. >> If you output HTML, make sure it has this inside the <title> element: >> <meta http-equiv=3D"Content-Type" content=3D"text/html; = charset=3DUTF-8"> >> (or whatever encoding you're using instead of UTF-8). I'm not sure =20= >> if all RAP-generated HTML has this. >> RAP can't convert between different encodings, and can't combine =20 >> RDF input from different encodings. That's why I always recommend =20 >> doing everything in UTF-8. Most other encodings lack some =20 >> characters that some people will need. >> If this doesn't help, could you please provide a more complete =20 >> example of what you're doing and where it doesn't work. >> Yours, >> Richard >>> For example, to query and output the following information: >>> >>> >>> <dc:description rdf:parseType=3D"Literal"><span =20 >>> lang=3D"bg">=D0=91=D1=8A=D0=BB=D0=B3=D0=B0=D1=80=D1=81=D0=BA=D0=B8</sp= an> (Bulgarian)</dc:description> >>> >>> >>> Note: I've tried setting the "UNIC_RDF" constant to FALSE (in api/=20= >>> constants.php) but that did not help. This is what is returned: >>> >>> >>> <span lang=3D\\"bg\\">\u00D0\u0091\u00D1\u008A\u00D0\u00BB\u00D0=20 >>> \u00B3\u00D0\u00B0\u00D1\u0080\u00D1\u0081\u00D0\u00BA\u00D0=20 >>> \u00B8</span> (Bulgarian) >>> >>> >>> Thanks, >>> Shadi >>> >>> >>> ------------------------------------------------------- >>> This SF.Net email is sponsored by xPML, a groundbreaking =20 >>> scripting language >>> that extends applications into web and mobile media. Attend the =20 >>> live webcast >>> and join the prime developer group breaking into this new coding =20 >>> territory! >>> http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=110944&bid$1720&dat=1216= 42 >>> _______________________________________________ >>> Rdfapi-php-interest mailing list >>> Rdf...@li... >>> https://lists.sourceforge.net/lists/listinfo/rdfapi-php-interest >>> > > --=20 > Lieber Querschnitt als Durchschnitt - Peter Laisacher, =20 > Salzburger Rugby Bulls > |