KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > hp > hpl > jena > graph > Capabilities


1 /*
2   (c) Copyright 2003, 2004, 2005 Hewlett-Packard Development Company, LP
3   [See end of file]
4   $Id: Capabilities.java,v 1.8 2005/02/21 11:51:56 andy_seaborne Exp $
5 */

6
7 package com.hp.hpl.jena.graph;
8
9 /**
10     Interface for expressing capabilities.
11     @author kers
12 */

13 public interface Capabilities
14     {
15     /**
16         Answer true iff Graph::size() is accurate.
17      */

18     boolean sizeAccurate();
19     
20     /**
21         Answer true if Graph::add() can be used to add at least some triples to
22         the graph.
23      */

24     boolean addAllowed();
25     
26     /**
27         Answer true if Graph::add() can be used to add at least some triples to the
28         graph. If everyTriple is true, answer true iff *any* triple can be added (ie the
29         graph places no special restrictions on triples).
30      */

31     boolean addAllowed( boolean everyTriple );
32     
33     /**
34         Answer true iff Graph::delete() can be used to remove at least some triples
35         from the graph.
36      */

37     boolean deleteAllowed();
38     
39     /**
40         Answer true if Graph::delete() can be used to remove at least some triples
41         from the graph. If everyTriple is true, any such triple may be removed.
42      */

43     boolean deleteAllowed( boolean everyTriple );
44     
45     /**
46         Answer true iff the iterators returned from <b>find</b> support the .remove()
47         operation.
48     */

49     boolean iteratorRemoveAllowed();
50     
51     /**
52         Answer true iff the graph can be completely empty.
53      */

54     boolean canBeEmpty();
55
56     /**
57          Answer true if the find() contract on the associated graph is "safe", ie,
58          can be sued safely by the pretty-printer (we'll tighten up that definition).
59      */

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