01: /*****************************************************************************
02: * Source code information
03: * -----------------------
04: * Original author Ian Dickinson, HP Labs Bristol
05: * Author email ian.dickinson@hp.com
06: * Package Jena 2
07: * Web http://sourceforge.net/projects/jena/
08: * Created 09-Sep-2003
09: * Filename $RCSfile: OntEventHandler.java,v $
10: * Revision $Revision: 1.8 $
11: * Release status $State: Exp $
12: *
13: * Last modified on $Date: 2008/01/02 12:10:36 $
14: * by $Author: andy_seaborne $
15: *
16: * (c) Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Hewlett-Packard Development Company, LP
17: * [See end of file]
18: *****************************************************************************/package com.hp.hpl.jena.ontology.event;
19:
20: // Imports
21: ///////////////
22: import com.hp.hpl.jena.rdf.model.*;
23:
24: /**
25: * <p>
26: * A callback class modelled on Command Patern, that is
27: * intended to perform some processing when a particular change to
28: * an ontology model is detected. The event types themselves are
29: * modelled via a simple vocabulary generated from an OWL document
30: * (see ont-event.owl).
31: * </p>
32: *
33: * @author Ian Dickinson, HP Labs
34: * (<a href="mailto:Ian.Dickinson@hp.com" >email</a>)
35: * @version CVS $Id: OntEventHandler.java,v 1.8 2008/01/02 12:10:36 andy_seaborne Exp $
36: */
37: public interface OntEventHandler {
38: // Constants
39: //////////////////////////////////
40:
41: // External signature methods
42: //////////////////////////////////
43:
44: /**
45: * <p>Handle the occurrence of the ontology event denoted by the given
46: * event code. Standard OWL event contstants are defined in
47: * {@linkplain com.hp.hpl.jena.vocabulary.OntEventsVocab the Ontology events vocabulary}.
48: * </p>
49: *
50: * @param event The event code as a resource
51: * @param add This event represents an addition to the model if true, or a deletion from
52: * the model if false.
53: * @param source The model that was the source of the event
54: * @param arg0 The first argument of the event; typically principal subject of the change
55: * @param arg1 Optional second argument to the event, or null
56: * @param arg2 Optional third argument to the event, or null
57: */
58: public void action(Resource event, boolean add, Model source,
59: RDFNode arg0, RDFNode arg1, RDFNode arg2);
60: }
61:
62: /*
63: * (c) Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Hewlett-Packard Development Company, LP
64: * All rights reserved.
65: *
66: * Redistribution and use in source and binary forms, with or without
67: * modification, are permitted provided that the following conditions
68: * are met:
69: * 1. Redistributions of source code must retain the above copyright
70: * notice, this list of conditions and the following disclaimer.
71: * 2. Redistributions in binary form must reproduce the above copyright
72: * notice, this list of conditions and the following disclaimer in the
73: * documentation and/or other materials provided with the distribution.
74: * 3. The name of the author may not be used to endorse or promote products
75: * derived from this software without specific prior written permission.
76: *
77: * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
78: * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
79: * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
80: * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
81: * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
82: * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
83: * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
84: * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
85: * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
86: * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
87: */
|