You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sis.apache.org by de...@apache.org on 2014/05/28 15:45:43 UTC
svn commit: r1598014 - in
/sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature:
DefaultOperation.java FeatureFormat.java
Author: desruisseaux
Date: Wed May 28 13:45:43 2014
New Revision: 1598014
URL: http://svn.apache.org/r1598014
Log:
Relax the result type of feature operations from 'AttributeType' to the more generic 'IdentifiedType'.
This allow operations to return features.
Modified:
sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/DefaultOperation.java
sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/FeatureFormat.java
Modified: sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/DefaultOperation.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/DefaultOperation.java?rev=1598014&r1=1598013&r2=1598014&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/DefaultOperation.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/DefaultOperation.java [UTF-8] Wed May 28 13:45:43 2014
@@ -26,6 +26,7 @@ import org.apache.sis.util.Debug;
// Branch-dependent imports
import java.util.Objects;
+import org.opengis.feature.IdentifiedType;
import org.opengis.feature.PropertyType;
import org.opengis.feature.AttributeType;
@@ -64,7 +65,7 @@ public class DefaultOperation extends Ab
/**
* The type of the result, or {@code null} if none.
*/
- private final AttributeType<?> result;
+ private final IdentifiedType result;
/**
* Constructs an operation from the given properties. The identification map is given unchanged to
@@ -75,7 +76,7 @@ public class DefaultOperation extends Ab
* @param result The type of the result, or {@code null} if none.
*/
public DefaultOperation(final Map<String,?> identification,
- final ParameterDescriptorGroup parameters, final AttributeType<?> result)
+ final ParameterDescriptorGroup parameters, final IdentifiedType result)
{
super(identification);
ArgumentChecks.ensureNonNull("parameters", parameters);
@@ -97,7 +98,7 @@ public class DefaultOperation extends Ab
*
* @return The type of the result, or {@code null} if none.
*/
- public AttributeType<?> getResult() {
+ public IdentifiedType getResult() {
return result;
}
Modified: sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/FeatureFormat.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/FeatureFormat.java?rev=1598014&r1=1598013&r2=1598014&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/FeatureFormat.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/FeatureFormat.java [UTF-8] Wed May 28 13:45:43 2014
@@ -33,6 +33,7 @@ import org.apache.sis.util.resources.Err
import org.apache.sis.util.resources.Vocabulary;
// Branch-dependent imports
+import org.opengis.feature.IdentifiedType;
import org.opengis.feature.PropertyType;
import org.opengis.feature.AttributeType;
@@ -227,7 +228,7 @@ header: for (int i=0; ; i++) {
valueType = toString(pt.getValueType().getName());
valueClass = AbstractFeature.class;
} else if (propertyType instanceof DefaultOperation) {
- final AttributeType<?> resultType = ((DefaultOperation) propertyType).getResult();
+ final IdentifiedType resultType = ((DefaultOperation) propertyType).getResult();
valueType = toString(resultType.getName());
valueClass = null;
minimumOccurs = -1;