From: Rob V. <rv...@do...> - 2014-07-01 13:22:59
|
dotNetRDF provides minimal control over how the RDF/XML is generated, as you have noticed RDF/XML can serialise the same graph multiple ways. Getting serialisation correct is far more important to us than any concerns about readability. RDF/XML was never designed as a readable format and should not be treated as such. You can try tweaking the CompressionLevel property of the RdfXmlWriter to a higher value (10 is highest) but this will likely make little difference to the output for the graph you have shown. As you point out the triples are the same so the serialisation is irrelevant. My advice is that whatever RDF tools you are using is to ignore the serialisation and only worry about the triples. Rob From: Mehdi Abbasi <mhd...@gm...> Reply-To: dotNetRDF User Help and Support <dot...@li...> Date: Tuesday, 1 July 2014 13:39 To: dotNetRDF User Help and Support <dot...@li...> Subject: Re: [dotNetRDF-Support] skos/rdf > Thanks for your help. I'm trying to skosify my data and use SKOS ontology. > > There is another question. I make this xml file with rdfxmlwriter: > <?xml version="1.0"?> > 2: <rdf:RDF xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" > xmlns:xsd="http://www.w3.org/2001/XMLSchema#" > xmlns:skos="http://www.w3.org/2004/02/skos/core#" > xmlns:dc="http://purl.org/dc/terms/" > xmlns:owl="http://www.w3.org/2006/12/owl2#" > xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> > 3: <skos:collection rdf:about="http://example.org/vehicles/Car/"> > 4: <skos:prefLabel>All Car</skos:prefLabel> > 5: <skos:member rdf:resource="http://example.org/vehicles/Car/AudiA8/" /> > 6: </skos:collection> > 7: <skos:concept rdf:about="http://example.org/vehicles/Car/AudiA8/"> > 8: <owl:versionInfo>1</owl:versionInfo> > 9: </skos:concept>10: </rdf:RDF> > But I need to make xml in this order (red part): > <?xml version="1.0"?> > 2: <rdf:RDF xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" > xmlns:xsd="http://www.w3.org/2001/XMLSchema#" > xmlns:skos="http://www.w3.org/2004/02/skos/core#" > xmlns:dc="http://purl.org/dc/terms/" > xmlns:owl="http://www.w3.org/2006/12/owl2#" > xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> > 3: <skos:collection rdf:about="http://example.org/vehicles/Car/"> > 4: <skos:prefLabel>All Car</skos:prefLabel> > 5: <skos:member> > 6: <skos:concept rdf:about="http://example.org/vehicles/Car/AudiA8/"> > 7: <owl:versionInfo>1</owl:versionInfo> > 8: </skos:concept>9: </skos:member> > 10: </skos:collection> > 11: </rdf:RDF> > I've checked both xml by rdf validator and both triples are the same. How can > I create second RDF/XML? > Thanks again for your support. > > > On Mon, Jun 30, 2014 at 12:28 PM, Rob Vesse <rv...@do...> wrote: >> Mehdi >> >> Uldis is quite correct, the SKOS reasoner only works when provided with a >> basic SKOS ontology as part of its configuration and when the data being >> reasoned over has some SKOS elements. It looks like there is no relevant >> SKOS information in your data (and you didn't show your schema) that can >> be used to reason additional triples >> >> You should instead manually convert your data via code or use a SPARQL >> update to do this >> >> Rob >> >> On 30/06/2014 10:45, "Uldis Bojars" <cap...@gm...> wrote: >> >>> >A reasoner is probably meant for reasoning over SKOS data, but your >>> >source data is in some other (ex:vehicleType, ...) ontology, not in >>> >SKOS. You need to convert the data yourself. >>> > >>> >I don't know how to code that in dotNetRDF but the conversion should >>> >be simple enough: iterate through all the resources you need to >>> >convert (http://myvehicledata.com/AudiA8, ...) and create new triples >>> >in the form needed. >>> > >>> >Uldis >>> > >>> > >>> >On 27 June 2014 11:19, Mehdi Abbasi <mhd...@gm...> wrote: >>>> >> Hi Dear, >>>> >> >>>> >> I see this RDF/xml with dotnetrdf : >>>> >> >>>> >> <rdf:Description rdf:about="http://myvehicledata.com/AudiA8"> >>>> >> <ex:vehicleType rdf:resource="http://example.org/vehicles/Car"/> >>>> >> <ex:vehicleType rdf:resource="http://example.org/vehicles/Vehicle"/> >>>> >> </rdf:Description> >>>> >> <rdf:Description rdf:about="http://myvehicledata.com/FerrariEnzo"> >>>> >> <ex:vehicleType rdf:resource="http://example.org/vehicles/Car"/> >>>> >> <ex:vehicleType rdf:resource="http://example.org/vehicles/SportsCar"/> >>>> >> <ex:vehicleType rdf:resource="http://example.org/vehicles/Vehicle"/> >>>> >> </rdf:Description> >>>> >> <rdf:Description rdf:about="http://myvehicledata.com/FordFiesta"> >>>> >> <ex:vehicleType rdf:resource="http://example.org/vehicles/Car"/> >>>> >> <ex:vehicleType rdf:resource="http://example.org/vehicles/Vehicle"/> >>>> >> </rdf:Description> >>>> >> </rdf:RDF> >>>> >> >>>> >> But I need to make a skos/rdf like this: >>>> >> <skos:Collection rdf:about="http://myvehicledata.com/AudiA8"> >>>> >> <skos:broader rdf:resource="http://example.org/vehicles/Car"/> >>>> >> <skos:broader rdf:resource="http://example.org/vehicles/Vehicle"/> >>>> >> </skos:Collection> .... >>>> >> >>>> >> I try to use SkosReasoner like this: >>>> >> StaticSkosReasoner reasoner = new StaticSkosReasoner(); >>>> >> reasoner.Initialise(schema); >>>> >> reasoner.Apply(data); >>>> >> >>>> >> But it does'nt wotk. Is it possible to help me how can generate this >>>> >> skos/rdf? >>>> >> >>>> >> Thank you for your help. >>>> >> -- >>>> >> Best regards, >>>> >> Mehdi Abbasi >>>> >> >>>> >> >>>> >> >>>> >> >>>> >>------------------------------------------------------------------------- >>>> >>----- >>>> >> Open source business process management suite built on Java and Eclipse >>>> >> Turn processes into business applications with Bonita BPM Community >>>> >>Edition >>>> >> Quickly connect people, data, and systems into organized workflows >>>> >> Winner of BOSSIE, CODIE, OW2 and Gartner awards >>>> >> http://p.sf.net/sfu/Bonitasoft >>>> >> _______________________________________________ >>>> >> dotNetRDF-Support mailing list >>>> >> dot...@li... >>>> >> https://lists.sourceforge.net/lists/listinfo/dotnetrdf-support >>>> >> >>> > >>> >-------------------------------------------------------------------------- >>> >---- >>> >Open source business process management suite built on Java and Eclipse >>> >Turn processes into business applications with Bonita BPM Community >>> >Edition >>> >Quickly connect people, data, and systems into organized workflows >>> >Winner of BOSSIE, CODIE, OW2 and Gartner awards >>> >http://p.sf.net/sfu/Bonitasoft >>> >_______________________________________________ >>> >dotNetRDF-Support mailing list >>> >dot...@li... >>> >https://lists.sourceforge.net/lists/listinfo/dotnetrdf-support >> >> >> >> >> >> ----------------------------------------------------------------------------->> - >> Open source business process management suite built on Java and Eclipse >> Turn processes into business applications with Bonita BPM Community Edition >> Quickly connect people, data, and systems into organized workflows >> Winner of BOSSIE, CODIE, OW2 and Gartner awards >> http://p.sf.net/sfu/Bonitasoft >> _______________________________________________ >> dotNetRDF-Support mailing list >> dot...@li... >> https://lists.sourceforge.net/lists/listinfo/dotnetrdf-support > > > > -- > Best regards, > Mehdi Abbasi > > Mølleåparken 6, 3K > 2800 Kongens Lyngby > Copenhagen, Denmark > > Tlf: 0045 31 45 35 01 > Skype: mhd.abbassi > http://dk.linkedin.com/pub/mehdi-abbasi/4a/551/a34 > > ------------------------------------------------------------------------------ > Open source business process management suite built on Java and Eclipse Turn > processes into business applications with Bonita BPM Community Edition Quickly > connect people, data, and systems into organized workflows Winner of BOSSIE, > CODIE, OW2 and Gartner awards > http://p.sf.net/sfu/Bonitasoft_______________________________________________ > dotNetRDF-Support mailing list dot...@li... > https://lists.sourceforge.net/lists/listinfo/dotnetrdf-support |