From: <tho...@us...> - 2014-01-06 17:13:58
|
Revision: 7737 http://bigdata.svn.sourceforge.net/bigdata/?rev=7737&view=rev Author: thompsonbry Date: 2014-01-06 17:13:48 +0000 (Mon, 06 Jan 2014) Log Message: ----------- javadoc fix. @Override and final annotations. Modified Paths: -------------- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/java/com/bigdata/rdf/inf/BackchainTypeResourceIterator.java Modified: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/java/com/bigdata/rdf/inf/BackchainTypeResourceIterator.java =================================================================== --- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/java/com/bigdata/rdf/inf/BackchainTypeResourceIterator.java 2014-01-06 17:02:58 UTC (rev 7736) +++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/java/com/bigdata/rdf/inf/BackchainTypeResourceIterator.java 2014-01-06 17:13:48 UTC (rev 7737) @@ -30,7 +30,9 @@ import java.util.Arrays; import java.util.Iterator; import java.util.NoSuchElementException; + import org.apache.log4j.Logger; + import com.bigdata.bop.IPredicate; import com.bigdata.bop.IVariableOrConstant; import com.bigdata.rdf.internal.IV; @@ -48,8 +50,10 @@ import com.bigdata.striterator.IChunkedIterator; import com.bigdata.striterator.IChunkedOrderedIterator; import com.bigdata.striterator.IKeyOrder; + import cutthecrap.utils.striterators.Filter; import cutthecrap.utils.striterators.FilterBase; +import cutthecrap.utils.striterators.ICloseable; import cutthecrap.utils.striterators.ICloseableIterator; import cutthecrap.utils.striterators.Resolver; import cutthecrap.utils.striterators.Striterator; @@ -281,7 +285,8 @@ private static final long serialVersionUID = 1L; - public boolean isValid(Object arg0) { + @Override + public boolean isValid(final Object arg0) { final SPO o = (SPO) arg0; @@ -318,9 +323,6 @@ * The source iterator. {@link #nextChunk()} will sort statements * into the {@link IKeyOrder} reported by this iterator (as long * as the {@link IKeyOrder} is non-<code>null</code>). - * @param db - * The database from which we will read the distinct subject - * identifiers (iff this is an all unbound triple pattern). * @param rdfType * The term identifier that corresponds to rdf:Type for the * database. @@ -331,7 +333,7 @@ * @see #newInstance(IChunkedOrderedIterator, IAccessPath, * AbstractTripleStore, long, long) */ - @SuppressWarnings( { "unchecked", "serial" }) + @SuppressWarnings( "rawtypes" ) private BackchainTypeResourceIterator(IChunkedOrderedIterator<ISPO> _src,// Iterator<ISPO> src,// PushbackIterator<IV> resourceIds,// @@ -359,12 +361,14 @@ } + @Override public IKeyOrder<ISPO> getKeyOrder() { return keyOrder; } + @Override public void close() { if (!open) @@ -388,6 +392,7 @@ } + @Override public boolean hasNext() { if (!open) { @@ -447,6 +452,7 @@ * statement iterator is an explicit statement for the current subject, then * we emit the explicit statement. Otherwise we emit an inferred statement. */ + @Override public ISPO next() { if (!hasNext()) { @@ -560,6 +566,7 @@ * a chunk the backchained entailments will always begin on a chunk * boundary. */ + @Override public ISPO[] nextChunk() { if (!hasNext()) @@ -648,7 +655,8 @@ } - public ISPO[] nextChunk(IKeyOrder<ISPO> keyOrder) { + @Override + public ISPO[] nextChunk(final IKeyOrder<ISPO> keyOrder) { if (keyOrder == null) throw new IllegalArgumentException(); @@ -672,6 +680,7 @@ * statement visited by {@link #next()} is "explicit" then the request is * delegated to the source iterator. */ + @Override public void remove() { if (!open) @@ -719,6 +728,7 @@ } + @Override public void close() { src1.close(); @@ -730,10 +740,12 @@ /** * Note: Not implemented since not used above and this class is private. */ + @Override public T[] nextChunk() { throw new UnsupportedOperationException(); } + @Override public boolean hasNext() { return tmp1 != null || tmp2 != null || src1.hasNext() @@ -744,6 +756,7 @@ private T tmp1; private T tmp2; + @Override public T next() { if (!hasNext()) @@ -813,6 +826,7 @@ } + @Override public void remove() { throw new UnsupportedOperationException(); @@ -881,12 +895,14 @@ } + @Override public boolean hasNext() { return buffer != null || src.hasNext(); } + @Override public E next() { if (!hasNext()) @@ -932,17 +948,19 @@ } + @Override public void remove() { throw new UnsupportedOperationException(); } + @Override public void close() { - if (src instanceof ICloseableIterator) { + if (src instanceof ICloseable) { - ((ICloseableIterator<E>) src).close(); + ((ICloseable) src).close(); } @@ -986,17 +1004,20 @@ } } + @Override public boolean hasNext() { return _src.hasNext() || (appender != null && appender.hasNext()); } + @Override public IKeyOrder<ISPO> getKeyOrder() { return _src.getKeyOrder(); } - public ISPO[] nextChunk(IKeyOrder<ISPO> keyOrder) { + @Override + public ISPO[] nextChunk(final IKeyOrder<ISPO> keyOrder) { if (_src.hasNext()) { - ISPO[] chunk = _src.nextChunk(keyOrder); + final ISPO[] chunk = _src.nextChunk(keyOrder); for (ISPO spo : chunk) { testSPO(spo); } @@ -1009,9 +1030,10 @@ return null; } + @Override public ISPO next() { if (_src.hasNext()) { - ISPO spo = _src.next(); + final ISPO spo = _src.next(); testSPO(spo); canRemove = true; return spo; @@ -1022,9 +1044,10 @@ return null; } - public ISPO[] nextChunk() { + @Override + public ISPO[] nextChunk() { if (_src.hasNext()) { - ISPO[] chunk = _src.nextChunk(); + final ISPO[] chunk = _src.nextChunk(); for (ISPO spo : chunk) { testSPO(spo); } @@ -1037,12 +1060,14 @@ return null; } + @Override public void remove() { if (canRemove) { _src.remove(); } } + @Override public void close() { _src.close(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |