sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1614513 - in /sis/branches/JDK6: ./ core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/ core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/direct/ core/sis-metadata/src/main/java/org/apache/sis/io/wkt/ cor...
Date Tue, 29 Jul 2014 23:14:35 GMT
Author: desruisseaux
Date: Tue Jul 29 23:14:34 2014
New Revision: 1614513

URL: http://svn.apache.org/r1614513
Log:
Merge from the JDK7 branch.

Added:
    sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/SV_ParameterDirection.java
      - copied unchanged from r1614509, sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/SV_ParameterDirection.java
    sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/direct/GO_MemberName.java
      - copied unchanged from r1614509, sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/direct/GO_MemberName.java
    sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/direct/GO_ScopedName.java
      - copied unchanged from r1614509, sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/direct/GO_ScopedName.java
    sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/direct/Name.java
      - copied unchanged from r1614509, sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/direct/Name.java
    sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/service/OperationName.java
      - copied, changed from r1614509, sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/service/OperationName.java
    sis/branches/JDK6/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/service/
      - copied from r1614509, sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/service/
    sis/branches/JDK6/core/sis-metadata/src/test/resources/org/apache/sis/metadata/iso/service/
      - copied from r1614509, sis/branches/JDK7/core/sis-metadata/src/test/resources/org/apache/sis/metadata/iso/service/
    sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gmd/EnumAdapter.java
      - copied unchanged from r1614509, sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gmd/EnumAdapter.java
Modified:
    sis/branches/JDK6/   (props changed)
    sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/DCPList.java
    sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/SV_CouplingType.java
    sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/direct/package-info.java
    sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/Formatter.java
    sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/Pruner.java
    sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/service/DefaultCoupledResource.java
    sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/service/DefaultOperationChainMetadata.java
    sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/service/DefaultOperationMetadata.java
    sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/service/DefaultParameter.java
    sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/service/DefaultServiceIdentification.java
    sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/service/package-info.java
    sis/branches/JDK6/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/AllMetadataTest.java
    sis/branches/JDK6/core/sis-metadata/src/test/java/org/apache/sis/test/suite/MetadataTestSuite.java
    sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/collection/CodeListSet.java
    sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/collection/TreeTableFormat.java
    sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/iso/AbstractName.java
    sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultLocalName.java
    sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultMemberName.java
    sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultNameFactory.java
    sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultScopedName.java
    sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultTypeName.java
    sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/iso/Names.java
    sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/iso/Types.java
    sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/resources/IndexedResourceBundle.java
    sis/branches/JDK6/core/sis-utility/src/test/java/org/apache/sis/test/AnnotationsTestCase.java
    sis/branches/JDK6/core/sis-utility/src/test/java/org/apache/sis/util/iso/TypesTest.java

Propchange: sis/branches/JDK6/
------------------------------------------------------------------------------
  Merged /sis/branches/JDK8:r1613817-1614508
  Merged /sis/branches/JDK7:r1613818-1614509

Modified: sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/DCPList.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/DCPList.java?rev=1614513&r1=1614512&r2=1614513&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/DCPList.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/DCPList.java [UTF-8] Tue Jul 29 23:14:34 2014
@@ -20,6 +20,7 @@ import javax.xml.bind.annotation.XmlElem
 import org.opengis.metadata.service.DistributedComputingPlatform;
 import org.apache.sis.internal.jaxb.gmd.CodeListAdapter;
 import org.apache.sis.internal.jaxb.gmd.CodeListProxy;
+import org.apache.sis.xml.Namespaces;
 
 
 /**
@@ -68,7 +69,7 @@ public final class DCPList extends CodeL
      * @return The value to be marshalled.
      */
     @Override
-    @XmlElement(name = "DCPList")
+    @XmlElement(name = "DCPList", namespace = Namespaces.SRV)
     public CodeListProxy getElement() {
         return proxy;
     }

Modified: sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/SV_CouplingType.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/SV_CouplingType.java?rev=1614513&r1=1614512&r2=1614513&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/SV_CouplingType.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/SV_CouplingType.java [UTF-8] Tue Jul 29 23:14:34 2014
@@ -20,6 +20,7 @@ import javax.xml.bind.annotation.XmlElem
 import org.opengis.metadata.service.CouplingType;
 import org.apache.sis.internal.jaxb.gmd.CodeListAdapter;
 import org.apache.sis.internal.jaxb.gmd.CodeListProxy;
+import org.apache.sis.xml.Namespaces;
 
 
 /**
@@ -68,7 +69,7 @@ public final class SV_CouplingType exten
      * @return The value to be marshalled.
      */
     @Override
-    @XmlElement(name = "SV_CouplingType")
+    @XmlElement(name = "SV_CouplingType", namespace = Namespaces.SRV)
     public CodeListProxy getElement() {
         return proxy;
     }

Modified: sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/direct/package-info.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/direct/package-info.java?rev=1614513&r1=1614512&r2=1614513&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/direct/package-info.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/direct/package-info.java [UTF-8] Tue Jul 29 23:14:34 2014
@@ -46,7 +46,16 @@
  *
  * @author  Guilhem Legal (Geomatys)
  * @since   0.3 (derived from geotk-3.15)
- * @version 0.3
+ * @version 0.5
  * @module
  */
+@XmlSchema(elementFormDefault = XmlNsForm.QUALIFIED, namespace = Namespaces.GMD, xmlns = {
+    @XmlNs(prefix = "gmd", namespaceURI = Namespaces.GMD),
+    @XmlNs(prefix = "gco", namespaceURI = Namespaces.GCO)
+})
 package org.apache.sis.internal.jaxb.metadata.direct;
+
+import javax.xml.bind.annotation.XmlNs;
+import javax.xml.bind.annotation.XmlNsForm;
+import javax.xml.bind.annotation.XmlSchema;
+import org.apache.sis.xml.Namespaces;

Modified: sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/Formatter.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/Formatter.java?rev=1614513&r1=1614512&r2=1614513&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/Formatter.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/Formatter.java [UTF-8] Tue Jul 29 23:14:34 2014
@@ -49,7 +49,7 @@ import org.opengis.referencing.operation
 import org.opengis.referencing.operation.CoordinateOperation;
 import org.opengis.referencing.operation.MathTransform;
 import org.opengis.referencing.operation.Matrix;
-import org.opengis.util.CodeList;
+import org.opengis.util.Enumerated;
 
 import org.apache.sis.measure.Units;
 import org.apache.sis.math.DecimalFunctions;
@@ -929,12 +929,12 @@ public class Formatter implements Locali
     }
 
     /**
-     * Appends a code list.
+     * Appends an enumeration or code list value.
      * The {@linkplain Symbols#getSeparator() element separator} will be written before the code list if needed.
      *
      * @param code The code list to append to the WKT, or {@code null} if none.
      */
-    public void append(final CodeList<?> code) {
+    public void append(final Enumerated code) {
         if (code != null) {
             appendSeparator();
             setColor(ElementKind.CODE_LIST);
@@ -1140,7 +1140,7 @@ public class Formatter implements Locali
                 append(number.doubleValue());
             }
         }
-        else if (value instanceof CodeList<?>) append((CodeList<?>) value);
+        else if (value instanceof Enumerated)  append((Enumerated) value);
         else if (value instanceof Date)        append((Date)        value);
         else if (value instanceof Boolean)     append((Boolean)     value);
         else if (value instanceof CharSequence) {

Modified: sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/Pruner.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/Pruner.java?rev=1614513&r1=1614512&r2=1614513&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/Pruner.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/Pruner.java [UTF-8] Tue Jul 29 23:14:34 2014
@@ -19,7 +19,7 @@ package org.apache.sis.metadata;
 import java.util.Map;
 import java.util.Iterator;
 import java.util.Collection;
-import org.opengis.util.CodeList;
+import org.opengis.util.Enumerated;
 import org.apache.sis.util.Emptiable;
 import org.apache.sis.internal.util.CollectionsExt;
 
@@ -162,7 +162,7 @@ final class Pruner {
                         } else if (!prune && element instanceof Emptiable) {
                             isEmptyElement = ((Emptiable) element).isEmpty();
                             // If 'prune' is true, we will rather test for Emptiable after our pruning attempt.
-                        } else if (!(element instanceof Enum<?>) && !(element instanceof CodeList<?>)) {
+                        } else if (!(element instanceof Enumerated)) {
                             final MetadataStandard standard = MetadataStandard.forClass(element.getClass());
                             if (standard != null) {
                                 isEmptyElement = isEmpty(asMap(standard, element, prune), tested, prune);

Modified: sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/service/DefaultCoupledResource.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/service/DefaultCoupledResource.java?rev=1614513&r1=1614512&r2=1614513&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/service/DefaultCoupledResource.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/service/DefaultCoupledResource.java [UTF-8] Tue Jul 29 23:14:34 2014
@@ -19,13 +19,19 @@ package org.apache.sis.metadata.iso.serv
 import java.util.Collection;
 import javax.xml.bind.annotation.XmlType;
 import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementRef;
 import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
 import org.opengis.util.ScopedName;
+import org.opengis.util.InternationalString;
 import org.opengis.metadata.citation.Citation;
 import org.opengis.metadata.identification.DataIdentification;
 import org.opengis.metadata.service.CoupledResource;
 import org.opengis.metadata.service.OperationMetadata;
 import org.apache.sis.metadata.iso.ISOMetadata;
+import org.apache.sis.internal.jaxb.metadata.direct.GO_ScopedName;
+
+import static org.apache.sis.internal.jaxb.gco.PropertyType.LEGACY_XML;
 
 
 /**
@@ -38,10 +44,12 @@ import org.apache.sis.metadata.iso.ISOMe
  * @module
  */
 @XmlType(name = "SV_CoupledResource_Type", propOrder = {
-    "scopedName",
+    "operationName",
+    "identifier",
+    "scopedName" /*,
     "resourceReferences",
     "resources",
-    "operation"
+    "operation" */
 })
 @XmlRootElement(name = "SV_CoupledResource")
 public class DefaultCoupledResource extends ISOMetadata implements CoupledResource {
@@ -145,7 +153,8 @@ public class DefaultCoupledResource exte
      * @return identifier of the resource, or {@code null} if none.
      */
     @Override
-    @XmlElement(name = "scopedName")
+    @XmlElementRef
+    @XmlJavaTypeAdapter(GO_ScopedName.class)
     public ScopedName getScopedName() {
         return scopedName;
     }
@@ -166,7 +175,7 @@ public class DefaultCoupledResource exte
      * @return References to the resource on which the services operates.
      */
     @Override
-    @XmlElement(name = "resourceReference")
+/// @XmlElement(name = "resourceReference")
     public Collection<Citation> getResourceReferences() {
         return resourceReferences = nonNullCollection(resourceReferences, Citation.class);
     }
@@ -186,7 +195,7 @@ public class DefaultCoupledResource exte
      * @return tightly coupled resources.
      */
     @Override
-    @XmlElement(name = "resource")
+/// @XmlElement(name = "resource")
     public Collection<DataIdentification> getResources() {
         return resources = nonNullCollection(resources, DataIdentification.class);
     }
@@ -206,7 +215,7 @@ public class DefaultCoupledResource exte
      * @return The service operation, or {@code null} if none.
      */
     @Override
-    @XmlElement(name = "operation")
+/// @XmlElement(name = "operation")
     public OperationMetadata getOperation() {
         return operation;
     }
@@ -220,4 +229,47 @@ public class DefaultCoupledResource exte
         checkWritePermission();
         this.operation = newValue;
     }
+
+
+
+    // Bridges for elements from legacy ISO 19119
+
+    /**
+     * For JAXB marhalling of ISO 19119 document only.
+     */
+    @XmlElement(name = "operationName")
+    final InternationalString getOperationName() {
+        if (LEGACY_XML) {
+            final OperationMetadata operation = getOperation();
+            if (operation != null) {
+                return operation.getOperationName();
+            }
+        }
+        return null;
+    }
+
+    /**
+     * For JAXB unmarhalling of ISO 19119 document only. Sets {@link #operation} to a temporary
+     * {@link OperationName} placeholder. That temporary instance will be replaced by the real
+     * one when the enclosing {@link DefaultServiceIdentification} is unmarshalled.
+     */
+    final void setOperationName(final InternationalString name) {
+        if (operation == null) {
+            operation = new OperationName(name);
+        }
+    }
+
+    /**
+     * Returns the resource identifier, which is assumed to be the name as a string.
+     */
+    @XmlElement(name = "identifier")
+    final String getIdentifier() {
+        if (LEGACY_XML) {
+            final ScopedName name = getScopedName();
+            if (name != null) {
+                return name.tip().toString();
+            }
+        }
+        return null;
+    }
 }

Modified: sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/service/DefaultOperationChainMetadata.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/service/DefaultOperationChainMetadata.java?rev=1614513&r1=1614512&r2=1614513&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/service/DefaultOperationChainMetadata.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/service/DefaultOperationChainMetadata.java [UTF-8] Tue Jul 29 23:14:34 2014
@@ -24,6 +24,7 @@ import org.opengis.metadata.service.Oper
 import org.opengis.metadata.service.OperationMetadata;
 import org.opengis.util.InternationalString;
 import org.apache.sis.metadata.iso.ISOMetadata;
+import org.apache.sis.util.iso.Types;
 
 
 /**
@@ -74,10 +75,10 @@ public class DefaultOperationChainMetada
      * @param name      The name as used by the service for this chain.
      * @param operation Information about the operations applied by the chain.
      */
-    public DefaultOperationChainMetadata(final InternationalString name,
+    public DefaultOperationChainMetadata(final CharSequence name,
                                          final OperationMetadata operation)
     {
-        this.name       = name;
+        this.name       = Types.toInternationalString(name);
         this.operations = singleton(operation, OperationMetadata.class);
     }
 

Modified: sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/service/DefaultOperationMetadata.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/service/DefaultOperationMetadata.java?rev=1614513&r1=1614512&r2=1614513&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/service/DefaultOperationMetadata.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/service/DefaultOperationMetadata.java [UTF-8] Tue Jul 29 23:14:34 2014
@@ -16,7 +16,6 @@
  */
 package org.apache.sis.metadata.iso.service;
 
-import java.util.Set;
 import java.util.List;
 import java.util.Collection;
 import javax.xml.bind.annotation.XmlType;
@@ -28,6 +27,7 @@ import org.opengis.metadata.citation.Onl
 import org.opengis.metadata.service.DistributedComputingPlatform;
 import org.opengis.metadata.service.OperationMetadata;
 import org.opengis.metadata.service.Parameter;
+import org.apache.sis.util.iso.Types;
 
 
 /**
@@ -44,8 +44,8 @@ import org.opengis.metadata.service.Para
     "distributedComputingPlatforms",
     "operationDescription",
     "invocationName",
-    "connectPoints",
     "parameters",
+    "connectPoints",
     "dependsOn"
 })
 @XmlRootElement(name = "SV_OperationMetadata")
@@ -83,7 +83,7 @@ public class DefaultOperationMetadata ex
     /**
      * The parameters that are required for this interface.
      */
-    private Set<Parameter> parameters;
+    private Collection<Parameter> parameters;
 
     /**
      * List of operation that must be completed immediately.
@@ -103,11 +103,11 @@ public class DefaultOperationMetadata ex
      * @param platform      Distributed computing platforms on which the operation has been implemented.
      * @param connectPoint  Handle for accessing the service interface.
      */
-    public DefaultOperationMetadata(final InternationalString operationName,
+    public DefaultOperationMetadata(final CharSequence operationName,
                                     final DistributedComputingPlatform platform,
                                     final OnlineResource connectPoint)
     {
-        this.operationName                 = operationName;
+        this.operationName                 = Types.toInternationalString(operationName);
         this.distributedComputingPlatforms = singleton(platform, DistributedComputingPlatform.class);
         this.connectPoints                 = singleton(connectPoint, OnlineResource.class);
     }
@@ -186,7 +186,7 @@ public class DefaultOperationMetadata ex
      * @return Distributed computing platforms on which the operation has been implemented.
      */
     @Override
-    @XmlElement(name = "distributedComputingPlatform", required = true)
+    @XmlElement(name = "DCP", required = true)
     public Collection<DistributedComputingPlatform> getDistributedComputingPlatforms() {
         return distributedComputingPlatforms = nonNullCollection(distributedComputingPlatforms, DistributedComputingPlatform.class);
     }
@@ -270,8 +270,8 @@ public class DefaultOperationMetadata ex
      */
     @Override
     @XmlElement(name = "parameters")
-    public Set<Parameter> getParameters() {
-        return nonNullSet(parameters, Parameter.class);
+    public Collection<Parameter> getParameters() {
+        return parameters = nonNullCollection(parameters, Parameter.class);
     }
 
     /**
@@ -279,8 +279,8 @@ public class DefaultOperationMetadata ex
      *
      * @param newValues The new set of parameters that are required for this interface.
      */
-    public void setParameters(final Set<? extends Parameter> newValues) {
-        parameters = writeSet(newValues, parameters, Parameter.class);
+    public void setParameters(final Collection<? extends Parameter> newValues) {
+        parameters = writeCollection(newValues, parameters, Parameter.class);
     }
 
     /**

Modified: sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/service/DefaultParameter.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/service/DefaultParameter.java?rev=1614513&r1=1614512&r2=1614513&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/service/DefaultParameter.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/service/DefaultParameter.java [UTF-8] Tue Jul 29 23:14:34 2014
@@ -19,11 +19,16 @@ package org.apache.sis.metadata.iso.serv
 import javax.xml.bind.annotation.XmlType;
 import javax.xml.bind.annotation.XmlElement;
 import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+import org.opengis.util.TypeName;
 import org.opengis.util.MemberName;
 import org.opengis.util.InternationalString;
 import org.opengis.metadata.service.Parameter;
 import org.opengis.metadata.service.ParameterDirection;
 import org.apache.sis.metadata.iso.ISOMetadata;
+import org.apache.sis.internal.jaxb.metadata.direct.GO_MemberName;
+
+import static org.apache.sis.internal.jaxb.gco.PropertyType.LEGACY_XML;
 
 
 /**
@@ -41,8 +46,9 @@ import org.apache.sis.metadata.iso.ISOMe
     "name",
     "direction",
     "description",
-    "optionality",
-    "repeatability"
+    "optionalityLabel",
+    "repeatability",
+    "valueType"
 })
 @XmlRootElement(name = "SV_Parameter")
 public class DefaultParameter extends ISOMetadata implements Parameter {
@@ -69,12 +75,12 @@ public class DefaultParameter extends IS
     /**
      * Indication if the parameter is required.
      */
-    private InternationalString optionality;
+    private Boolean optionality;
 
     /**
      * Indication if more than one value of the parameter may be provided.
      */
-    private boolean repeatability;
+    private Boolean repeatability;
 
     /**
      * Constructs an initially empty parameter.
@@ -90,7 +96,7 @@ public class DefaultParameter extends IS
      * @param repeatability Indication if more than one value of the parameter may be provided.
      */
     public DefaultParameter(final MemberName name,
-                            final InternationalString optionality,
+                            final boolean optionality,
                             final boolean repeatability)
     {
         this.name          = name;
@@ -149,6 +155,7 @@ public class DefaultParameter extends IS
      * @return The name, as used by the service for this parameter.
      */
     @Override
+    @XmlJavaTypeAdapter(GO_MemberName.class)
     @XmlElement(name = "name", required = true)
     public MemberName getName() {
         return name;
@@ -212,8 +219,8 @@ public class DefaultParameter extends IS
      * @return Whether the parameter is required.
      */
     @Override
-    @XmlElement(name = "optionality", required = true)
-    public InternationalString getOptionality() {
+/// @XmlElement(name = "optionality", required = true)
+    public Boolean getOptionality() {
         return optionality;
     }
 
@@ -222,7 +229,7 @@ public class DefaultParameter extends IS
      *
      * @param newValue Whether the parameter is required.
      */
-    public void setOptionality(final InternationalString newValue) {
+    public void setOptionality(final Boolean newValue) {
         checkWritePermission();
         this.optionality = newValue;
     }
@@ -234,7 +241,7 @@ public class DefaultParameter extends IS
      */
     @Override
     @XmlElement(name = "repeatability", required = true)
-    public boolean getRepeatability() {
+    public Boolean getRepeatability() {
         return repeatability;
     }
 
@@ -243,8 +250,37 @@ public class DefaultParameter extends IS
      *
      * @param newValue Whether more than one value of the parameter may be provided.
      */
-    public void setRepeatability(final boolean newValue) {
+    public void setRepeatability(final Boolean newValue) {
         checkWritePermission();
         this.repeatability = newValue;
     }
+
+
+
+    // Bridges for elements from legacy ISO 19119
+
+    /**
+     * Returns the optionality as a "Optional" or "Mandatory" string.
+     */
+    @XmlElement(name = "optionality", required = true)
+    final String getOptionalityLabel() {
+        return (optionality == null) ? null : (optionality) ? "Optional" : "Mandatory";
+    }
+
+    /**
+     * Sets optionality to {@code true} if the given string is equals, ignoring case, to {@code "Optional"}.
+     */
+    final void setOptionalityLabel(final String label) {
+        optionality = (label == null) ? null : label.equalsIgnoreCase("Optional");
+    }
+
+    /**
+     * For JAXB marhalling of ISO 19119 document only.
+     * Note that there is not setter method, since we expect the same information
+     * to be provided in the {@link #name} attribute type.
+     */
+    @XmlElement(name = "valueType")
+    final TypeName getValueType() {
+        return (LEGACY_XML && name != null) ? name.getAttributeType() : null;
+    }
 }

Modified: sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/service/DefaultServiceIdentification.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/service/DefaultServiceIdentification.java?rev=1614513&r1=1614512&r2=1614513&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/service/DefaultServiceIdentification.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/service/DefaultServiceIdentification.java [UTF-8] Tue Jul 29 23:14:34 2014
@@ -17,8 +17,9 @@
 package org.apache.sis.metadata.iso.service;
 
 import java.util.Collection;
-import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.Unmarshaller;
 import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.XmlElement;
 import javax.xml.bind.annotation.XmlRootElement;
 import org.opengis.util.GenericName;
 import org.opengis.metadata.citation.Citation;
@@ -47,15 +48,15 @@ import org.apache.sis.metadata.iso.ident
 @XmlType(name = "MD_ServiceIdentification_Type", propOrder = { // ISO 19139 still use the old prefix.
     "serviceType",
     "serviceTypeVersions",
-    "accessProperties",
-    "couplingType",
+/// "accessProperties",
     "coupledResources",
-    "operatedDatasets",
-    "profiles",
-    "serviceStandards",
+    "couplingType",
+/// "operatedDatasets",
+/// "profiles",
+/// "serviceStandards",
     "containsOperations",
     "operatesOn",
-    "containsChain"
+/// "containsChain"
 })
 @XmlRootElement(name = "SV_ServiceIdentification")
 public class DefaultServiceIdentification extends AbstractIdentification implements ServiceIdentification {
@@ -240,7 +241,7 @@ public class DefaultServiceIdentificatio
      * @return Information about the availability of the service, or {@code null} if none.
      */
     @Override
-    @XmlElement(name = "accessProperties")
+/// @XmlElement(name = "accessProperties")
     public StandardOrderProcess getAccessProperties() {
         return accessProperties;
 
@@ -303,7 +304,7 @@ public class DefaultServiceIdentificatio
      * @return Reference(s) to the resource on which the service operates.
      */
     @Override
-    @XmlElement(name = "operatedDataset")
+/// @XmlElement(name = "operatedDataset")
     public Collection<Citation> getOperatedDatasets() {
         return operatedDatasets = nonNullCollection(operatedDatasets, Citation.class);
     }
@@ -323,7 +324,7 @@ public class DefaultServiceIdentificatio
      * @return Profile(s) to which the service adheres.
      */
     @Override
-    @XmlElement(name = "profile")
+/// @XmlElement(name = "profile")
     public Collection<Citation> getProfiles() {
         return profiles = nonNullCollection(profiles, Citation.class);
     }
@@ -343,7 +344,7 @@ public class DefaultServiceIdentificatio
      * @return Standard(s) to which the service adheres.
      */
     @Override
-    @XmlElement(name = "serviceStandard")
+/// @XmlElement(name = "serviceStandard")
     public Collection<Citation> getServiceStandards() {
         return serviceStandards = nonNullCollection(serviceStandards, Citation.class);
     }
@@ -403,7 +404,7 @@ public class DefaultServiceIdentificatio
      * @return Information about the chain applied by the service.
      */
     @Override
-    @XmlElement(name = "containsChain")
+/// @XmlElement(name = "containsChain")
     public Collection<OperationChainMetadata> getContainsChain() {
         return containsChain = nonNullCollection(containsChain, OperationChainMetadata.class);
     }
@@ -416,4 +417,13 @@ public class DefaultServiceIdentificatio
     public void setContainsChain(final Collection<? extends OperationChainMetadata>  newValues) {
         containsChain = writeCollection(newValues, containsChain, OperationChainMetadata.class);
     }
+
+    /**
+     * Invoked after JAXB has unmarshalled this object.
+     */
+    private void afterUnmarshal(final Unmarshaller u, final Object parent) {
+        if (containsOperations != null && coupledResources != null) {
+            OperationName.resolve(containsOperations, coupledResources);
+        }
+    }
 }

Copied: sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/service/OperationName.java (from r1614509, sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/service/OperationName.java)
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/service/OperationName.java?p2=sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/service/OperationName.java&p1=sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/service/OperationName.java&r1=1614509&r2=1614513&rev=1614513&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/service/OperationName.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/service/OperationName.java [UTF-8] Tue Jul 29 23:14:34 2014
@@ -88,7 +88,7 @@ final class OperationName implements Ope
      * were identified only by a name in a {@code <srv:operationName>} element.</p>
      */
     static void resolve(final Collection<OperationMetadata> containsOperations, final Collection<CoupledResource> coupledResources) {
-        final Map<String,OperationMetadata> byName = new HashMap<>();
+        final Map<String,OperationMetadata> byName = new HashMap<String,OperationMetadata>();
         for (final OperationMetadata operation : containsOperations) {
             final InternationalString name = operation.getOperationName();
             add(byName, name.toString(Locale.ROOT), operation);

Modified: sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/service/package-info.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/service/package-info.java?rev=1614513&r1=1614512&r2=1614513&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/service/package-info.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/service/package-info.java [UTF-8] Tue Jul 29 23:14:34 2014
@@ -61,8 +61,10 @@
     @XmlJavaTypeAdapter(SV_OperationMetadata.class),
     @XmlJavaTypeAdapter(SV_OperationChainMetadata.class),
     @XmlJavaTypeAdapter(SV_Parameter.class),
+    @XmlJavaTypeAdapter(SV_ParameterDirection.class),
 
     // Java types, primitive types and basic OGC types handling
+    @XmlJavaTypeAdapter(StringAdapter.class),
     @XmlJavaTypeAdapter(InternationalStringAdapter.class),
     @XmlJavaTypeAdapter(GO_GenericName.class),
     @XmlJavaTypeAdapter(GO_Boolean.class), @XmlJavaTypeAdapter(type=boolean.class, value=GO_Boolean.class)

Modified: sis/branches/JDK6/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/AllMetadataTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/AllMetadataTest.java?rev=1614513&r1=1614512&r2=1614513&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/AllMetadataTest.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/AllMetadataTest.java [UTF-8] Tue Jul 29 23:14:34 2014
@@ -52,6 +52,7 @@ public final strictfp class AllMetadataT
     /**
      * Creates a new test case with all GeoAPI interfaces and code lists to test.
      */
+    @SuppressWarnings("deprecation")
     public AllMetadataTest() {
         super(MetadataStandard.ISO_19115,
             org.opengis.metadata.ApplicationSchemaInformation.class,
@@ -221,6 +222,21 @@ public final strictfp class AllMetadataT
     }
 
     /**
+     * Returns the name of the XML element for the given UML element.
+     * This method checks for the special cases which are known to have different UML and XML names.
+     *
+     * @return {@inheritDoc}
+     */
+    @Override
+    protected String getExpectedName(final UML uml) {
+        String name = uml.identifier();
+        if (name.equals("distributedComputingPlatform")) {
+            name = "DCP";
+        }
+        return name;
+    }
+
+    /**
      * Returns the expected namespace for an element defined by the given specification.
      * For example the namespace of any type defined by {@link Specification#ISO_19115}
      * is {@code "http://www.isotc211.org/2005/gmd"}.

Modified: sis/branches/JDK6/core/sis-metadata/src/test/java/org/apache/sis/test/suite/MetadataTestSuite.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-metadata/src/test/java/org/apache/sis/test/suite/MetadataTestSuite.java?rev=1614513&r1=1614512&r2=1614513&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-metadata/src/test/java/org/apache/sis/test/suite/MetadataTestSuite.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-metadata/src/test/java/org/apache/sis/test/suite/MetadataTestSuite.java [UTF-8] Tue Jul 29 23:14:34 2014
@@ -73,6 +73,9 @@ import org.junit.BeforeClass;
     org.apache.sis.metadata.iso.identification.DefaultResolutionTest.class,
     org.apache.sis.metadata.iso.identification.DefaultBrowseGraphicTest.class,
     org.apache.sis.metadata.iso.identification.DefaultDataIdentificationTest.class,
+    org.apache.sis.metadata.iso.service.DefaultParameterTest.class,
+    org.apache.sis.metadata.iso.service.DefaultCoupledResourceTest.class,
+    org.apache.sis.metadata.iso.service.DefaultServiceIdentificationTest.class,
     org.apache.sis.metadata.iso.quality.AbstractElementTest.class,
     org.apache.sis.metadata.iso.quality.AbstractPositionalAccuracyTest.class,
     org.apache.sis.metadata.iso.lineage.DefaultLineageTest.class,

Modified: sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/collection/CodeListSet.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/collection/CodeListSet.java?rev=1614513&r1=1614512&r2=1614513&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/collection/CodeListSet.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/collection/CodeListSet.java [UTF-8] Tue Jul 29 23:14:34 2014
@@ -71,6 +71,7 @@ public class CodeListSet<E extends CodeL
      * A pool of code list arrays. When many {@code CodeListSet} instances are for the
      * same code list type, this allows those instances to share the same arrays.
      */
+    @SuppressWarnings("rawtypes")
     private static final WeakHashSet<CodeList[]> POOL = new WeakHashSet<CodeList[]>(CodeList[].class);
 
     /**

Modified: sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/collection/TreeTableFormat.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/collection/TreeTableFormat.java?rev=1614513&r1=1614512&r2=1614513&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/collection/TreeTableFormat.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/collection/TreeTableFormat.java [UTF-8] Tue Jul 29 23:14:34 2014
@@ -28,7 +28,7 @@ import java.text.Format;
 import java.text.ParsePosition;
 import java.text.ParseException;
 import java.util.regex.Matcher;
-import org.opengis.util.CodeList;
+import org.opengis.util.Enumerated;
 import org.opengis.util.InternationalString;
 import org.apache.sis.io.LineAppender;
 import org.apache.sis.io.TableAppender;
@@ -342,6 +342,7 @@ public class TreeTableFormat extends Tab
      * @throws ParseException If an error occurred while parsing a node value.
      */
     @Override
+    @SuppressWarnings("null")
     public TreeTable parse(final CharSequence text, final ParsePosition pos) throws ParseException {
         final Matcher matcher   = getColumnSeparatorMatcher(text);
         final int length        = text.length();
@@ -630,8 +631,8 @@ public class TreeTableFormat extends Tab
                 text = ((InternationalString) value).toString(getDisplayLocale());
             } else if (value instanceof CharSequence) {
                 text = value.toString();
-            } else if (value instanceof CodeList<?>) {
-                text = Types.getCodeTitle((CodeList<?>) value).toString(getDisplayLocale());
+            } else if (value instanceof Enumerated) {
+                text = Types.getCodeTitle((Enumerated) value).toString(getDisplayLocale());
             } else if (value instanceof Enum<?>) {
                 text = CharSequences.upperCaseToSentence(((Enum<?>) value).name());
             } else {

Modified: sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/iso/AbstractName.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/iso/AbstractName.java?rev=1614513&r1=1614512&r2=1614513&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/iso/AbstractName.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/iso/AbstractName.java [UTF-8] Tue Jul 29 23:14:34 2014
@@ -61,7 +61,7 @@ import org.apache.sis.internal.jdk7.Obje
  *
  * @author  Martin Desruisseaux (IRD, Geomatys)
  * @since   0.3 (derived from geotk-2.1)
- * @version 0.3
+ * @version 0.5
  * @module
  */
 @XmlType(name = "GenericName") // Actually 'gml:CodeType', but the later is used elsewhere.
@@ -102,10 +102,10 @@ public abstract class AbstractName imple
      *
      * <ul>
      *   <li>If the given object is {@code null}, then this method returns {@code null}.</li>
-     *   <li>Otherwise if the given object is already an instance of {@code AbstractName},
-     *       then it is returned unchanged.</li>
      *   <li>Otherwise if the given object is an instance of {@link LocalName}, then this
      *       method delegates to {@link DefaultLocalName#castOrCopy(LocalName)}.</li>
+     *   <li>Otherwise if the given object is already an instance of {@code AbstractName},
+     *       then it is returned unchanged.</li>
      *   <li>Otherwise a new instance of an {@code AbstractName} subclass is created using the
      *       {@link DefaultNameFactory#createGenericName(NameSpace, CharSequence[])} method.</li>
      * </ul>
@@ -115,12 +115,12 @@ public abstract class AbstractName imple
      *         given object itself), or {@code null} if the argument was null.
      */
     public static AbstractName castOrCopy(final GenericName object) {
-        if (object == null || object instanceof AbstractName) {
-            return (AbstractName) object;
-        }
         if (object instanceof LocalName) {
             return DefaultLocalName.castOrCopy((LocalName) object);
         }
+        if (object == null || object instanceof AbstractName) {
+            return (AbstractName) object;
+        }
         /*
          * Recreates a new name for the given name in order to get
          * a SIS implementation from an arbitrary implementation.

Modified: sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultLocalName.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultLocalName.java?rev=1614513&r1=1614512&r2=1614513&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultLocalName.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultLocalName.java [UTF-8] Tue Jul 29 23:14:34 2014
@@ -31,7 +31,6 @@ import org.opengis.util.GenericName;
 import org.opengis.util.InternationalString;
 import org.apache.sis.xml.Namespaces;
 import org.apache.sis.util.ArgumentChecks;
-import org.apache.sis.internal.system.DefaultFactories;
 import org.apache.sis.internal.jaxb.gco.CharSequenceAdapter;
 
 // Branch-dependent imports
@@ -58,7 +57,7 @@ import org.apache.sis.internal.jdk7.Obje
  *
  * @author  Martin Desruisseaux (IRD, Geomatys)
  * @since   0.3 (derived from geotk-2.1)
- * @version 0.3
+ * @version 0.5
  * @module
  *
  * @see DefaultNameSpace
@@ -153,12 +152,12 @@ public class DefaultLocalName extends Ab
      *
      * <ul>
      *   <li>If the given object is {@code null}, then this method returns {@code null}.</li>
+     *   <li>Otherwise if the given object is an instance of {@link MemberName} or {@link TypeName},
+     *       then this method delegates to {@code castOrCopy(…)} method of the corresponding subclass.</li>
      *   <li>Otherwise if the given object is already an instance of {@code DefaultLocalName},
      *       then it is returned unchanged.</li>
-     *   <li>Otherwise a new {@code DefaultLocalName} instance is created using the
-     *       {@link DefaultNameFactory#createLocalName(NameSpace, CharSequence)} method,
-     *       or the {@code createTypeName} or {@code createMemberName} variants if the
-     *       given object implements the corresponding interface.</li>
+     *   <li>Otherwise a new {@code DefaultLocalName} instance is created
+     *       with the same values than the given name.</li>
      * </ul>
      *
      * @param  object The object to get as a SIS implementation, or {@code null} if none.
@@ -166,24 +165,22 @@ public class DefaultLocalName extends Ab
      *         given object itself), or {@code null} if the argument was null.
      */
     public static DefaultLocalName castOrCopy(final LocalName object) {
+        if (object instanceof MemberName) {
+            return DefaultMemberName.castOrCopy((MemberName) object);
+        }
+        if (object instanceof TypeName) {
+            return DefaultTypeName.castOrCopy((TypeName) object);
+        }
         if (object == null || object instanceof DefaultLocalName) {
             return (DefaultLocalName) object;
         }
         final NameSpace scope = object.scope();
         final InternationalString name = object.toInternationalString();
-        final LocalName result;
-        if (object instanceof MemberName) {
-            result = DefaultFactories.SIS_NAMES.createMemberName(scope, name, ((MemberName) object).getAttributeType());
-        } else if (object instanceof TypeName) {
-            result = DefaultFactories.SIS_NAMES.createTypeName(scope, name);
+        if (scope instanceof DefaultNameSpace) {
+            return ((DefaultNameSpace) scope).local(name, null); // May return a cached instance.
         } else {
-            result = DefaultFactories.SIS_NAMES.createLocalName(scope, name);
+            return new DefaultLocalName(scope, name);
         }
-        /*
-         * Following cast should be safe because the SIS_NAMES factory is fixed to a
-         * DefaultNameFactory instance, which is known to create AbstractName instances.
-         */
-        return (DefaultLocalName) result;
     }
 
     /**

Modified: sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultMemberName.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultMemberName.java?rev=1614513&r1=1614512&r2=1614513&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultMemberName.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultMemberName.java [UTF-8] Tue Jul 29 23:14:34 2014
@@ -86,6 +86,31 @@ public class DefaultMemberName extends D
     }
 
     /**
+     * Returns a SIS member name implementation with the values of the given arbitrary implementation.
+     * This method performs the first applicable action in the following choices:
+     *
+     * <ul>
+     *   <li>If the given object is {@code null}, then this method returns {@code null}.</li>
+     *   <li>Otherwise if the given object is already an instance of {@code DefaultMemberName},
+     *       then it is returned unchanged.</li>
+     *   <li>Otherwise a new {@code DefaultMemberName} instance is created
+     *       with the same values than the given name.</li>
+     * </ul>
+     *
+     * @param  object The object to get as a SIS implementation, or {@code null} if none.
+     * @return A SIS implementation containing the values of the given object (may be the
+     *         given object itself), or {@code null} if the argument was null.
+     *
+     * @since 0.5
+     */
+    public static DefaultMemberName castOrCopy(final MemberName object) {
+        if (object == null || object instanceof DefaultMemberName) {
+            return (DefaultMemberName) object;
+        }
+        return new DefaultMemberName(object.scope(), object.toInternationalString(), object.getAttributeType());
+    }
+
+    /**
      * Returns the type of the data associated with the record member.
      *
      * @return The type of the data associated with the record member.

Modified: sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultNameFactory.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultNameFactory.java?rev=1614513&r1=1614512&r2=1614513&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultNameFactory.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultNameFactory.java [UTF-8] Tue Jul 29 23:14:34 2014
@@ -229,6 +229,10 @@ public class DefaultNameFactory extends 
      */
     @Override
     public LocalName createLocalName(final NameSpace scope, final CharSequence name) {
+        /*
+         * Maintenance note: if the body of this method is modified (except for the use of the cache),
+         * consider updating DefaultLocalName.castOrCopy(LocalName) method accordingly.
+         */
         if (scope instanceof DefaultNameSpace) {
             // Following may return a cached instance.
             return ((DefaultNameSpace) scope).local(name, null);

Modified: sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultScopedName.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultScopedName.java?rev=1614513&r1=1614512&r2=1614513&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultScopedName.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultScopedName.java [UTF-8] Tue Jul 29 23:14:34 2014
@@ -19,8 +19,6 @@ package org.apache.sis.util.iso;
 import java.util.List;
 import java.util.Iterator;
 import java.util.ConcurrentModificationException;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
 import org.opengis.util.NameSpace;
 import org.opengis.util.LocalName;
 import org.opengis.util.ScopedName;
@@ -56,8 +54,7 @@ import org.apache.sis.internal.util.Unmo
  * @see DefaultNameSpace
  * @see DefaultLocalName
  */
-@XmlType(name = "ScopedName") // Actually 'gml:CodeType', but the later is used elsewhere.
-@XmlRootElement(name = "ScopedName")
+// No JAXB annotation, because we can't use @XmlValue in this class.
 public class DefaultScopedName extends AbstractName implements ScopedName {
     /**
      * Serial number for inter-operability with different versions.
@@ -90,14 +87,6 @@ public class DefaultScopedName extends A
     }
 
     /**
-     * Empty constructor to be used by JAXB only. Despite its "final" declaration,
-     * the {@link #parsedNames} field will be set by JAXB during unmarshalling.
-     */
-    private DefaultScopedName() {
-        parsedNames = null;
-    }
-
-    /**
      * Creates a new scoped names from the given list of local names. This constructor is
      * not public because it does not check if the given local names have the proper scope.
      *

Modified: sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultTypeName.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultTypeName.java?rev=1614513&r1=1614512&r2=1614513&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultTypeName.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultTypeName.java [UTF-8] Tue Jul 29 23:14:34 2014
@@ -37,7 +37,7 @@ import org.opengis.util.NameSpace;
  * @author  Guilhem Legal (Geomatys)
  * @author  Cédric Briançon (Geomatys)
  * @since   0.3 (derived from geotk-3.00)
- * @version 0.3
+ * @version 0.5
  * @module
  *
  * @see DefaultMemberName
@@ -68,4 +68,29 @@ public class DefaultTypeName extends Def
     protected DefaultTypeName(final NameSpace scope, final CharSequence name) {
         super(scope, name);
     }
+
+    /**
+     * Returns a SIS type name implementation with the values of the given arbitrary implementation.
+     * This method performs the first applicable action in the following choices:
+     *
+     * <ul>
+     *   <li>If the given object is {@code null}, then this method returns {@code null}.</li>
+     *   <li>Otherwise if the given object is already an instance of {@code DefaultTypeName},
+     *       then it is returned unchanged.</li>
+     *   <li>Otherwise a new {@code DefaultTypeName} instance is created
+     *       with the same values than the given name.</li>
+     * </ul>
+     *
+     * @param  object The object to get as a SIS implementation, or {@code null} if none.
+     * @return A SIS implementation containing the values of the given object (may be the
+     *         given object itself), or {@code null} if the argument was null.
+     *
+     * @since 0.5
+     */
+    public static DefaultTypeName castOrCopy(final TypeName object) {
+        if (object == null || object instanceof DefaultTypeName) {
+            return (DefaultTypeName) object;
+        }
+        return new DefaultTypeName(object.scope(), object.toInternationalString());
+    }
 }

Modified: sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/iso/Names.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/iso/Names.java?rev=1614513&r1=1614512&r2=1614513&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/iso/Names.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/iso/Names.java [UTF-8] Tue Jul 29 23:14:34 2014
@@ -94,7 +94,7 @@ public final class Names extends Static 
      * @return The namespace object.
      */
     private static NameSpace createNameSpace(final CharSequence namespace, final String separator) {
-        if (namespace == null) {
+        if (namespace == null || namespace.length() == 0) {
             return null;
         }
         return DefaultFactories.NAMES.createNameSpace(
@@ -103,6 +103,23 @@ public final class Names extends Static 
     }
 
     /**
+     * Creates a local or scoped name in the given namespace.
+     * The character sequences can be either {@link String} or {@link InternationalString} instances.
+     * The {@code namespace} character sequences is taken verbatim, while {@code scopedName} is parsed
+     * as described in {@linkplain DefaultNameFactory#createGenericName(NameSpace, CharSequence...) name factory}.
+     *
+     * @param  namespace  The namespace, or {@code null} for the global namespace.
+     * @param  separator  The separator between the namespace and the scoped name.
+     * @param  scopedName The name to parse.
+     * @return A local or scoped name in the given namespace.
+     */
+    public static GenericName parseGenericName(final CharSequence namespace, final String separator, final CharSequence scopedName) {
+        ensureNonNull("localPart", scopedName);
+        ensureNonNull("separator", separator);
+        return DefaultFactories.NAMES.parseGenericName(createNameSpace(namespace, separator), scopedName);
+    }
+
+    /**
      * Creates a name which is local in the given namespace.
      * The character sequences can be either {@link String} or {@link InternationalString} instances.
      * Those character sequences are taken verbatim; they are <em>not</em> parsed into their components.

Modified: sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/iso/Types.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/iso/Types.java?rev=1614513&r1=1614512&r2=1614513&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/iso/Types.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/iso/Types.java [UTF-8] Tue Jul 29 23:14:34 2014
@@ -33,6 +33,7 @@ import org.opengis.util.CodeList;
 import org.opengis.util.NameFactory;
 import org.opengis.util.GenericName;
 import org.opengis.util.InternationalString;
+import org.opengis.util.Enumerated;
 import org.opengis.metadata.Identifier;
 import org.apache.sis.util.Static;
 import org.apache.sis.util.Locales;
@@ -49,9 +50,9 @@ import org.apache.sis.internal.system.De
  * This class provides:
  *
  * <ul>
- *   <li>{@link #getStandardName(Class)}, {@link #getListName(CodeList)} and {@link #getCodeName(CodeList)}
+ *   <li>{@link #getStandardName(Class)}, {@link #getListName(Enumerated)} and {@link #getCodeName(Enumerated)}
  *       for fetching ISO names if possible.</li>
- *   <li>{@link #getCodeTitle(CodeList)}, {@link #getDescription(CodeList)} and
+ *   <li>{@link #getCodeTitle(Enumerated)}, {@link #getDescription(Enumerated)} and
  *       {@link #getDescription(Class)} for fetching human-readable descriptions.</li>
  *   <li>{@link #forStandardName(String)} and {@link #forCodeName(Class, String, boolean)} for
  *       fetching an instance from a name (converse of above {@code get} methods).</li>
@@ -126,14 +127,15 @@ public final class Types extends Static 
     }
 
     /**
-     * Returns the ISO classname (if available) or the Java classname (as a fallback)
-     * of the given code. This method uses the {@link UML} annotation if it exists, or
+     * Returns the ISO classname (if available) or the Java classname (as a fallback) of the given
+     * enumeration or code list value. This method uses the {@link UML} annotation if it exists, or
      * fallback on the {@linkplain Class#getSimpleName() simple class name} otherwise.
      *
      * <div class="note"><b>Examples:</b>
      * <ul>
-     *   <li>{@code getListName(AxisDirection.NORTH)} returns {@code "CS_AxisDirection"}.</li>
-     *   <li>{@code getListName(CharacterSet.UTF_8)} returns {@code "MD_CharacterSetCode"}.</li>
+     *   <li>{@code getListName(ParameterDirection.IN_OUT)}      returns {@code "SV_ParameterDirection"}.</li>
+     *   <li>{@code getListName(AxisDirection.NORTH)}            returns {@code "CS_AxisDirection"}.</li>
+     *   <li>{@code getListName(CharacterSet.UTF_8)}             returns {@code "MD_CharacterSetCode"}.</li>
      *   <li>{@code getListName(ImagingCondition.BLURRED_IMAGE)} returns {@code "MD_ImagingConditionCode"}.</li>
      * </ul>
      * </div>
@@ -141,23 +143,24 @@ public final class Types extends Static 
      * @param  code The code for which to get the class name, or {@code null}.
      * @return The ISO (preferred) or Java (fallback) class name, or {@code null} if the given code is null.
      */
-    public static String getListName(final CodeList<?> code) {
+    public static String getListName(final Enumerated code) {
         if (code == null) {
             return null;
         }
-        final Class<?> type = code.getClass();
+        final Class<?> type = (code instanceof Enum<?>) ? ((Enum<?>) code).getDeclaringClass() : code.getClass();
         final String id = getStandardName(type);
         return (id != null) ? id : type.getSimpleName();
     }
 
     /**
-     * Returns the ISO name (if available) or the Java name (as a fallback) of the given code.
-     * If the code has no {@link UML} identifier, then the programmatic name is used as a fallback.
+     * Returns the ISO name (if available) or the Java name (as a fallback) of the given enumeration or code list
+     * value. If the value has no {@link UML} identifier, then the programmatic name is used as a fallback.
      *
      * <div class="note"><b>Examples:</b>
      * <ul>
-     *   <li>{@code getCodeName(AxisDirection.NORTH)} returns {@code "north"}.</li>
-     *   <li>{@code getCodeName(CharacterSet.UTF_8)} returns {@code "utf8"}.</li>
+     *   <li>{@code getCodeName(ParameterDirection.IN_OUT)}      returns {@code "in/out"}.</li>
+     *   <li>{@code getCodeName(AxisDirection.NORTH)}            returns {@code "north"}.</li>
+     *   <li>{@code getCodeName(CharacterSet.UTF_8)}             returns {@code "utf8"}.</li>
      *   <li>{@code getCodeName(ImagingCondition.BLURRED_IMAGE)} returns {@code "blurredImage"}.</li>
      * </ul>
      * </div>
@@ -166,12 +169,12 @@ public final class Types extends Static 
      * @return The UML identifiers or programmatic name for the given code,
      *         or {@code null} if the given code is null.
      *
-     * @see #getCodeLabel(CodeList)
-     * @see #getCodeTitle(CodeList)
-     * @see #getDescription(CodeList)
+     * @see #getCodeLabel(Enumerated)
+     * @see #getCodeTitle(Enumerated)
+     * @see #getDescription(Enumerated)
      * @see #forCodeName(Class, String, boolean)
      */
-    public static String getCodeName(final CodeList<?> code) {
+    public static String getCodeName(final Enumerated code) {
         if (code == null) {
             return null;
         }
@@ -180,10 +183,10 @@ public final class Types extends Static 
     }
 
     /**
-     * Returns a unlocalized title for the given code.
+     * Returns a unlocalized title for the given enumeration or code list value.
      * This method builds a title using heuristics rules, which should give reasonable
      * results without the need of resource bundles. For better results, consider using
-     * {@link #getCodeTitle(CodeList)} instead.
+     * {@link #getCodeTitle(Enumerated)} instead.
      *
      * <p>The current heuristic implementation iterates over {@linkplain CodeList#names() all code names},
      * selects the longest one excluding the {@linkplain CodeList#name() field name} if possible, then
@@ -200,11 +203,11 @@ public final class Types extends Static 
      * @param  code The code from which to get a title, or {@code null}.
      * @return A unlocalized title for the given code, or {@code null} if the given code is null.
      *
-     * @see #getCodeName(CodeList)
-     * @see #getCodeTitle(CodeList)
-     * @see #getDescription(CodeList)
+     * @see #getCodeName(Enumerated)
+     * @see #getCodeTitle(Enumerated)
+     * @see #getDescription(Enumerated)
      */
-    public static String getCodeLabel(final CodeList<?> code) {
+    public static String getCodeLabel(final Enumerated code) {
         if (code == null) {
             return null;
         }
@@ -222,30 +225,30 @@ public final class Types extends Static 
     }
 
     /**
-     * Returns the title of the given code. Title are usually much shorter than descriptions.
-     * English titles are often the same than the {@linkplain #getCodeLabel(CodeList) code labels}.
+     * Returns the title of the given enumeration or code list value. Title are usually much shorter than descriptions.
+     * English titles are often the same than the {@linkplain #getCodeLabel(Enumerated) code labels}.
      *
      * @param  code The code for which to get the title, or {@code null}.
      * @return The title, or {@code null} if the given code is null.
      *
-     * @see #getDescription(CodeList)
+     * @see #getDescription(Enumerated)
      */
-    public static InternationalString getCodeTitle(final CodeList<?> code) {
+    public static InternationalString getCodeTitle(final Enumerated code) {
         return (code != null) ? new CodeTitle(code) : null;
     }
 
     /**
-     * Returns the description of the given code, or {@code null} if none.
+     * Returns the description of the given enumeration or code list value, or {@code null} if none.
      * For a description of the code list as a whole instead than a particular code,
      * see {@link Types#getDescription(Class)}.
      *
      * @param  code The code for which to get the localized description, or {@code null}.
      * @return The description, or {@code null} if none or if the given code is null.
      *
-     * @see #getCodeTitle(CodeList)
-     * @see #getDescription(Class)
+     * @see #getCodeTitle(Enumerated)
+     * @see #getDescription(Enumerated)
      */
-    public static InternationalString getDescription(final CodeList<?> code) {
+    public static InternationalString getDescription(final Enumerated code) {
         if (code != null) {
             final String resources = getResources(code.getClass().getName());
             if (resources != null) {
@@ -262,7 +265,7 @@ public final class Types extends Static 
      * @param  type The GeoAPI interface or code list from which to get the description, or {@code null}.
      * @return The description, or {@code null} if none or if the given type is {@code null}.
      *
-     * @see #getDescription(CodeList)
+     * @see #getDescription(Enumerated)
      */
     public static InternationalString getDescription(final Class<?> type) {
         final String name = getStandardName(type);
@@ -380,14 +383,14 @@ public final class Types extends Static 
         /**
          * The code list for which to create a title.
          */
-        private final CodeList<?> code;
+        private final Enumerated code;
 
         /**
          * Creates a new international string for the given code list element.
          *
          * @param code The code list for which to create a title.
          */
-        CodeTitle(final CodeList<?> code) {
+        CodeTitle(final Enumerated code) {
             super("org.opengis.metadata.CodeLists", resourceKey(code));
             this.code = code;
         }
@@ -419,7 +422,7 @@ public final class Types extends Static 
     /**
      * Returns the resource key for the given code list.
      */
-    static String resourceKey(final CodeList<?> code) {
+    static String resourceKey(final Enumerated code) {
         String key = getCodeName(code);
         if (key.indexOf(SEPARATOR) < 0) {
             key = getListName(code) + SEPARATOR + key;

Modified: sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/resources/IndexedResourceBundle.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/resources/IndexedResourceBundle.java?rev=1614513&r1=1614512&r2=1614513&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/resources/IndexedResourceBundle.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/resources/IndexedResourceBundle.java [UTF-8] Tue Jul 29 23:14:34 2014
@@ -30,6 +30,7 @@ import java.util.ResourceBundle;
 import java.util.logging.Level;
 import java.util.logging.LogRecord;
 import org.opengis.util.CodeList;
+import org.opengis.util.Enumerated;
 import org.opengis.util.InternationalString;
 import org.apache.sis.util.Debug;
 import org.apache.sis.util.Classes;
@@ -408,8 +409,8 @@ public class IndexedResourceBundle exten
                 replacement = message;
             } else if (element instanceof Class<?>) {
                 replacement = Classes.getShortName((Class<?>) element);
-            } else if (element instanceof CodeList<?>) {
-                replacement = Types.getCodeTitle((CodeList<?>) element).toString(getLocale());
+            } else if (element instanceof Enumerated) {
+                replacement = Types.getCodeTitle((Enumerated) element).toString(getLocale());
             }
             // No need to check for Numbers or Dates instances, since they are
             // properly formatted in the ResourceBundle locale by MessageFormat.

Modified: sis/branches/JDK6/core/sis-utility/src/test/java/org/apache/sis/test/AnnotationsTestCase.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-utility/src/test/java/org/apache/sis/test/AnnotationsTestCase.java?rev=1614513&r1=1614512&r2=1614513&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-utility/src/test/java/org/apache/sis/test/AnnotationsTestCase.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-utility/src/test/java/org/apache/sis/test/AnnotationsTestCase.java [UTF-8] Tue Jul 29 23:14:34 2014
@@ -231,6 +231,16 @@ public abstract strictfp class Annotatio
     }
 
     /**
+     * Returns the name of the XML element for the given UML element.
+     *
+     * @param  uml The UML element.
+     * @return The corresponding XML element name.
+     */
+    protected String getExpectedName(final UML uml) {
+        return uml.identifier();
+    }
+
+    /**
      * Replaces {@value #DEFAULT} value by the {@link XmlSchema} namespace if needed,
      * then performs validity check on the resulting namespace. This method checks that:
      *
@@ -542,7 +552,7 @@ public abstract strictfp class Annotatio
                  * is because subclasses may choose to override the above test method.
                  */
                 if (uml != null) {
-                    assertEquals("Wrong @XmlElement.name().", uml.identifier(), element.name());
+                    assertEquals("Wrong @XmlElement.name().", getExpectedName(uml), element.name());
                     assertEquals("Wrong @XmlElement.required().", uml.obligation() == Obligation.MANDATORY, element.required());
                 }
                 /*

Modified: sis/branches/JDK6/core/sis-utility/src/test/java/org/apache/sis/util/iso/TypesTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-utility/src/test/java/org/apache/sis/util/iso/TypesTest.java?rev=1614513&r1=1614512&r2=1614513&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-utility/src/test/java/org/apache/sis/util/iso/TypesTest.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-utility/src/test/java/org/apache/sis/util/iso/TypesTest.java [UTF-8] Tue Jul 29 23:14:34 2014
@@ -27,6 +27,7 @@ import org.opengis.metadata.citation.Cit
 import org.opengis.metadata.citation.OnLineFunction;
 import org.opengis.metadata.content.ImagingCondition;
 import org.opengis.metadata.identification.CharacterSet;
+import org.opengis.metadata.service.ParameterDirection;
 import org.opengis.referencing.datum.Datum;
 import org.opengis.referencing.cs.AxisDirection;
 import org.apache.sis.test.TestCase;
@@ -40,7 +41,7 @@ import static org.opengis.test.Assert.*;
  *
  * @author  Martin Desruisseaux (IRD, Geomatys)
  * @since   0.3 (derived from geotk-2.1)
- * @version 0.4
+ * @version 0.5
  * @module
  */
 public final strictfp class TypesTest extends TestCase {
@@ -151,7 +152,7 @@ public final strictfp class TypesTest ex
     }
 
     /**
-     * Tests the {@link Types#getDescription(CodeList)} method.
+     * Tests the {@link Types#getDescription(Enumerated)} method.
      */
     @Test
     public void testGetCodeDescription() {
@@ -165,27 +166,29 @@ public final strictfp class TypesTest ex
     }
 
     /**
-     * Tests the examples given in {@link Types#getListName(CodeList)} javadoc.
+     * Tests the examples given in {@link Types#getListName(Enumerated)} javadoc.
      */
     @Test
     public void testGetListName() {
-        assertEquals("CS_AxisDirection",        Types.getListName(AxisDirection   .NORTH));
-        assertEquals("MD_CharacterSetCode",     Types.getListName(CharacterSet    .UTF_8));
-        assertEquals("MD_ImagingConditionCode", Types.getListName(ImagingCondition.BLURRED_IMAGE));
+        assertEquals("SV_ParameterDirection",   Types.getListName(ParameterDirection.IN_OUT));
+        assertEquals("CS_AxisDirection",        Types.getListName(AxisDirection     .NORTH));
+        assertEquals("MD_CharacterSetCode",     Types.getListName(CharacterSet      .UTF_8));
+        assertEquals("MD_ImagingConditionCode", Types.getListName(ImagingCondition  .BLURRED_IMAGE));
     }
 
     /**
-     * Tests the examples given in {@link Types#getCodeName(CodeList)} javadoc.
+     * Tests the examples given in {@link Types#getCodeName(Enumerated)} javadoc.
      */
     @Test
     public void testGetCodeName() {
-        assertEquals("north",        Types.getCodeName(AxisDirection   .NORTH));
-        assertEquals("utf8",         Types.getCodeName(CharacterSet    .UTF_8));
-        assertEquals("blurredImage", Types.getCodeName(ImagingCondition.BLURRED_IMAGE));
+        assertEquals("in/out",       Types.getCodeName(ParameterDirection.IN_OUT));
+        assertEquals("north",        Types.getCodeName(AxisDirection     .NORTH));
+        assertEquals("utf8",         Types.getCodeName(CharacterSet      .UTF_8));
+        assertEquals("blurredImage", Types.getCodeName(ImagingCondition  .BLURRED_IMAGE));
     }
 
     /**
-     * Tests the examples given in {@link Types#getCodeLabel(CodeList)} javadoc.
+     * Tests the examples given in {@link Types#getCodeLabel(Enumerated)} javadoc.
      */
     @Test
     public void testGetCodeLabel() {
@@ -195,7 +198,7 @@ public final strictfp class TypesTest ex
     }
 
     /**
-     * Tests {@link Types#getCodeTitle(CodeList)}.
+     * Tests {@link Types#getCodeTitle(Enumerated)}.
      */
     @Test
     public void testGetCodeTitle() {



Mime
View raw message