Author: desruisseaux
Date: Sat Feb 24 13:50:57 2018
New Revision: 1825239
URL: http://svn.apache.org/viewvc?rev=1825239&view=rev
Log:
Remove the Capability code list, replaced by interface hierarchy
(WritableAggregate, WritableFeatureSet).
Removed:
sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/storage/Capability.java
Modified:
sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/storage/Resource.java
sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/storage/WritableAggregate.java
sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/storage/WritableFeatureSet.java
Modified:
sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/storage/Resource.java
URL:
http://svn.apache.org/viewvc/sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/storage/Resource.java?rev=1825239&r1=1825238&r2=1825239&view=diff
==============================================================================
---
sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/storage/Resource.java
[UTF-8] (original)
+++
sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/storage/Resource.java
[UTF-8] Sat Feb 24 13:50:57 2018
@@ -16,8 +16,6 @@
*/
package org.apache.sis.storage;
-import java.util.Collections;
-import java.util.Set;
import org.opengis.metadata.Metadata;
@@ -105,20 +103,4 @@ public interface Resource {
* @see DataStore#getMetadata()
*/
Metadata getMetadata() throws DataStoreException;
-
- /**
- * Indicates which optional behavior or information can be provided by
this resource.
- * Resources may have different capabilites based on the type and context.
- *
- * <div class="note"><b>Example:</b>
- * {@link Capability#WRITABLE} can be found on {@link WritableAggregate}
or {@link WritableFeatureSet}
- * to indicate that the resource supports write operations.</div>
- *
- * <p>The default implementation returns an empty Set.</p>
- *
- * @return supported capabilities (never null). May be empty.
- */
- default Set<Capability> getCapabilities() {
- return Collections.emptySet();
- }
}
Modified:
sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/storage/WritableAggregate.java
URL:
http://svn.apache.org/viewvc/sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/storage/WritableAggregate.java?rev=1825239&r1=1825238&r2=1825239&view=diff
==============================================================================
---
sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/storage/WritableAggregate.java
[UTF-8] (original)
+++
sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/storage/WritableAggregate.java
[UTF-8] Sat Feb 24 13:50:57 2018
@@ -44,9 +44,6 @@ public interface WritableAggregate exten
* then this {@code Aggregate} may throw an exception.
* </div>
*
- * <p>The {@link Capability#WRITABLE} flag if presents in the {@link
#getCapabilities()} set
- * indicates that this method should be implemented.</p>
- *
* @param resource the resource to copy in this {@code Aggregate}.
* @return the effectively added resource. May be {@code resource} itself
if it has been added verbatim.
* @throws DataStoreException if the given resource can not be stored in
this {@code Aggregate} for another reason.
@@ -57,9 +54,6 @@ public interface WritableAggregate exten
* Removes a {@code Resource} from this {@code Aggregate}.
* This operation is destructive: the {@link Resource} and it's related
data will be removed.
*
- * <p>The {@link Capability#WRITABLE} flag if presents in the {@link
#getCapabilities()} set
- * indicates that this method should be implemented.</p>
- *
* @param resource child resource to remove, should not be null.
* @throws DataStoreException if the given resource could not be removed
for another reason.
*/
Modified:
sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/storage/WritableFeatureSet.java
URL:
http://svn.apache.org/viewvc/sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/storage/WritableFeatureSet.java?rev=1825239&r1=1825238&r2=1825239&view=diff
==============================================================================
---
sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/storage/WritableFeatureSet.java
[UTF-8] (original)
+++
sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/storage/WritableFeatureSet.java
[UTF-8] Sat Feb 24 13:50:57 2018
@@ -61,9 +61,6 @@ public interface WritableFeatureSet exte
* than implementing a {@link Stream}. On the other side if the user has a
{@link Stream},
* obtaining an {@link Iterator} can be done by a call to {@link
Stream#iterator()}.</div>
*
- * <p>The {@link Capability#WRITABLE} flag if presents in the {@link
#getCapabilities()} set
- * indicates that this method should be implemented.</p>
- *
* @param features features to insert in this {@code FeatureSet}.
* @throws DataStoreException if another error occurred while storing new
features.
*/
@@ -72,9 +69,6 @@ public interface WritableFeatureSet exte
/**
* Removes all features from this {@code FeatureSet} which matches the
given predicate.
*
- * <p>The {@link Capability#WRITABLE} flag if presents in the {@link
#getCapabilities()} set
- * indicates that this method should be implemented.</p>
- *
* @param filter a predicate which returns true for resources to be
removed.
* @return {@code true} if any elements were removed.
* @throws DataStoreException if another error occurred while removing
features.
@@ -93,9 +87,6 @@ public interface WritableFeatureSet exte
* <li>If the operator returns {@code null}, then the feature will be
removed from the {@code FeatureSet}.</li>
* </ul>
*
- * <p>The {@link Capability#WRITABLE} flag if presents in the {@link
#getCapabilities()} set
- * indicates that this method should be implemented.</p>
- *
* @param filter a predicate which returns true for resources to be
updated.
* @param updater operation called for each matching {@link Feature}.
* @throws DataStoreException if another error occurred while replacing
features.