From: <tho...@us...> - 2010-09-14 19:55:17
|
Revision: 3552 http://bigdata.svn.sourceforge.net/bigdata/?rev=3552&view=rev Author: thompsonbry Date: 2010-09-14 19:55:11 +0000 (Tue, 14 Sep 2010) Log Message: ----------- Fixed import of a class since removed in AbstractTripleStore. BOp#getRequiredProperty(String name) was not compiling under ant due to a generic type parameter for the return type. I have removed the generic type parameter and added explicit casts everywhere this method is used. Modified Paths: -------------- branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/bop/BOp.java branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/bop/BOpBase.java branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/bop/BOpContext.java branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/bop/mutation/InsertOp.java branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/bop/solutions/DistinctBindingSetOp.java branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/bop/solutions/SliceOp.java branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/bop/solutions/SortOp.java branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/bop/solutions/SparqlBindingSetComparatorOp.java branches/QUADS_QUERY_BRANCH/bigdata-rdf/src/java/com/bigdata/rdf/store/AbstractTripleStore.java Modified: branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/bop/BOp.java =================================================================== --- branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/bop/BOp.java 2010-09-14 19:18:42 UTC (rev 3551) +++ branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/bop/BOp.java 2010-09-14 19:55:11 UTC (rev 3552) @@ -116,18 +116,36 @@ */ <T> T getProperty(final String name); - /** - * Return the value of the named annotation. - * - * @param name - * The name of the annotation. - * - * @return The value of the annotation. - * - * @throws IllegalArgumentException - * if the named annotation is not bound. - */ - <T> T getRequiredProperty(final String name); +// /** +// * Return the value of the named annotation. +// * +// * @param name +// * The name of the annotation. +// * +// * @return The value of the annotation. +// * +// * @throws IllegalArgumentException +// * if the named annotation is not bound. +// */ +// <T> T getRequiredProperty(final String name); + + /** + * Return the value of the named annotation. + * + * @param name + * The name of the annotation. + * + * @return The value of the annotation. + * + * @throws IllegalArgumentException + * if the named annotation is not bound. + * + * @todo Note: This variant without generics is required for some java + * compiler versions. + * + * @see http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6302954 + */ + public Object getRequiredProperty(final String name); /** * Deep copy clone of the operator. Modified: branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/bop/BOpBase.java =================================================================== --- branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/bop/BOpBase.java 2010-09-14 19:18:42 UTC (rev 3551) +++ branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/bop/BOpBase.java 2010-09-14 19:55:11 UTC (rev 3552) @@ -306,11 +306,22 @@ } - public <T> T getRequiredProperty(final String name) { +// public <T> T getRequiredProperty(final String name) { +// +// @SuppressWarnings("unchecked") +// final T tmp = (T) annotations.get(name); +// +// if (tmp == null) +// throw new IllegalArgumentException("Required property: " + name); +// +// return tmp; +// +// } - @SuppressWarnings("unchecked") - final T tmp = (T) annotations.get(name); + public Object getRequiredProperty(final String name) { + final Object tmp = annotations.get(name); + if (tmp == null) throw new IllegalArgumentException("Required property: " + name); @@ -358,7 +369,7 @@ public final long getTimestamp() { - return getRequiredProperty(Annotations.TIMESTAMP); + return (Long) getRequiredProperty(Annotations.TIMESTAMP); } Modified: branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/bop/BOpContext.java =================================================================== --- branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/bop/BOpContext.java 2010-09-14 19:18:42 UTC (rev 3551) +++ branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/bop/BOpContext.java 2010-09-14 19:55:11 UTC (rev 3552) @@ -319,7 +319,7 @@ final IIndexManager tmp = getFederation() == null ? getIndexManager() : getFederation(); - final long timestamp = pred + final long timestamp = (Long) pred .getRequiredProperty(BOp.Annotations.TIMESTAMP); return (IRelation<?>) tmp.getResourceLocator().locate( @@ -391,7 +391,7 @@ final int partitionId = predicate.getPartitionId(); - final long timestamp = predicate + final long timestamp = (Long) predicate .getRequiredProperty(BOp.Annotations.TIMESTAMP); final int flags = predicate.getProperty( Modified: branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/bop/mutation/InsertOp.java =================================================================== --- branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/bop/mutation/InsertOp.java 2010-09-14 19:18:42 UTC (rev 3551) +++ branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/bop/mutation/InsertOp.java 2010-09-14 19:55:11 UTC (rev 3552) @@ -113,34 +113,36 @@ super(args, annotations); - getRequiredProperty(Annotations.SELECTED); - - } + getRequiredProperty(Annotations.SELECTED); - /** - * @see Annotations#SELECTED - */ - public IPredicate<E> getPredicate() { + } - return getRequiredProperty(Annotations.SELECTED); + /** + * @see Annotations#SELECTED + */ + @SuppressWarnings("unchecked") + public IPredicate<E> getPredicate() { - } - + return (IPredicate<E>) getRequiredProperty(Annotations.SELECTED); + + } + /** * @see Annotations#RELATION */ public String getRelation() { - return getRequiredProperty(Annotations.RELATION); + return (String) getRequiredProperty(Annotations.RELATION); } /** * @see Annotations#KEY_ORDER */ - public IKeyOrder<E> getKeyOrder() { + @SuppressWarnings("unchecked") + public IKeyOrder<E> getKeyOrder() { - return getRequiredProperty(Annotations.KEY_ORDER); + return (IKeyOrder<E>) getRequiredProperty(Annotations.KEY_ORDER); } Modified: branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/bop/solutions/DistinctBindingSetOp.java =================================================================== --- branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/bop/solutions/DistinctBindingSetOp.java 2010-09-14 19:18:42 UTC (rev 3551) +++ branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/bop/solutions/DistinctBindingSetOp.java 2010-09-14 19:55:11 UTC (rev 3552) @@ -125,7 +125,7 @@ */ public IVariable<?>[] getVariables() { - return getRequiredProperty(Annotations.VARIABLES); + return (IVariable<?>[]) getRequiredProperty(Annotations.VARIABLES); } Modified: branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/bop/solutions/SliceOp.java =================================================================== --- branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/bop/solutions/SliceOp.java 2010-09-14 19:18:42 UTC (rev 3551) +++ branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/bop/solutions/SliceOp.java 2010-09-14 19:55:11 UTC (rev 3552) @@ -140,7 +140,7 @@ */ public long getOffset() { - return getRequiredProperty(Annotations.OFFSET); + return (Long) getRequiredProperty(Annotations.OFFSET); } @@ -149,7 +149,7 @@ */ public long getLimit() { - return getRequiredProperty(Annotations.LIMIT); + return (Long) getRequiredProperty(Annotations.LIMIT); } Modified: branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/bop/solutions/SortOp.java =================================================================== --- branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/bop/solutions/SortOp.java 2010-09-14 19:18:42 UTC (rev 3551) +++ branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/bop/solutions/SortOp.java 2010-09-14 19:55:11 UTC (rev 3552) @@ -80,7 +80,7 @@ */ public ComparatorOp getComparator() { - return getRequiredProperty(Annotations.COMPARATOR); + return (ComparatorOp) getRequiredProperty(Annotations.COMPARATOR); } Modified: branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/bop/solutions/SparqlBindingSetComparatorOp.java =================================================================== --- branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/bop/solutions/SparqlBindingSetComparatorOp.java 2010-09-14 19:18:42 UTC (rev 3551) +++ branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/bop/solutions/SparqlBindingSetComparatorOp.java 2010-09-14 19:55:11 UTC (rev 3552) @@ -46,7 +46,7 @@ */ public ISortOrder<?>[] getOrder() { - return getRequiredProperty(Annotations.ORDER); + return (ISortOrder<?>[]) getRequiredProperty(Annotations.ORDER); } Modified: branches/QUADS_QUERY_BRANCH/bigdata-rdf/src/java/com/bigdata/rdf/store/AbstractTripleStore.java =================================================================== --- branches/QUADS_QUERY_BRANCH/bigdata-rdf/src/java/com/bigdata/rdf/store/AbstractTripleStore.java 2010-09-14 19:18:42 UTC (rev 3551) +++ branches/QUADS_QUERY_BRANCH/bigdata-rdf/src/java/com/bigdata/rdf/store/AbstractTripleStore.java 2010-09-14 19:55:11 UTC (rev 3552) @@ -146,7 +146,6 @@ import com.bigdata.relation.rule.eval.IRuleTaskFactory; import com.bigdata.relation.rule.eval.ISolution; import com.bigdata.search.FullTextIndex; -import com.bigdata.service.AbstractEmbeddedDataService; import com.bigdata.service.DataService; import com.bigdata.service.IBigdataFederation; import com.bigdata.service.ndx.IClientIndex; @@ -1129,8 +1128,7 @@ * and writers. This property depends on primarily on the concurrency * control mechanisms (if any) that are used to prevent concurrent access to * an unisolated index while a thread is writing on that index. Stores based - * on the {@link IBigdataFederation} or an - * {@link AbstractEmbeddedDataService} automatically inherent the + * on the {@link IBigdataFederation} automatically inherent the * appropriate concurrency controls as would a store whose index access was * intermediated by the executor service of an {@link IConcurrencyManager}. * <p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |