annotate galaxy-dist/tools/SADI/MergeRDFGraphs.py @ 2:977c838e3442 draft default tip

New dir structure, README improved, tests added and RDF merge tool created
author mikel-egana-aranguren <mikel.egana.aranguren@gmail.com>
date Fri, 25 Apr 2014 14:41:12 +0200
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2
977c838e3442 New dir structure, README improved, tests added and RDF merge tool created
mikel-egana-aranguren <mikel.egana.aranguren@gmail.com>
parents:
diff changeset
1
977c838e3442 New dir structure, README improved, tests added and RDF merge tool created
mikel-egana-aranguren <mikel.egana.aranguren@gmail.com>
parents:
diff changeset
2 import sys
977c838e3442 New dir structure, README improved, tests added and RDF merge tool created
mikel-egana-aranguren <mikel.egana.aranguren@gmail.com>
parents:
diff changeset
3 from rdflib.graph import Graph
977c838e3442 New dir structure, README improved, tests added and RDF merge tool created
mikel-egana-aranguren <mikel.egana.aranguren@gmail.com>
parents:
diff changeset
4
977c838e3442 New dir structure, README improved, tests added and RDF merge tool created
mikel-egana-aranguren <mikel.egana.aranguren@gmail.com>
parents:
diff changeset
5 def main(argv):
977c838e3442 New dir structure, README improved, tests added and RDF merge tool created
mikel-egana-aranguren <mikel.egana.aranguren@gmail.com>
parents:
diff changeset
6 store = Graph()
977c838e3442 New dir structure, README improved, tests added and RDF merge tool created
mikel-egana-aranguren <mikel.egana.aranguren@gmail.com>
parents:
diff changeset
7 for inputFileName in argv:
977c838e3442 New dir structure, README improved, tests added and RDF merge tool created
mikel-egana-aranguren <mikel.egana.aranguren@gmail.com>
parents:
diff changeset
8 try:
977c838e3442 New dir structure, README improved, tests added and RDF merge tool created
mikel-egana-aranguren <mikel.egana.aranguren@gmail.com>
parents:
diff changeset
9 store.parse(inputFileName)
977c838e3442 New dir structure, README improved, tests added and RDF merge tool created
mikel-egana-aranguren <mikel.egana.aranguren@gmail.com>
parents:
diff changeset
10 except Exception:
977c838e3442 New dir structure, README improved, tests added and RDF merge tool created
mikel-egana-aranguren <mikel.egana.aranguren@gmail.com>
parents:
diff changeset
11 pass
977c838e3442 New dir structure, README improved, tests added and RDF merge tool created
mikel-egana-aranguren <mikel.egana.aranguren@gmail.com>
parents:
diff changeset
12 print store.serialize()
977c838e3442 New dir structure, README improved, tests added and RDF merge tool created
mikel-egana-aranguren <mikel.egana.aranguren@gmail.com>
parents:
diff changeset
13
977c838e3442 New dir structure, README improved, tests added and RDF merge tool created
mikel-egana-aranguren <mikel.egana.aranguren@gmail.com>
parents:
diff changeset
14 if __name__ == "__main__":
977c838e3442 New dir structure, README improved, tests added and RDF merge tool created
mikel-egana-aranguren <mikel.egana.aranguren@gmail.com>
parents:
diff changeset
15 main(sys.argv[1:])