/*******************************************************************************
- * Copyright (c) 2007, 2010 Association for Decentralized Information Management
+ * Copyright (c) 2007, 2019 Association for Decentralized Information Management
* in Industry THTH ry.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
import java.util.List;
import java.util.Set;
-import org.simantics.databoard.Bindings;
import org.simantics.db.ReadGraph;
import org.simantics.db.Resource;
import org.simantics.db.common.primitiverequest.Adapter;
import org.simantics.db.common.request.TernaryRead;
import org.simantics.db.exception.DatabaseException;
import org.simantics.db.layer0.adapter.Instances;
+import org.simantics.db.layer0.genericrelation.Dependencies;
import org.simantics.db.layer0.genericrelation.IndexQueries;
import org.simantics.db.layer0.util.Layer0Utils;
import org.simantics.db.request.ReadExt;
StringBuilder sb = new StringBuilder();
boolean emptyFilter = filter.isEmpty();
if (emptyFilter || !type.equals(L0.Entity)) {
- String typeName = graph.getPossibleRelatedValue(type, L0.HasName, Bindings.STRING);
- if (typeName == null || typeName.isEmpty())
- return null;
- sb.append("Types:").append( IndexQueries.quoteTerm(typeName) );
+ IndexQueries.appendResourceIdTerm(sb, Dependencies.FIELD_TYPE_RESOURCE, type);
}
if (!emptyFilter) {
if (sb.length() > 0)