X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.structural2%2Fsrc%2Forg%2Fsimantics%2Fstructural2%2Finternal%2Fqueries%2FRelatedConnections.java;h=879a919c07ed0a01e3e7545f59d869280fefa717;hb=16ce2fab4f52fcabe55a07d41c691899ca95c4ec;hp=68a49ffbf813761d5050bacfa36e8a39c3b6bec8;hpb=969bd23cab98a79ca9101af33334000879fb60c5;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.structural2/src/org/simantics/structural2/internal/queries/RelatedConnections.java b/bundles/org.simantics.structural2/src/org/simantics/structural2/internal/queries/RelatedConnections.java index 68a49ffbf..879a919c0 100644 --- a/bundles/org.simantics.structural2/src/org/simantics/structural2/internal/queries/RelatedConnections.java +++ b/bundles/org.simantics.structural2/src/org/simantics/structural2/internal/queries/RelatedConnections.java @@ -1,41 +1,41 @@ -/******************************************************************************* - * Copyright (c) 2007, 2010 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 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * VTT Technical Research Centre of Finland - initial API and implementation - *******************************************************************************/ -package org.simantics.structural2.internal.queries; - -import java.util.Set; - -import org.simantics.db.ReadGraph; -import org.simantics.db.Resource; -import org.simantics.db.common.request.ResourceRead; -import org.simantics.db.exception.DatabaseException; -import org.simantics.structural2.queries.ConnectionSet; - -/** - * Returns all connections that are reachable from the given connection - * with IsJoinedBy-relation including the given connection itself. - * - * @author Hannu Niemistö - */ -public class RelatedConnections extends ResourceRead>{ - - public RelatedConnections(Resource connection) { - super(connection); - } - - @Override - public Set perform(ReadGraph g) throws DatabaseException { - ConnectionSet connectionSet = new ConnectionSet(g); - connectionSet.addConnection(g, resource); - return connectionSet.getConnections(); - } - -} +/******************************************************************************* + * Copyright (c) 2007, 2010 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 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * VTT Technical Research Centre of Finland - initial API and implementation + *******************************************************************************/ +package org.simantics.structural2.internal.queries; + +import java.util.Set; + +import org.simantics.db.ReadGraph; +import org.simantics.db.Resource; +import org.simantics.db.common.request.ResourceRead; +import org.simantics.db.exception.DatabaseException; +import org.simantics.structural2.queries.ConnectionSet; + +/** + * Returns all connections that are reachable from the given connection + * with IsJoinedBy-relation including the given connection itself. + * + * @author Hannu Niemistö + */ +public class RelatedConnections extends ResourceRead>{ + + public RelatedConnections(Resource connection) { + super(connection); + } + + @Override + public Set perform(ReadGraph g) throws DatabaseException { + ConnectionSet connectionSet = new ConnectionSet(g); + connectionSet.addConnection(g, resource); + return connectionSet.getConnections(); + } + +}