The zip option on the Exports tab is much better wrt prefixes and can handle a 
collection and its includes all at once.

Cheers,
David

> On 8 Jul 2022, at 06:08, Tim Smith <smith.ts...@gmail.com> wrote:
> 
> 
> Hi Holger,
> 
> The file I referred to in the previous posting only imported EDG system 
> graphs so I'm confident it would not have imported additional prefixes unless 
> the export as Trig/import as Trig process somehow assigned/exposed this graph 
> to the complete set of prefixes.  
> 
> Any idea as to how I can stop this from happening?  If I pull my 7.2 
> workspace into 7.3 and export as a zip then import into an empty 7.3 
> workspace, might that remove all of the extraneous prefixes?
> 
> I don't know what else I can try as I have no way of debugging how the SPARQL 
> panel is creating the list of prefixes in 7.2 and how that relates to an 
> exported/imported Trig graph.  
> 
> Tim
>  
> 
>> On Thu, Jul 7, 2022 at 7:16 PM Holger Knublauch <hol...@topquadrant.com> 
>> wrote:
>> There were two prefix-related problems in the past. One was that TDB was 
>> sharing all prefixes between all graphs but I believe this was a 
>> short-lasting glitch that we were able to work around quickly. The other 
>> remains that TriG files only store the prefixes in a single place. So if 
>> you’re importing TriG then all resulting graphs will get the union of all 
>> prefixes. We have worked around this by (recently) introducing the ability 
>> to export and import .zip files where each individual file is a Turtle file 
>> with its own prefixes.
>> 
>> All I can suggest is to walk through each owl:imported graph and their 
>> imports and check that they all only contain the minimum of prefixes. There 
>> has to be “leak” somewhere, i.e. an old file that got accidentally populated 
>> with the many prefixes, e.g. through TriG
>> 
>> Holger
>> 
>> 
>>> On 7 Jul 2022, at 7:02 pm, Tim Smith <smith.ts...@gmail.com> wrote:
>>> 
>>> Hi Holger,
>>> 
>>> Thanks for the help.  I am correcting the prefixes via the Settings tab as 
>>> you mentioned.
>>> 
>>> I had considered the impact of imports, so I went to the top of the import 
>>> hierarchy which is a file that imports nothing but Default Constraints for 
>>> EDG and the GraphQL vocabulary (system includes).  This graph is one that 
>>> went through the trig export/import and shows all 200+ prefixes in the 
>>> SPARQL window.  In the settings tab, I only see the prefixes you mentioned 
>>> above, which is what I set them to earlier today.  Note that this graph 
>>> only contains 5 triples.  The turtle export of the file is pasted below.
>>> 
>>> As an additional test, I created a new ontology with no imports.  The 
>>> prefixes were the EDG defaults as expected.
>>> 
>>> For more fun, I imported the turtle file from above into the new ontology 
>>> and, as expected, the prefixes were not modified.
>>> 
>>> I am at a loss as to how the graph coming from the trig import is picking 
>>> up the prefixes if they aren't in an imported graph and they aren't in the 
>>> Settings tab.
>>> 
>>> I'll keep poking around,
>>> 
>>> Tim
>>> 
>>> # baseURI: http://ontologies.pg.com/pgontology
>>> # imports: http://datashapes.org/graphql
>>> 
>>> @base          <http://ontologies.pg.com/pgontology> .
>>> @prefix metadata: <http://topbraid.org/metadata#> .
>>> @prefix teamwork: <http://topbraid.org/teamwork#> .
>>> @prefix owl: <http://www.w3.org/2002/07/owl#> .
>>> @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
>>> @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
>>> @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
>>> 
>>> <>      owl:versionInfo  "Created with TopBraid Composer" ;
>>>         metadata:status  metadata:UnderDevelopmentStatus ;
>>>         owl:imports      <http://datashapes.org/graphql> ;
>>>         rdf:type         owl:Ontology ;
>>>         rdfs:label       "SCHEMA_PGOntology-v1.0" .
>>> 
>>>> On Thursday, July 7, 2022 at 3:52:49 PM UTC-4 Holger Knublauch wrote:
>>>> 
>>>>> On 7 Jul 2022, at 3:31 pm, Tim Smith <smith...@gmail.com> wrote:
>>>>> 
>>>>> A few weeks ago, as I shared here, I exported all graphs and imported 
>>>>> them into a fresh EDG Studio install to fix a Lucene indexing issue.  
>>>>> This caused every prefix in EDG to be assigned to every graph.  (Thanks 
>>>>> jena!)  (EDG 7.2, I know this has been addressed in 7.3)
>>>>> 
>>>>> I am still trying to recover from this disaster.  I have been slowly 
>>>>> going through each graph, changing the prefixes to the the correct set. 
>>>> 
>>>> I assume this was done through the Settings > Namespaces and Prefixes 
>>>> feature (which is the right place)?
>>>> 
>>>>> I have also ensured the EDG-wide defaults are correct.
>>>>> 
>>>>> However, even when creating a new Data Graph, importing an N-Triples file 
>>>>>  (no prefixes!), ensuring that only the correct prefixes are in Settings, 
>>>>> I am still seeing the incorrect prefixes on forms, in the source code 
>>>>> panel, in the SPARQL panel, etc...
>>>>> 
>>>>> Looking at the Source Code and SPARQL panels and expanding the prefix 
>>>>> twisty, I see the 200+ prefixes listed.  How do I force the prefixes 
>>>>> listed there to reflect the EDG and graph defaults?  Are the prefixes 
>>>>> used by these panels stored somewhere?
>>>> 
>>>> I have just created an empty DataGraph and it produces and shows only 
>>>> those prefixes:
>>>> 
>>>> PREFIX dash: <http://datashapes.org/dash#>
>>>> PREFIX dc: <http://purl.org/dc/elements/1.1/>
>>>> PREFIX dct: <http://purl.org/dc/terms/>
>>>> PREFIX edg: <http://edg.topbraid.solutions/model/>
>>>> PREFIX graphql: <http://datashapes.org/graphql#>
>>>> PREFIX metadata: <http://topbraid.org/metadata#>
>>>> PREFIX owl: <http://www.w3.org/2002/07/owl#>
>>>> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
>>>> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
>>>> PREFIX sh: <http://www.w3.org/ns/shacl#>
>>>> PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
>>>> PREFIX skosxl: <http://www.w3.org/2008/05/skos-xl#>
>>>> PREFIX teamwork: <http://topbraid.org/teamwork#>
>>>> PREFIX test_data_graph: <http://example.org/data-graphs/Test_Data_Graph#>
>>>> PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
>>>> 
>>>> Could it be that your data graph owl:imports a file or Ontology that 
>>>> defines all the other prefixes? The various panels will use the union of 
>>>> all prefixes from all subgraphs. Also, do the prefixes already exist 
>>>> before you import the N-Triples file?
>>>> 
>>>>> 
>>>>> Thanks in advance for your help.  This is getting super annoying.  I'm 
>>>>> getting questions from others as to why there are "crazy" prefixes 
>>>>> showing up.
>>>> 
>>>> I can sympathise with your frustration, mate.
>>>> 
>>>> Holger
>>>> 
>>>> 
>>>>> 
>>>>> Tim
>>>>> 
>>>>> -- 
>>>>> You received this message because you are subscribed to the Google Groups 
>>>>> "TopBraid Suite Users" group.
>>>>> To unsubscribe from this group and stop receiving emails from it, send an 
>>>>> email to topbraid-user...@googlegroups.com.
>>>>> To view this discussion on the web visit 
>>>>> https://groups.google.com/d/msgid/topbraid-users/1266198e-bf8d-4343-aa2b-cd1925839952n%40googlegroups.com.
>>>> 
>>> 
>>> 
>>> -- 
>>> You received this message because you are subscribed to the Google Groups 
>>> "TopBraid Suite Users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send an 
>>> email to topbraid-users+unsubscr...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/topbraid-users/2f801b6d-9a5d-4eb8-be6d-1a91bc581074n%40googlegroups.com.
>> 
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "TopBraid Suite Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to topbraid-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/topbraid-users/26CB7E07-5EDF-4C1A-847F-3F7736A9265F%40topquadrant.com.
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "TopBraid Suite Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to topbraid-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/topbraid-users/CAF0WbnK8MtqR_V4J0aRhrHfVsNOofpUvtdMMME6DJxgvZuO1SA%40mail.gmail.com.

-- 
You received this message because you are subscribed to the Google Groups 
"TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to topbraid-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/topbraid-users/6F350DAF-7530-4AB3-A4B8-926B2B25E4C8%40topquadrant.com.

Reply via email to