01: /*
02: (c) Copyright 2003, 2004, 2005, 2006, 2007, 2008 Hewlett-Packard Development Company, LP, all rights reserved.
03: [See end of file]
04: $Id: ReificationStyle.java,v 1.8 2008/01/02 12:06:12 andy_seaborne Exp $
05: */
06:
07: package com.hp.hpl.jena.shared;
08:
09: /**
10: Reification styles have two boolean components: whether the
11: graph+reifier will intercept reification triples or not [if not, the only
12: in-Jena reification is through the reifyAs operation], and whether or
13: not reification triples will be visible in the graph.
14: */
15: public class ReificationStyle {
16: public static final ReificationStyle Standard = new ReificationStyle(
17: true, false);
18: public static final ReificationStyle Convenient = new ReificationStyle(
19: true, true);
20: public static final ReificationStyle Minimal = new ReificationStyle(
21: false, true);
22:
23: private boolean intercept;
24: private boolean conceal;
25:
26: public ReificationStyle(boolean intercept, boolean conceal) {
27: this .intercept = intercept;
28: this .conceal = conceal;
29: }
30:
31: public boolean intercepts() {
32: return intercept;
33: }
34:
35: public boolean conceals() {
36: return conceal;
37: }
38:
39: /**
40: Answer a human-readable representation of this reification style. If it's
41: one of the three standard constants, return their names; otherwise return
42: a description of the fields. <i>code should not rely on these values</i>;
43: they may be changed for debugging or convenience.
44: */
45: public String toString() {
46: if (this == Minimal)
47: return "Minimal";
48: if (this == Standard)
49: return "Standard";
50: if (this == Convenient)
51: return "Convenient";
52: return "<style int=" + intercept + ", con=" + conceal + ">";
53: }
54: }
55: /*
56: (c) Copyright 2003, 2004, 2005, 2006, 2007, 2008 Hewlett-Packard Development Company, LP
57: All rights reserved.
58:
59: Redistribution and use in source and binary forms, with or without
60: modification, are permitted provided that the following conditions
61: are met:
62:
63: 1. Redistributions of source code must retain the above copyright
64: notice, this list of conditions and the following disclaimer.
65:
66: 2. Redistributions in binary form must reproduce the above copyright
67: notice, this list of conditions and the following disclaimer in the
68: documentation and/or other materials provided with the distribution.
69:
70: 3. The name of the author may not be used to endorse or promote products
71: derived from this software without specific prior written permission.
72:
73: THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
74: IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
75: OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
76: IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
77: INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
78: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
79: DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
80: THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
81: (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
82: THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
83: */
|