KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > joseki > server > processors > ProcessorCom


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

5
6 package org.joseki.server.processors;
7
8 import org.joseki.server.*;
9 import org.joseki.server.module.* ;
10 import com.hp.hpl.jena.rdf.model.*;
11
12 /** General template
13  * @author Andy Seaborne
14  * @version $Id: ProcessorCom.java,v 1.5 2004/04/30 14:13:11 andy_seaborne Exp $
15  */

16 public abstract class ProcessorCom implements Processor, Loadable
17 {
18     // Useful constant
19
static protected Model emptyModel = ModelFactory.createDefaultModel() ;
20     
21     static protected final int ReadOperation = 100 ;
22     static protected final int WriteOperation = 101 ;
23
24     static protected final int MutatesModel = 102 ;
25     static protected final int NoChangeToModel = 103 ;
26     
27     protected String JavaDoc opName = null ;
28     protected boolean readOnlyLock = false ;
29     protected boolean mutatingOp = true ;
30
31     public ProcessorCom(String JavaDoc n, int lockNeeded, int mutating)
32     {
33         opName = n ;
34         readOnlyLock = (lockNeeded == ReadOperation) ;
35         mutatingOp = (mutating == MutatesModel) ;
36     }
37
38     /** @see org.joseki.server.Processor#init(Resource, Resource)
39      */

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

70
Popular Tags