]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.db.common/src/org/simantics/db/common/provider/ResourceProvider.java
Fixed all line endings of the repository
[simantics/platform.git] / bundles / org.simantics.db.common / src / org / simantics / db / common / provider / ResourceProvider.java
1 /*******************************************************************************
2  * Copyright (c) 2007, 2010 Association for Decentralized Information Management
3  * in Industry THTH ry.
4  * All rights reserved. This program and the accompanying materials
5  * are made available under the terms of the Eclipse Public License v1.0
6  * which accompanies this distribution, and is available at
7  * http://www.eclipse.org/legal/epl-v10.html
8  *
9  * Contributors:
10  *     VTT Technical Research Centre of Finland - initial API and implementation
11  *******************************************************************************/
12 package org.simantics.db.common.provider;
13
14 import org.simantics.db.ReadGraph;
15 import org.simantics.db.Resource;
16
17 /**
18  * An interface for externalizing the logic of retrieving an arbitrary resource
19  * for some purpose.
20  * 
21  * <p>
22  * A {@link ReadGraph} is provided to allow implementations to browse the graph
23  * in order to retrieve a resource.
24  * </p>
25  * 
26  * <p>
27  * This interface has an asynchronously operating counterpart, {@link AsyncResourceProvider}.
28  * </p>
29  * 
30  * @see ResourceProviders
31  * @see AsyncResourceProvider
32  * 
33  * @author Tuukka Lehtonen
34  */
35 public interface ResourceProvider {
36
37     /**
38      * @param graph a graph for retrieving the resource to return
39      * @return the provided resource
40      */
41     Resource get(ReadGraph graph);
42
43 }