View Javadoc

1   /*
2    ORDI - Ontology Repository and Data Integration
3   
4    Copyright (c) 2004-2007, OntoText Lab. / SIRMA
5   
6    This library is free software; you can redistribute it and/or modify it under
7    the terms of the GNU Lesser General Public License as published by the Free
8    Software Foundation; either version 2.1 of the License, or (at your option)
9    any later version.
10   This library is distributed in the hope that it will be useful, but WITHOUT
11   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12   FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
13   details.
14   You should have received a copy of the GNU Lesser General Public License along
15   with this library; if not, write to the Free Software Foundation, Inc.,
16   59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17   */
18  package com.ontotext.ordi.tripleset;
19  
20  import com.ontotext.ordi.DataSource;
21  import com.ontotext.ordi.exception.ORDIException;
22  
23  /**
24   * Factory for connections to tripleset data model.
25   * 
26   * @author vassil
27   * 
28   */
29  public interface TSource extends DataSource {
30  
31      /**
32       * Create new connection with default values.
33       * 
34       * @return connection to triplset model.
35       */
36      public TConnection getConnection();
37  
38      /**
39       * Creates a new connection with specified user name and password.
40       * 
41       * @param user
42       *            name to be used.
43       * @param pass
44       *            of the specified user.
45       * @return connection to tripleset data model.
46       * @throws ORDIException
47       */
48      public TConnection getConnection(String user, String pass);
49  
50      /**
51       * Get factory object that can be used to construct URI, Literals and
52       * BNodes.
53       * 
54       * @return factory object.
55       */
56      public abstract TFactory getTriplesetFactory();
57  
58  }