java - Registering Namespace in AllegroGraph(Registed nameSpaces is missing.) -


I have a problem about entering a namespace in Alegregraph.

My Java code (Program 1):

  AllegroGraphConnection agc = New AllegroGraphConnection (); Agc.enable (); Alegraigraph AG = Escrit ("Test", AGPiths. RIPLEAS); AGUtils.printStringArray ("Ag Namespace (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 Namespace (Registered):", ag.getNamespaces ()); Run  

, and the results (Program 1):

AG Namespace (initially): 0: rdf 1: http://www.w3.org/1999 / 02/22-RDF-Sentence-NS # 2: rdfs 3: http://www.w3.org/2000/01/rdf-schema# 4: OWN 5: http://www.w3.org/2002 / 07 / Owl #

AG Namespace (registered):

  0: rdf 1: http://www.w3.org/1999/02/22- RDF -Centx-ns # 2: rdfs 3: http://www.w3.org/2000/01/rdf-schema# 4: OWN 5: http://www.w3.org/2002/07/owl# 6 : Pof 7: http://xmlns.com/foaf/0.1/8: DC 9: http://purl.org/dc/elements/1.1/10: DCT11: http://purl.org/dc/ Rule 12: EXIF ​​13: http://www.w3.org/2003/12/exif/ns# 14: PR15: http://www.openmobilealliance.org/tech/profiles/UAPROF/ccppschema-2007511#   

Then, my Java code (Program 2):

  AllegroGraphConnection agc = New AllegroGraphConnection (); Agc.enable (); Alegraigraf AG = ACPOPEN ("TEST", AGPITS. RIPLAROSARS); AGUtils.printStringArray ("AG Namespace (Registered):", ag.getNamespaces ()); Run  

, and the result (Program 2):

AG Namespace (registered):

  0: rdf 1: http: //www.w3.org/1999/02/22-rdf-syntax-ns# 2: rdfs 3: http://www.w3.org/2000/01/rdf-schema# 4: Owl 5: http: //www.w3.org/2002/07/owl#  

In Program 1, I am creating a AllegroGraph named "Test", and I have registered other 5 namespace (forfe, DC, DCT, EXIF, PRF); In Program 2, I have opened the Alegregraph, but its namespace has only 3: rdf, rdfs, owl, the other 5 namespace that is registered in program 1 is missing.

My question is: 1. Why missed another 5 namespace? 2. How can I keep 5 registered namespaces in the AllegroGraph created? (When I open AllegroGraph , I do not have to re-register the namespaces.)


And in my program, the names of all the names of the Spaces After, I have the following code:

  ag.closeTripleStore ();  

and it is inappropriate: (

In short, the AllegroGraph Namespace does not continue with registration in Triple-Store.Namespace is syntactic Chinese, which makes reading and writing a long URI easier, although there are many commonly used summaries (RDF, OWL, FOF, DC, ...), each The person can make himself and use them. If the algorithm names If the brief abbreviations are continued, the store will take a personalized signature with someone else because someone else has opened the store.

In short, if you want to use the namespace, you can set up your code. Also, keep in mind that namespace compresses are global for example, not specifically for triple-store.

HH


Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -