KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > joseki > server > ModelSource


1 /*
2  * (c) Copyright 2003, 2004 Hewlett-Packard Development Company, LP
3  * [See end of file]
4  */

5
6 package org.joseki.server;
7
8 import java.util.* ;
9
10 /** Wrapper for models used by the RDF server.
11
12  * A ModelSource incorporates the (operating system) resource management policy
13  * for a model. Models are created and released by the associated SourceController.
14  * It does <b>not</b> have to be backed by a Jena as the data source.
15  *
16  * @author Andy Seaborne
17  * @version $Id: ModelSource.java,v 1.3 2004/04/30 14:13:13 andy_seaborne Exp $
18  */

19
20 public interface ModelSource
21 {
22     //public Model getModel() ;
23

24     /** The way to reference this data from outside.
25      * This is the URL minus the protocol host part
26      * e.g. "/dir/foobar" because we can have many access points
27      * on the web for this server.
28      */

29     public String JavaDoc getServerURI() ;
30     
31     //TODO Remove getPrefixes() as part of Result object
32
/** Help write results neatly.
33      */

34     public Map getPrefixes() ;
35     public void setPrefix(String JavaDoc prefix, String JavaDoc nsURI) ;
36     
37     // System resource control
38
public void activate() ;
39     public void deactivate() ;
40     
41     // Operation control.
42
// Higher level concurrency control and resource locking.
43
// Should at least provide MRSW locking (ModelSourceCom does this)
44
// A transactional model may use transactions to get isolation.
45

46     public void startOperation(boolean readOnly) ;
47     public void endOperation() ;
48     public void abortOperation() ;
49     
50     public void flush() ;
51     public boolean isImmutable() ;
52     public void setIsImmutable(boolean isFixed) ;
53     public void release() ;
54
55     public ProcessorRegistry getProcessorRegistry() ;
56 }
57
58 /*
59  * (c) Copyright 2003, 2004 Hewlett-Packard Development Company, LP
60  * All rights reserved.
61  *
62  * Redistribution and use in source and binary forms, with or without
63  * modification, are permitted provided that the following conditions
64  * are met:
65  * 1. Redistributions of source code must retain the above copyright
66  * notice, this list of conditions and the following disclaimer.
67  * 2. Redistributions in binary form must reproduce the above copyright
68  * notice, this list of conditions and the following disclaimer in the
69  * documentation and/or other materials provided with the distribution.
70  * 3. The name of the author may not be used to endorse or promote products
71  * derived from this software without specific prior written permission.
72  *
73  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
74  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
75  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
76  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
77  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
78  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
79  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
80  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
81  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
82  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
83  */

84
Popular Tags