01: /*
02: (c) Copyright 2003, 2004, 2005, 2006, 2007, 2008 Hewlett-Packard Development Company, LP
03: [See end of file]
04: $Id: Capabilities.java,v 1.12 2008/01/02 12:06:55 andy_seaborne Exp $
05: */
06:
07: package com.hp.hpl.jena.graph;
08:
09: /**
10: Interface for expressing capabilities.
11: @author kers
12: */
13: public interface Capabilities {
14: /**
15: Answer true iff Graph::size() is accurate.
16: */
17: boolean sizeAccurate();
18:
19: /**
20: Answer true if Graph::add() can be used to add at least some triples to
21: the graph.
22: */
23: boolean addAllowed();
24:
25: /**
26: Answer true if Graph::add() can be used to add at least some triples to the
27: graph. If everyTriple is true, answer true iff *any* triple can be added (ie the
28: graph places no special restrictions on triples).
29: */
30: boolean addAllowed(boolean everyTriple);
31:
32: /**
33: Answer true iff Graph::delete() can be used to remove at least some triples
34: from the graph.
35: */
36: boolean deleteAllowed();
37:
38: /**
39: Answer true if Graph::delete() can be used to remove at least some triples
40: from the graph. If everyTriple is true, any such triple may be removed.
41: */
42: boolean deleteAllowed(boolean everyTriple);
43:
44: /**
45: Answer true iff the iterators returned from <b>find</b> support the .remove()
46: operation.
47: */
48: boolean iteratorRemoveAllowed();
49:
50: /**
51: Answer true iff the graph can be completely empty.
52: */
53: boolean canBeEmpty();
54:
55: /**
56: Answer true if the find() contract on the associated graph is "safe", ie,
57: can be used safely by the pretty-printer (we'll tighten up that definition).
58: */
59: boolean findContractSafe();
60:
61: /**
62: Answer true iff this graph compares literals for equality by value
63: rather than by lexical form (the memory-based graphs do; at present
64: the RDB-graphs do not).
65: */
66: boolean handlesLiteralTyping();
67: }
68:
69: /*
70: (c) Copyright 2003, 2004, 2005, 2006, 2007, 2008 Hewlett-Packard Development Company, LP
71: All rights reserved.
72:
73: Redistribution and use in source and binary forms, with or without
74: modification, are permitted provided that the following conditions
75: are met:
76:
77: 1. Redistributions of source code must retain the above copyright
78: notice, this list of conditions and the following disclaimer.
79:
80: 2. Redistributions in binary form must reproduce the above copyright
81: notice, this list of conditions and the following disclaimer in the
82: documentation and/or other materials provided with the distribution.
83:
84: 3. The name of the author may not be used to endorse or promote products
85: derived from this software without specific prior written permission.
86:
87: THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
88: IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
89: OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
90: IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
91: INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
92: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
93: DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
94: THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
95: (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
96: THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
97: */
|