]> gerrit.simantics Code Review - simantics/platform.git/commit
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)
commit9acebe9584f8f2a78f0322b6e0e24438e7ceb984
tree88ae29e1e3bcd072949b0b4f4207016cc27bc301
parent081bf7e08a67c0af23c5846e163be39bb19f12cb
Import/export changes. A load.

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
27 files changed:
bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/URIToResource.java
bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/adapter/impl/SharedOntologyImportAdvisor.java
bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/migration/MigratedImportResult.java [new file with mode: 0644]
bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/migration/MigrationStateImpl.java
bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/migration/MigrationStateKeys.java
bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/migration/MigrationUtils.java
bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/util/ConsistsOfProcess.java
bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/util/DomainProcessor3.java
bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/util/DomainProcessorState.java
bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/util/ModelTransferableGraphSource.java
bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/util/Subgraphs.java
bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/util/TGRepresentationUtils.java
bundles/org.simantics.db.procore/src/fi/vtt/simantics/procore/internal/XSupportImpl.java
bundles/org.simantics.db/src/org/simantics/db/service/XSupport.java
bundles/org.simantics.graph.db/src/org/simantics/graph/db/CoreInitialization.java
bundles/org.simantics.graph.db/src/org/simantics/graph/db/ImportResult.java [new file with mode: 0644]
bundles/org.simantics.graph.db/src/org/simantics/graph/db/StreamingTransferableGraphImportProcess.java
bundles/org.simantics.graph.db/src/org/simantics/graph/db/TransferableGraphs.java
bundles/org.simantics.graph/src/org/simantics/graph/refactoring/GraphRefactoringUtils.java
bundles/org.simantics.graph/src/org/simantics/graph/representation/PrettyPrintTG.java [new file with mode: 0644]
bundles/org.simantics.graph/src/org/simantics/graph/representation/TransferableGraphUtils.java
bundles/org.simantics.layer0/graph/Layer0.pgraph
bundles/org.simantics.layer0/src/org/simantics/layer0/Layer0.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/sharedontology/wizard/SharedOntologyImportWizard.java
bundles/org.simantics.utils.ui/src/org/simantics/utils/ui/dialogs/InfoDialog.java [new file with mode: 0644]
bundles/org.simantics/src/org/simantics/OntologyImportAdvisor.java
bundles/org.simantics/src/org/simantics/SimanticsPlatform.java