/**_x000D_
 * LICENSE INFORMATION_x000D_
 * _x000D_
 * Copyright 2005-2008 by FZI (http://www.fzi.de). Licensed under a BSD license_x000D_
 * (http://www.opensource.org/licenses/bsd-license.php) <OWNER> = Max Völkel_x000D_
 * <ORGANIZATION> = FZI Forschungszentrum Informatik Karlsruhe, Karlsruhe,_x000D_
 * Germany <YEAR> = 2010_x000D_
 * _x000D_
 * Further project information at http://semanticweb.org/wiki/RDF2Go_x000D_
 */_x000D_
_x000D_
package org.ontoware.rdf2go.model;_x000D_
_x000D_
import org.ontoware.aifbcommons.collection.ClosableIterator;_x000D_
import org.ontoware.rdf2go.exception.ModelRuntimeException;_x000D_
import org.ontoware.rdf2go.model.node.NodeOrVariable;_x000D_
import org.ontoware.rdf2go.model.node.ResourceOrVariable;_x000D_
import org.ontoware.rdf2go.model.node.UriOrVariable;_x000D_
_x000D_
_x000D_
/**_x000D_
 * _x000D_
 * @author voelkel_x000D_
 */_x000D_
public interface FindableModelSet {_x000D_
	_x000D_
	/**_x000D_
	 * Search across all existing models_x000D_
	 * _x000D_
	 * @param contextURI_x000D_
	 * @param subject_x000D_
	 * @param predicate_x000D_
	 * @param object_x000D_
	 * @return all matching statements in all models_x000D_
	 * @throws ModelRuntimeException_x000D_
	 */_x000D_
	ClosableIterator<Statement> findStatements(UriOrVariable contextURI,_x000D_
	        ResourceOrVariable subject, UriOrVariable predicate, NodeOrVariable object)_x000D_
	        throws ModelRuntimeException;_x000D_
	_x000D_
	/**_x000D_
	 * Search across all existing models_x000D_
	 * _x000D_
	 * @param pattern_x000D_
	 * @return all statements matching the quad pattern_x000D_
	 * @throws ModelRuntimeException_x000D_
	 */_x000D_
	ClosableIterator<Statement> findStatements(QuadPattern pattern) throws ModelRuntimeException;_x000D_
	_x000D_
	/**_x000D_
	 * @param contextURI_x000D_
	 * @param subject_x000D_
	 * @param predicate_x000D_
	 * @param object_x000D_
	 * @return true, if a Model named 'contextURI' contains the statement_x000D_
	 *         (s,p,o)_x000D_
	 * @throws ModelRuntimeException_x000D_
	 */_x000D_
	boolean containsStatements(UriOrVariable contextURI, ResourceOrVariable subject,_x000D_
	        UriOrVariable predicate, NodeOrVariable object) throws ModelRuntimeException;_x000D_
	_x000D_
	/**_x000D_
	 * @param s a Statement_x000D_
	 * @return true if the modelset contains a model with context s.getContext()_x000D_
	 *         which contains the statement s. If the context is null, the_x000D_
	 *         default graph is checked._x000D_
	 * @throws ModelRuntimeException_x000D_
	 */_x000D_
	boolean contains(Statement s) throws ModelRuntimeException;_x000D_
	_x000D_
	/**_x000D_
	 * @param pattern_x000D_
	 * @return the number of statements matchingthe pattern. This is for all_x000D_
	 *         graphs matching the context of the pattern (this is none, one or_x000D_
	 *         all graphs). In matching graphs the number of matching statements_x000D_
	 *         is accumulated and returned._x000D_
	 * @throws ModelRuntimeException_x000D_
	 */_x000D_
	long countStatements(QuadPattern pattern) throws ModelRuntimeException;_x000D_
	_x000D_
	/**_x000D_
	 * @param context_x000D_
	 * @param subject_x000D_
	 * @param predicate_x000D_
	 * @param object_x000D_
	 * @return a QuadPattern_x000D_
	 */_x000D_
	QuadPattern createQuadPattern(UriOrVariable context, ResourceOrVariable subject,_x000D_
	        UriOrVariable predicate, NodeOrVariable object);_x000D_
	_x000D_
}_x000D_

/**_x000D_
 * _x000D_
 * @author voelkel_x000D_
 */
/**_x000D_
 * LICENSE INFORMATION_x000D_
 * _x000D_
 * Copyright 2005-2008 by FZI (http://www.fzi.de). Licensed under a BSD license_x000D_
 * (http://www.opensource.org/licenses/bsd-license.php) <OWNER> = Max Völkel_x000D_
 * <ORGANIZATION> = FZI Forschungszentrum Informatik Karlsruhe, Karlsruhe,_x000D_
 * Germany <YEAR> = 2010_x000D_
 * _x000D_
 * Further project information at http://semanticweb.org/wiki/RDF2Go_x000D_
 */_x000D_
_x000D_
package org.ontoware.rdf2go.model;_x000D_
_x000D_
import org.ontoware.aifbcommons.collection.ClosableIterator;_x000D_
import org.ontoware.rdf2go.exception.ModelRuntimeException;_x000D_
import org.ontoware.rdf2go.model.node.NodeOrVariable;_x000D_
import org.ontoware.rdf2go.model.node.ResourceOrVariable;_x000D_
import org.ontoware.rdf2go.model.node.UriOrVariable;_x000D_
_x000D_
_x000D_
/**_x000D_
 * _x000D_
 * @author voelkel_x000D_
<SUF>*/_x000D_
public interface FindableModelSet {_x000D_
	_x000D_
	/**_x000D_
	 * Search across all existing models_x000D_
	 * _x000D_
	 * @param contextURI_x000D_
	 * @param subject_x000D_
	 * @param predicate_x000D_
	 * @param object_x000D_
	 * @return all matching statements in all models_x000D_
	 * @throws ModelRuntimeException_x000D_
	 */_x000D_
	ClosableIterator<Statement> findStatements(UriOrVariable contextURI,_x000D_
	        ResourceOrVariable subject, UriOrVariable predicate, NodeOrVariable object)_x000D_
	        throws ModelRuntimeException;_x000D_
	_x000D_
	/**_x000D_
	 * Search across all existing models_x000D_
	 * _x000D_
	 * @param pattern_x000D_
	 * @return all statements matching the quad pattern_x000D_
	 * @throws ModelRuntimeException_x000D_
	 */_x000D_
	ClosableIterator<Statement> findStatements(QuadPattern pattern) throws ModelRuntimeException;_x000D_
	_x000D_
	/**_x000D_
	 * @param contextURI_x000D_
	 * @param subject_x000D_
	 * @param predicate_x000D_
	 * @param object_x000D_
	 * @return true, if a Model named 'contextURI' contains the statement_x000D_
	 *         (s,p,o)_x000D_
	 * @throws ModelRuntimeException_x000D_
	 */_x000D_
	boolean containsStatements(UriOrVariable contextURI, ResourceOrVariable subject,_x000D_
	        UriOrVariable predicate, NodeOrVariable object) throws ModelRuntimeException;_x000D_
	_x000D_
	/**_x000D_
	 * @param s a Statement_x000D_
	 * @return true if the modelset contains a model with context s.getContext()_x000D_
	 *         which contains the statement s. If the context is null, the_x000D_
	 *         default graph is checked._x000D_
	 * @throws ModelRuntimeException_x000D_
	 */_x000D_
	boolean contains(Statement s) throws ModelRuntimeException;_x000D_
	_x000D_
	/**_x000D_
	 * @param pattern_x000D_
	 * @return the number of statements matchingthe pattern. This is for all_x000D_
	 *         graphs matching the context of the pattern (this is none, one or_x000D_
	 *         all graphs). In matching graphs the number of matching statements_x000D_
	 *         is accumulated and returned._x000D_
	 * @throws ModelRuntimeException_x000D_
	 */_x000D_
	long countStatements(QuadPattern pattern) throws ModelRuntimeException;_x000D_
	_x000D_
	/**_x000D_
	 * @param context_x000D_
	 * @param subject_x000D_
	 * @param predicate_x000D_
	 * @param object_x000D_
	 * @return a QuadPattern_x000D_
	 */_x000D_
	QuadPattern createQuadPattern(UriOrVariable context, ResourceOrVariable subject,_x000D_
	        UriOrVariable predicate, NodeOrVariable object);_x000D_
	_x000D_
}_x000D_
