Esempio n. 1
0
    <dc:title>rms.dat</dc:title>
    <dc:description>The RMS (intensity or power).</dc:description>
    <dataset:physicalPath>/jf/jf_rep3_tap/rms.dat</dataset:physicalPath>
  </rdf:Description>
  <rdf:Description rdf:about="info:fedora/uuid:23e0e1ca-2284-11de-9609-000e2ed68b2b/sss.dat">

    <dc:title>sss.dat</dc:title>
    <dc:description>A measurement of the average slope of the speech spectrum.</dc:description>
    <dataset:physicalPath>/jf/jf_rep3_tap/sss.dat</dataset:physicalPath>
  </rdf:Description>
</rdf:RDF>
"""

m.from_string(RELSINT)

print m.to_string(format="n3")

print "-="*20

# Manifest works like an iterator, yielding RDFobjects in the order given in 
# its internal Manifest.items list. The list can be reordered via sort() or similar

for item in m:
    if item.types:
        print 'Typed object: %s -> %s' % (item.types, item.uri)
        # Adding a bit of info about this item (note, simply adding to m, not the item directly)
        m.add_triple(item.uri, "dc:description", 
                "This is an example.org object, totally pointless, but that's how it goes")
        m.add_triple(item.uri, "dc:format", "text/xml")
        print "-="*20
        print "Print this now adjusted item as ntriples\n"