Hi, every one. I have a problem about registing namespace in AllegroGraph.
My java code (program 1) :
AllegroGraphConnection agc = new AllegroGraphConnection(); agc.enable();
AllegroGraph ag = agc.create("test", AGPaths.TRIPLE_STORES);
AGUtils.printStringArray("AG Namespaces (initially):", ag.getNamespaces());
ag.registerNamespace("foaf","http://xmlns.com/foaf/0.1/"); ag.registerNamespace("dc", "http://purl.org/dc/elements/1.1/"); ag.registerNamespace("dct", "http://purl.org/dc/terms/"); ag.registerNamespace("exif","http://www.w3.org/2003/12/exif/ns#"); ag.registerNamespace("prf", "http://www.openmobilealliance.org/tech/profiles/UAPROF/ccppschema-2007511#");
AGUtils.printStringArray("AG Namespaces (registed):", ag.getNamespaces());
Run, And the result(program 1):
AG Namespaces (initially): 0: rdf 1: h t t p://www.w3.org/1999/02/22-rdf-syntax-ns# 2: rdfs 3: h t t p://www.w3.org/2000/01/rdf-schema# 4: owl 5: h t t p://www.w3.org/2002/07/owl#
AG Namespaces (registed): 0: rdf 1: h t t p://www.w3.org/1999/02/22-rdf-syntax-ns# 2: rdfs 3: h t t p://www.w3.org/2000/01/rdf-schema# 4: owl 5: h t t p://www.w3.org/2002/07/owl# 6: foaf 7: h t t p://xmlns.com/foaf/0.1/ 8: dc 9: h t t p://purl.org/dc/elements/1.1/ 10: dct 11: h t t p://purl.org/dc/terms/ 12: exif 13: h t t p://www.w3.org/2003/12/exif/ns# 14: prf 15: h t t p://www.openmobilealliance.org/tech/profiles/UAPROF/ccppschema-2007511#
Then, my java code (program 2) : AllegroGraphConnection agc = new AllegroGraphConnection(); agc.enable();
AllegroGraph ag = agc.open("test", AGPaths.TRIPLE_STORES);
AGUtils.printStringArray("AG Namespaces (registed):", ag.getNamespaces());
Run, and the result(program 2):
AG Namespaces (registed): 0: rdf 1: h t t p://www.w3.org/1999/02/22-rdf-syntax-ns# 2: rdfs 3: h t t p://www.w3.org/2000/01/rdf-schema# 4: owl 5: h t t p://www.w3.org/2002/07/owl#
In program 1, I create a AllegroGraph which name is "test", and I registed the other 5 namespaces(foaf, dc, dct, exif, prf); in program 2, I open the created AllegroGraph, but its namespace has only 3: rdf, rdfs, owl, the other 5 namespaces which is registed in program 1 is missing.
My question is: 1. Why the other 5 nameSpaces missed? 2. How can I keep the 5 registed nameSpaces in created AllegroGraph? (When I open the created AllegroGraph, I need not to regist nameSpaces again.)
Thank you very much, every one:)