]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/util/DomainProcessor3.java
Exclude fully weak relations to external resources in model TG export
[simantics/platform.git] / bundles / org.simantics.db.layer0 / src / org / simantics / db / layer0 / util / DomainProcessor3.java
index 7a0a5f06bee35eb5c4eebf87691dd8e8bdf97c3a..20856d4ced9de92d68b013cb6c545bfc95bdfdff 100644 (file)
@@ -2,6 +2,7 @@ package org.simantics.db.layer0.util;
 
 import java.io.IOException;
 import java.io.InputStream;
+import java.util.ArrayList;
 import java.util.Collection;
 import java.util.HashMap;
 import java.util.Iterator;
@@ -20,6 +21,7 @@ import org.simantics.db.ReadGraph;
 import org.simantics.db.Resource;
 import org.simantics.db.ResourceMap;
 import org.simantics.db.Statement;
+import org.simantics.db.common.StandardStatement;
 import org.simantics.db.common.primitiverequest.Value;
 import org.simantics.db.common.procedure.adapter.TransientCacheListener;
 import org.simantics.db.common.utils.NameUtils;
@@ -61,7 +63,7 @@ public class DomainProcessor3 {
     Map<Resource,Boolean> isRelatedToPredicates = null;
     Set<Resource> deadPredicates = null;
     Set<Resource> strongInverseSet = null;
-
+    List<Statement> unresolvedWeakLinks = new ArrayList<>();
     TIntIntHashMap ids = null;
     ResourceMap<ExtentStatus> status = null;
     Map<Datatype, byte[]> bindings = new HashMap<Datatype, byte[]>();
@@ -367,8 +369,9 @@ public class DomainProcessor3 {
 
                 // The inverse is also weak (or there is no inverse)
                 if(!strongInverseSet.contains(predicate)) {
-
-                    addToStream(predicate, object);
+                       
+                       unresolvedWeakLinks.add(new StandardStatement(subject, predicate, object));
+                    //addToStream(predicate, object);
 
                     if(objectStatus == null) {
                         status.put(object, ExtentStatus.PENDING);