]> gerrit.simantics Code Review - simantics/platform.git/commitdiff
Import/export changes. A load. 51/351/13
authorAntti Villberg <antti.villberg@semantum.fi>
Wed, 8 Mar 2017 14:50:59 +0000 (16:50 +0200)
committerTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Thu, 30 Mar 2017 15:23:23 +0000 (18:23 +0300)
May cause some problems. Exports create Internals instead of blanks if
possible. FixExportedOntology treatment now produces tgs that are
compatible with Graph Compiler. Import creates L0.ExternalEntity
instances for unresolved external references (thus making it fail safe).

Note that addBuiltin("http://Projects") was removed from class
CoreInitialization because its existence resulted in a non-functioning
URI space because:
* http://Projects was added as a "built-in resource" when the database
is first initialized which means that
ReadGraph.getResource("http://Projects") would succeed even when the
resource was not yet properly imported from the project ontology
* When the project ontology is imported, a new resource is created to
represent http://Projects instead of using the existing uninitialized
"built-in resource". The L0.ExternalEntity changes made to the standard
transferable graph import in this patch caused the code to find the
built-in resource for "http://Projects" and think that it has to be a
resource that's already properly initialized. This led to the TG import
not initializing the resource at all. Previously there was a bug here as
well but it was hidden by the fact that the system would import the
actual/new "http://Projects" resource from the ontology anyway. This
effectively left the uninitialized built-in resource just hanging in the
database as trash.

refs #7016

Change-Id: I5d9dd8dea4df58cc54d4a6664c112a770ae7f7b3


No differences found