sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1595794 - in /sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature: DefaultFeature.java FeatureFormat.java
Date Mon, 19 May 2014 09:32:28 GMT
Author: desruisseaux
Date: Mon May 19 09:32:27 2014
New Revision: 1595794

URL: http://svn.apache.org/r1595794
Log:
Minor javadoc.

Modified:
    sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/DefaultFeature.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/DefaultFeature.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/DefaultFeature.java?rev=1595794&r1=1595793&r2=1595794&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/DefaultFeature.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/DefaultFeature.java
[UTF-8] Mon May 19 09:32:27 2014
@@ -164,7 +164,7 @@ public class DefaultFeature implements S
         if (valuesKind != PROPERTIES) {
             if (!properties.isEmpty()) { // The map is typically empty when this method is
first invoked.
                 if (valuesKind != VALUES) {
-                    throw new CorruptedObjectException(toString());
+                    throw new CorruptedObjectException(String.valueOf(type.getName()));
                 }
                 valuesKind = CORRUPTED;
                 for (final Map.Entry<String, Object> entry : properties.entrySet())
{
@@ -241,7 +241,7 @@ public class DefaultFeature implements S
             } else if (valuesKind == PROPERTIES) {
                 unsupported = ((Property) element).getName();
             } else {
-                throw new CorruptedObjectException(toString());
+                throw new CorruptedObjectException(String.valueOf(type.getName()));
             }
         } else if (properties.containsKey(name)) {
             return null; // Null has been explicitely set.

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=1595794&r1=1595793&r2=1595794&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] Mon May 19 09:32:27 2014
@@ -31,13 +31,27 @@ import org.apache.sis.io.TabularFormat;
 import org.apache.sis.util.ArgumentChecks;
 import org.apache.sis.util.resources.Errors;
 import org.apache.sis.util.resources.Vocabulary;
-import org.apache.sis.internal.util.X364;
 
 
 /**
  * Formats {@linkplain DefaultFeature features} or {@linkplain DefaultFeatureType feature
types} in a tabular format.
  * This format assumes a monospaced font and an encoding supporting drawing box characters
(e.g. UTF-8).
  *
+ * <div class="note"><b>Example:</b> a feature named “City” and containing
3 properties (“name”, “population” and
+ * “twin town”) may be formatted like below. The two first properties are {@linkplain
DefaultAttribute attributes}
+ * while the last property is an {@linkplain DefaultAssociation association} to an other
feature.
+ *
+ * {@preformat text
+ *   City
+ *   ┌────────────┬─────────┬─────────────┬───────────┐
+ *   │ Name       │ Type    │ Cardinality │ Value     │
+ *   ├────────────┼─────────┼─────────────┼───────────┤
+ *   │ name       │ String  │ [1 … 1]     │ Paderborn │
+ *   │ population │ Integer │ [1 … 1]     │ 143,174   │
+ *   │ twin town  │ City    │ [0 … ∞]     │ Le Mans   │
+ *   └────────────┴─────────┴─────────────┴───────────┘
+ * }</div>
+ *
  * <div class="warning"><b>Limitation:</b>
  * Current implementation supports only formatting, not parsing.
  * </div>



Mime
View raw message