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 2017/11/06 16:19:20 UTC
svn commit: r1814424 - in
/sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/builder:
OperationWrapper.java PropertyTypeBuilder.java
Author: desruisseaux
Date: Mon Nov 6 16:19:20 2017
New Revision: 1814424
URL: http://svn.apache.org/viewvc?rev=1814424&view=rev
Log:
PropertyTypeBuilder setter methods should return PropertyTypeBuilder for method invocation chaining.
Modified:
sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/builder/OperationWrapper.java
sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/builder/PropertyTypeBuilder.java
Modified: sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/builder/OperationWrapper.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/builder/OperationWrapper.java?rev=1814424&r1=1814423&r2=1814424&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/builder/OperationWrapper.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/builder/OperationWrapper.java [UTF-8] Mon Nov 6 16:19:20 2017
@@ -67,11 +67,11 @@ final class OperationWrapper extends Pro
/**
* Do not allow modifications.
*/
- @Override public TypeBuilder setName (GenericName name) {throw readOnly();}
- @Override public TypeBuilder setDefinition (CharSequence definition) {throw readOnly();}
- @Override public TypeBuilder setDesignation(CharSequence designation) {throw readOnly();}
- @Override public TypeBuilder setDescription(CharSequence description) {throw readOnly();}
- @Override public TypeBuilder setDeprecated (boolean deprecated) {throw readOnly();}
+ @Override public PropertyTypeBuilder setName (GenericName name) {throw readOnly();}
+ @Override public PropertyTypeBuilder setDefinition (CharSequence definition) {throw readOnly();}
+ @Override public PropertyTypeBuilder setDesignation(CharSequence designation) {throw readOnly();}
+ @Override public PropertyTypeBuilder setDescription(CharSequence description) {throw readOnly();}
+ @Override public PropertyTypeBuilder setDeprecated (boolean deprecated) {throw readOnly();}
/**
* Returns the exception to be thrown for read-only wrapper.
Modified: sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/builder/PropertyTypeBuilder.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/builder/PropertyTypeBuilder.java?rev=1814424&r1=1814423&r2=1814424&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/builder/PropertyTypeBuilder.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/builder/PropertyTypeBuilder.java [UTF-8] Mon Nov 6 16:19:20 2017
@@ -41,7 +41,7 @@ import org.opengis.feature.FeatureAssoci
*
* @author Johann Sorel (Geomatys)
* @author Martin Desruisseaux (Geomatys)
- * @version 0.8
+ * @version 1.0
* @since 0.8
* @module
*/
@@ -105,6 +105,42 @@ public abstract class PropertyTypeBuilde
}
/**
+ * Sets the {@code PropertyType} name as a generic name.
+ * See {@linkplain TypeBuilder#setName(GenericName) the parent class} for more information.
+ *
+ * @return {@code this} for allowing method calls chaining.
+ */
+ @Override
+ public PropertyTypeBuilder setName(final GenericName name) {
+ super.setName(name);
+ return this;
+ }
+
+ /**
+ * Sets the {@code PropertyType} name as a simple string (local name).
+ * See {@linkplain TypeBuilder#setName(CharSequence) the parent class} for more information.
+ *
+ * @return {@code this} for allowing method calls chaining.
+ */
+ @Override
+ public PropertyTypeBuilder setName(final CharSequence localPart) {
+ super.setName(localPart);
+ return this;
+ }
+
+ /**
+ * Sets the {@code PropertyType} name as a string in the given scope.
+ * See {@linkplain TypeBuilder#setName(CharSequence...) the parent class} for more information.
+ *
+ * @return {@code this} for allowing method calls chaining.
+ */
+ @Override
+ public PropertyTypeBuilder setName(final CharSequence... components) {
+ super.setName(components);
+ return this;
+ }
+
+ /**
* Returns the minimum number of property values.
* The returned value is greater than or equal to zero.
*
@@ -177,6 +213,42 @@ public abstract class PropertyTypeBuilde
return this;
}
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public PropertyTypeBuilder setDefinition(final CharSequence definition) {
+ super.setDefinition(definition);
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public PropertyTypeBuilder setDesignation(final CharSequence designation) {
+ super.setDesignation(designation);
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public PropertyTypeBuilder setDescription(final CharSequence description) {
+ super.setDescription(description);
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public PropertyTypeBuilder setDeprecated(final boolean deprecated) {
+ super.setDeprecated(deprecated);
+ return this;
+ }
+
/**
* Returns {@code true} if {@link AttributeRole#IDENTIFIER_COMPONENT} has been associated to this property.
*/