KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > hp > hpl > jena > ontology > event > OntEventHandler


1 /*****************************************************************************
2  * Source code information
3  * -----------------------
4  * Original author Ian Dickinson, HP Labs Bristol
5  * Author email ian.dickinson@hp.com
6  * Package Jena 2
7  * Web http://sourceforge.net/projects/jena/
8  * Created 09-Sep-2003
9  * Filename $RCSfile: OntEventHandler.java,v $
10  * Revision $Revision: 1.5 $
11  * Release status $State: Exp $
12  *
13  * Last modified on $Date: 2005/02/21 12:05:59 $
14  * by $Author: andy_seaborne $
15  *
16  * (c) Copyright 2001, 2002, 2003, 2004, 2005 Hewlett-Packard Development Company, LP
17  * [See end of file]
18  *****************************************************************************/

19
20 // Package
21
///////////////
22
package com.hp.hpl.jena.ontology.event;
23
24
25
26 // Imports
27
///////////////
28
import com.hp.hpl.jena.rdf.model.*;
29
30
31 /**
32  * <p>
33  * A callback class modelled on Command Patern, that is
34  * intended to perform some processing when a particular change to
35  * an ontology model is detected. The event types themselves are
36  * modelled via a simple vocabulary generated from an OWL document
37  * (see ont-event.owl).
38  * </p>
39  *
40  * @author Ian Dickinson, HP Labs
41  * (<a HREF="mailto:Ian.Dickinson@hp.com" >email</a>)
42  * @version CVS $Id: OntEventHandler.java,v 1.5 2005/02/21 12:05:59 andy_seaborne Exp $
43  */

44 public interface OntEventHandler
45 {
46     // Constants
47
//////////////////////////////////
48

49     // External signature methods
50
//////////////////////////////////
51

52     /**
53      * <p>Handle the occurrence of the ontology event denoted by the given
54      * event code. Standard OWL event contstants are defined in
55      * {@linkplain com.hp.hpl.jena.vocabulary.OntEventsVocab the Ontology events vocabulary}.
56      * </p>
57      *
58      * @param event The event code as a resource
59      * @param add This event represents an addition to the model if true, or a deletion from
60      * the model if false.
61      * @param source The model that was the source of the event
62      * @param arg0 The first argument of the event; typically principal subject of the change
63      * @param arg1 Optional second argument to the event, or null
64      * @param arg2 Optional third argument to the event, or null
65      */

66     public void action( Resource event, boolean add, Model source, RDFNode arg0, RDFNode arg1, RDFNode arg2 );
67 }
68
69
70 /*
71  * (c) Copyright 2001, 2002, 2003, 2004, 2005 Hewlett-Packard Development Company, LP
72  * All rights reserved.
73  *
74  * Redistribution and use in source and binary forms, with or without
75  * modification, are permitted provided that the following conditions
76  * are met:
77  * 1. Redistributions of source code must retain the above copyright
78  * notice, this list of conditions and the following disclaimer.
79  * 2. Redistributions in binary form must reproduce the above copyright
80  * notice, this list of conditions and the following disclaimer in the
81  * documentation and/or other materials provided with the distribution.
82  * 3. The name of the author may not be used to endorse or promote products
83  * derived from this software without specific prior written permission.
84  *
85  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
86  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
87  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
88  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
89  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
90  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
91  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
92  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
93  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
94  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
95  */

96
Popular Tags