001: /*
002: (c) Copyright 2003, 2004, 2005, 2006, 2007, 2008 Hewlett-Packard Development Company, LP, all rights reserved.
003: [See end of file]
004: $Id: WrappedReifier.java,v 1.10 2008/01/02 12:05:19 andy_seaborne Exp $
005: */
006:
007: package com.hp.hpl.jena.graph.impl;
008:
009: import com.hp.hpl.jena.graph.*;
010: import com.hp.hpl.jena.shared.ReificationStyle;
011: import com.hp.hpl.jena.util.iterator.ExtendedIterator;
012:
013: /**
014: WrappedReifier: a class that wraps a reifier [needed by WrappedGraph].
015:
016: @author kers
017: */
018: public class WrappedReifier implements Reifier {
019: private Reifier base;
020: private Graph parent;
021:
022: /**
023: *
024: */
025: public WrappedReifier(Reifier base, Graph parent) {
026: this .base = base;
027: this .parent = parent;
028: }
029:
030: /**
031: @see com.hp.hpl.jena.graph.Reifier#getStyle()
032: */
033: public ReificationStyle getStyle() {
034: return base.getStyle();
035: }
036:
037: /**
038: @see com.hp.hpl.jena.graph.Reifier#getParentGraph()
039: */
040: public Graph getParentGraph() {
041: return parent;
042: }
043:
044: public ExtendedIterator find(TripleMatch m) {
045: return base.find(m);
046: }
047:
048: public ExtendedIterator findExposed(TripleMatch m) {
049: return base.findExposed(m);
050: }
051:
052: public ExtendedIterator findEither(TripleMatch m, boolean showHidden) {
053: return base.findEither(m, showHidden);
054: }
055:
056: public int size() {
057: return base.size();
058: }
059:
060: /**
061: @see com.hp.hpl.jena.graph.Reifier#reifyAs(com.hp.hpl.jena.graph.Node, com.hp.hpl.jena.graph.Triple)
062: */
063: public Node reifyAs(Node n, Triple t) {
064: return base.reifyAs(n, t);
065: }
066:
067: /**
068: @see com.hp.hpl.jena.graph.Reifier#hasTriple(com.hp.hpl.jena.graph.Node)
069: */
070: public boolean hasTriple(Node n) {
071: return base.hasTriple(n);
072: }
073:
074: /**
075: @see com.hp.hpl.jena.graph.Reifier#hasTriple(com.hp.hpl.jena.graph.Triple)
076: */
077: public boolean hasTriple(Triple t) {
078: return base.hasTriple(t);
079: }
080:
081: /**
082: @see com.hp.hpl.jena.graph.Reifier#allNodes()
083: */
084: public ExtendedIterator allNodes() {
085: return base.allNodes();
086: }
087:
088: /**
089: @see com.hp.hpl.jena.graph.Reifier#allNodes(com.hp.hpl.jena.graph.Triple)
090: */
091: public ExtendedIterator allNodes(Triple t) {
092: return base.allNodes(t);
093: }
094:
095: /**
096: @see com.hp.hpl.jena.graph.Reifier#remove(com.hp.hpl.jena.graph.Node, com.hp.hpl.jena.graph.Triple)
097: */
098: public void remove(Node n, Triple t) {
099: base.remove(n, t);
100: }
101:
102: /**
103: @see com.hp.hpl.jena.graph.Reifier#remove(com.hp.hpl.jena.graph.Triple)
104: */
105: public void remove(Triple t) {
106: base.remove(t);
107: }
108:
109: /**
110: @see com.hp.hpl.jena.graph.Reifier#handledAdd(com.hp.hpl.jena.graph.Triple)
111: */
112: public boolean handledAdd(Triple t) {
113: return base.handledAdd(t);
114: }
115:
116: /**
117: @see com.hp.hpl.jena.graph.Reifier#handledRemove(com.hp.hpl.jena.graph.Triple)
118: */
119: public boolean handledRemove(Triple t) {
120: return base.handledRemove(t);
121: }
122:
123: /**
124: @see com.hp.hpl.jena.graph.GetTriple#getTriple(com.hp.hpl.jena.graph.Node)
125: */
126: public Triple getTriple(Node n) {
127: return base.getTriple(n);
128: }
129:
130: /**
131: @see com.hp.hpl.jena.graph.Reifier#close()
132: */
133: public void close() {
134: base.close();
135: }
136:
137: }
138:
139: /*
140: (c) Copyright 2003, 2004, 2005, 2006, 2007, 2008 Hewlett-Packard Development Company, LP
141: All rights reserved.
142:
143: Redistribution and use in source and binary forms, with or without
144: modification, are permitted provided that the following conditions
145: are met:
146:
147: 1. Redistributions of source code must retain the above copyright
148: notice, this list of conditions and the following disclaimer.
149:
150: 2. Redistributions in binary form must reproduce the above copyright
151: notice, this list of conditions and the following disclaimer in the
152: documentation and/or other materials provided with the distribution.
153:
154: 3. The name of the author may not be used to endorse or promote products
155: derived from this software without specific prior written permission.
156:
157: THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
158: IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
159: OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
160: IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
161: INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
162: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
163: DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
164: THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
165: (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
166: THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
167: */
|