Grant,

Just a suggestion... Use rdfcat to combine all the files into a single RDF 
file. Then execute a SPARQL Construct query to filter out the unwanted 
triples using arq.query [1]

e.g. this filters out the owl:import triples:

prefix owl: <http://www.w3.org/2002/07/owl#>
construct { ?s ?p ?o }
where {
   ?s ?p ?o
   filter (?p != owl:import)
}

Add suitable filters to eliminate the unwanted owl:Ontology triples.

[1] https://jena.apache.org/documentation/query/cmds.html

-- Arthur

Grant Pax <[email protected]> wrote on 12/31/2014 09:43:55 AM:

> From: Grant Pax <[email protected]>
> To: [email protected]
> Date: 12/31/2014 09:44 AM
> Subject: rdfcat and owl:imports/owl:Ontology
> 
> My ontological structure is developed in modules wired together with
> owl:imports triples. My production environment requires a single 
> file. I have tried using rdfcat to flatten the system - without 
> success so far. Multiple owl:Ontology triples are in the final file 
> as one unresolved owl:imports triple. To get rid of the import 
> triple, I have tried running the mostly-flattened file back through 
> rdfcat but that didn?t do the trick. I have tried rdfparse thinking 
> I could run it through sed - again without success ( error: (line 1 
> column 1): Content is not allowed in prolog.).  Any suggestions for 
> producing a single file with only the top-level owl:Ontology intact 
> and all owl:imports statements resolved (guess that?s a little 
> redundant)? Protege?s merge functionality does it but I need to do 
> it from the command line.
> 
> Thanks.

Reply via email to