Hi:

I've got another couple questions about RDF/XML-ABBREV format.

When using the RDF/XML-ABBREV serializer to output a pretty-printed graph on 
our subject taxonomy but we get object nodes expanded inline on their first 
mention. See example output below [1] where I've shown only the URI references 
for convenience and suppressed the literal properties.

This makes for a very uneven XML. (I know that the RDF is fine though. But we 
want some regular XML.)

Also, and much more importantly, if we add in skos:narrower links this then 
creates some kind of pathological behaviour and the serialization then takes 
some **90 mins** or more instead of  seconds or less. (The graph size is about 
90,000 triples with ~3,000 subjects.)

We wanted to know if there was any way to suppress node expansion in the Jena 
RDF/XML-ABBREV output as we'd really like to use Java for portability in our 
build workflows.

We tried various "blockRules" property combinations to control the RDF/XML 
output but to no avail - see Scala code here.

==
    val out = new FileOutputStream(file)
    try {
      // model.write(out, format )

      val writer = model.getWriter(format);
      if (format.equals("RDF/XML-ABBREV")) {
         writer.setProperty("blockRules", "propertyAttr");
       }
      writer.write(model, out, null);
    } finally {
      out.close()
    }
==

However, if we output the same graph in TURTLE and then use an external tool - 
the Redland rapper utility which also supports RDF/XML-ABBREV - we get the very 
regular (and decidedly pretty) flat RDF/XML output as shown in [2].

Is there any way we can control this expansion better in Jena or do we need to 
use an external tool like rapper?

The basic RDF/XML output from Jena is not what we need. We just need a better, 
more regular, RDF/XML-ABBREV such as the rapper output.

Thanks,

Tony

[1]
 <npg:Subject rdf:about="http://ns.nature.com/subjects/periodontitis";>
    <skos:broader>
      <npg:Subject rdf:about="http://ns.nature.com/subjects/periodontics";>
        <skos:broader>
          <npg:Subject rdf:about="http://ns.nature.com/subjects/dentistry";>
            <skos:broader>
              <npg:Subject 
rdf:about="http://ns.nature.com/subjects/health-care";>
                <skos:related>
                  <npg:Subject 
rdf:about="http://ns.nature.com/subjects/health-services";>
                    <skos:broader 
rdf:resource="http://ns.nature.com/subjects/health-care"/>
                  </npg:Subject>
                </skos:related>
                <skos:related>
                  </npg:Subject>
                </skos:related>
              </npg:Subject>
            </skos:broader>
          </npg:Subject>
        </skos:broader>
      </npg:Subject>
    </skos:broader>
    <skos:broader>
      <npg:Subject rdf:about="http://ns.nature.com/subjects/oral-diseases";>
        <skos:broader>
            <skos:broader 
rdf:resource="http://ns.nature.com/subjects/health-sciences"/>
          </npg:Subject>
        </skos:broader>
      </npg:Subject>
    </skos:broader>
  </npg:Subject>

 [2]
  <npg:Subject rdf:about="http://ns.nature.com/subjects/periodontitis";>
    <skos:broader rdf:resource="http://ns.nature.com/subjects/oral-diseases"/>
    <skos:broader rdf:resource="http://ns.nature.com/subjects/periodontics"/>
  </npg:Subject>
  <npg:Subject rdf:about="http://ns.nature.com/subjects/oral-diseases";>
     ...
  </npg:Subject>
  <npg:Subject rdf:about="http://ns.nature.com/subjects/periodontics";>
     ...
  </npg:Subject>

********************************************************************************
   
DISCLAIMER: This e-mail is confidential and should not be used by anyone who is
not the original intended recipient. If you have received this e-mail in error
please inform the sender and delete it from your mailbox or any other storage
mechanism. Neither Macmillan Publishers Limited nor any of its agents accept
liability for any statements made which are clearly the sender's own and not
expressly made on behalf of Macmillan Publishers Limited or one of its agents.
Please note that neither Macmillan Publishers Limited nor any of its agents
accept any responsibility for viruses that may be contained in this e-mail or
its attachments and it is your responsibility to scan the e-mail and 
attachments (if any). No contracts may be concluded on behalf of Macmillan 
Publishers Limited or its agents by means of e-mail communication. Macmillan 
Publishers Limited Registered in England and Wales with registered number 
785998 
Registered Office Brunel Road, Houndmills, Basingstoke RG21 6XS   
********************************************************************************

Reply via email to