sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1610639 - in /sis/branches/JDK8/core/sis-metadata/src: main/java/org/apache/sis/internal/jaxb/code/ main/java/org/apache/sis/metadata/iso/identification/ main/java/org/apache/sis/metadata/iso/service/ test/java/org/apache/sis/metadata/iso/
Date Tue, 15 Jul 2014 10:48:06 GMT
Author: desruisseaux
Date: Tue Jul 15 10:48:05 2014
New Revision: 1610639

URL: http://svn.apache.org/r1610639
Log:
Added ServiceIdentification implementation.

Added:
    sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/SV_CouplingType.java
      - copied, changed from r1610550, sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/CI_RoleCode.java
    sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/service/DefaultServiceIdentification.java
      - copied, changed from r1610550, sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultServiceIdentification.java
Modified:
    sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/AbstractIdentification.java
    sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultServiceIdentification.java
    sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/service/DefaultCoupledResource.java
    sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/service/DefaultOperationChainMetadata.java
    sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/service/DefaultOperationMetadata.java
    sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/service/DefaultParameter.java
    sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/service/package-info.java
    sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/AllMetadataTest.java

Copied: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/SV_CouplingType.java
(from r1610550, sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/CI_RoleCode.java)
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/SV_CouplingType.java?p2=sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/SV_CouplingType.java&p1=sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/CI_RoleCode.java&r1=1610550&r2=1610639&rev=1610639&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/CI_RoleCode.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/SV_CouplingType.java
[UTF-8] Tue Jul 15 10:48:05 2014
@@ -17,32 +17,32 @@
 package org.apache.sis.internal.jaxb.code;
 
 import javax.xml.bind.annotation.XmlElement;
-import org.opengis.metadata.citation.Role;
+import org.opengis.metadata.service.CouplingType;
 import org.apache.sis.internal.jaxb.gmd.CodeListAdapter;
 import org.apache.sis.internal.jaxb.gmd.CodeListProxy;
 
 
 /**
- * JAXB adapter for {@link Role}, in order to integrate the value in an element respecting
+ * JAXB adapter for {@link CouplingType}, in order to integrate the value in an element respecting
  * the ISO-19139 standard. See package documentation for more information about the handling
  * of {@code CodeList} in ISO-19139.
  *
- * @author  Cédric Briançon (Geomatys)
- * @since   0.3 (derived from geotk-2.5)
- * @version 0.3
+ * @author  Martin Desruisseaux (Geomatys)
+ * @since   0.5
+ * @version 0.5
  * @module
  */
-public final class CI_RoleCode extends CodeListAdapter<CI_RoleCode, Role> {
+public final class SV_CouplingType extends CodeListAdapter<SV_CouplingType, CouplingType>
{
     /**
      * Empty constructor for JAXB only.
      */
-    public CI_RoleCode() {
+    public SV_CouplingType() {
     }
 
     /**
      * Creates a new adapter for the given proxy.
      */
-    private CI_RoleCode(final CodeListProxy proxy) {
+    private SV_CouplingType(final CodeListProxy proxy) {
         super(proxy);
     }
 
@@ -50,16 +50,16 @@ public final class CI_RoleCode extends C
      * {@inheritDoc}
      */
     @Override
-    protected CI_RoleCode wrap(CodeListProxy proxy) {
-        return new CI_RoleCode(proxy);
+    protected SV_CouplingType wrap(CodeListProxy proxy) {
+        return new SV_CouplingType(proxy);
     }
 
     /**
      * {@inheritDoc}
      */
     @Override
-    protected Class<Role> getCodeListClass() {
-        return Role.class;
+    protected Class<CouplingType> getCodeListClass() {
+        return CouplingType.class;
     }
 
     /**
@@ -68,7 +68,7 @@ public final class CI_RoleCode extends C
      * @return The value to be marshalled.
      */
     @Override
-    @XmlElement(name = "CI_RoleCode")
+    @XmlElement(name = "SV_CouplingType")
     public CodeListProxy getElement() {
         return proxy;
     }

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/AbstractIdentification.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/AbstractIdentification.java?rev=1610639&r1=1610638&r2=1610639&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/AbstractIdentification.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/AbstractIdentification.java
[UTF-8] Tue Jul 15 10:48:05 2014
@@ -28,13 +28,14 @@ import org.opengis.metadata.distribution
 import org.opengis.metadata.identification.AggregateInformation;
 import org.opengis.metadata.identification.Identification;
 import org.opengis.metadata.identification.DataIdentification;
-import org.opengis.metadata.identification.ServiceIdentification;
 import org.opengis.metadata.identification.BrowseGraphic;
 import org.opengis.metadata.identification.Keywords;
 import org.opengis.metadata.identification.Progress;
 import org.opengis.metadata.identification.Usage;
+import org.opengis.metadata.service.ServiceIdentification;
 import org.opengis.metadata.maintenance.MaintenanceInformation;
 import org.opengis.util.InternationalString;
+import org.apache.sis.metadata.iso.service.DefaultServiceIdentification;
 import org.apache.sis.metadata.iso.ISOMetadata;
 import org.apache.sis.util.iso.Types;
 
@@ -46,7 +47,7 @@ import org.apache.sis.util.iso.Types;
  * @author  Touraïvane (IRD)
  * @author  Cédric Briançon (Geomatys)
  * @since   0.3 (derived from geotk-2.1)
- * @version 0.3
+ * @version 0.5
  * @module
  */
 @XmlType(name = "AbstractMD_Identification_Type", propOrder = {

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultServiceIdentification.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultServiceIdentification.java?rev=1610639&r1=1610638&r2=1610639&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultServiceIdentification.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultServiceIdentification.java
[UTF-8] Tue Jul 15 10:48:05 2014
@@ -16,10 +16,8 @@
  */
 package org.apache.sis.metadata.iso.identification;
 
-import javax.xml.bind.annotation.XmlType;
-import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlTransient;
 import org.opengis.metadata.identification.ServiceIdentification;
-import org.apache.sis.xml.Namespaces;
 
 
 /**
@@ -30,12 +28,14 @@ import org.apache.sis.xml.Namespaces;
  * @author  Touraïvane (IRD)
  * @author  Cédric Briançon (Geomatys)
  * @since   0.3 (derived from geotk-2.1)
- * @version 0.3
+ * @version 0.5
  * @module
+ *
+ * @deprecated Moved to the {@link org.apache.sis.metadata.iso.service} package.
  */
-@XmlType(name = "MD_ServiceIdentification_Type")
-@XmlRootElement(name = "SV_ServiceIdentification", namespace = Namespaces.SRV) // Prefix
is really SV_ according ISO 19115 corrigendum.
-public class DefaultServiceIdentification extends AbstractIdentification implements ServiceIdentification
{
+@Deprecated
+@XmlTransient
+public class DefaultServiceIdentification extends org.apache.sis.metadata.iso.service.DefaultServiceIdentification
implements ServiceIdentification {
     /**
      * Serial number for compatibility with different versions.
      */

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/service/DefaultCoupledResource.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/service/DefaultCoupledResource.java?rev=1610639&r1=1610638&r2=1610639&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/service/DefaultCoupledResource.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/service/DefaultCoupledResource.java
[UTF-8] Tue Jul 15 10:48:05 2014
@@ -39,8 +39,8 @@ import org.apache.sis.metadata.iso.ISOMe
  */
 @XmlType(name = "SV_CoupledResource_Type", propOrder = {
     "scopedName",
-    "resourceReference",
-    "resource",
+    "resourceReferences",
+    "resources",
     "operation"
 })
 @XmlRootElement(name = "SV_CoupledResource")

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/service/DefaultOperationChainMetadata.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/service/DefaultOperationChainMetadata.java?rev=1610639&r1=1610638&r2=1610639&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/service/DefaultOperationChainMetadata.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/service/DefaultOperationChainMetadata.java
[UTF-8] Tue Jul 15 10:48:05 2014
@@ -38,7 +38,7 @@ import org.apache.sis.metadata.iso.ISOMe
 @XmlType(name = "SV_OperationChainMetadata_Type", propOrder = {
     "name",
     "description",
-    "operation"
+    "operations"
 })
 @XmlRootElement(name = "SV_OperationChainMetadata")
 public class DefaultOperationChainMetadata extends ISOMetadata implements OperationChainMetadata
{

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/service/DefaultOperationMetadata.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/service/DefaultOperationMetadata.java?rev=1610639&r1=1610638&r2=1610639&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/service/DefaultOperationMetadata.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/service/DefaultOperationMetadata.java
[UTF-8] Tue Jul 15 10:48:05 2014
@@ -41,12 +41,12 @@ import org.opengis.metadata.service.Para
  */
 @XmlType(name = "SV_OperationMetadata_Type", propOrder = {
     "operationName",
-    "distributedComputingPlatform",
-    "description",
-    "optionality",
-    "repeatibility",
-    "optionality",
-    "repeatibility"
+    "distributedComputingPlatforms",
+    "operationDescription",
+    "invocationName",
+    "connectPoints",
+    "parameters",
+    "dependsOn"
 })
 @XmlRootElement(name = "SV_OperationMetadata")
 public class DefaultOperationMetadata extends ISOMetadata implements OperationMetadata {

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/service/DefaultParameter.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/service/DefaultParameter.java?rev=1610639&r1=1610638&r2=1610639&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/service/DefaultParameter.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/service/DefaultParameter.java
[UTF-8] Tue Jul 15 10:48:05 2014
@@ -42,7 +42,7 @@ import org.apache.sis.metadata.iso.ISOMe
     "direction",
     "description",
     "optionality",
-    "repeatibility"
+    "repeatability"
 })
 @XmlRootElement(name = "SV_Parameter")
 public class DefaultParameter extends ISOMetadata implements Parameter {

Copied: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/service/DefaultServiceIdentification.java
(from r1610550, sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultServiceIdentification.java)
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/service/DefaultServiceIdentification.java?p2=sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/service/DefaultServiceIdentification.java&p1=sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultServiceIdentification.java&r1=1610550&r2=1610639&rev=1610639&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultServiceIdentification.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/service/DefaultServiceIdentification.java
[UTF-8] Tue Jul 15 10:48:05 2014
@@ -14,12 +14,22 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.sis.metadata.iso.identification;
+package org.apache.sis.metadata.iso.service;
 
+import java.util.Collection;
+import javax.xml.bind.annotation.XmlElement;
 import javax.xml.bind.annotation.XmlType;
 import javax.xml.bind.annotation.XmlRootElement;
-import org.opengis.metadata.identification.ServiceIdentification;
-import org.apache.sis.xml.Namespaces;
+import org.opengis.util.GenericName;
+import org.opengis.metadata.citation.Citation;
+import org.opengis.metadata.identification.DataIdentification;
+import org.opengis.metadata.distribution.StandardOrderProcess;
+import org.opengis.metadata.service.ServiceIdentification;
+import org.opengis.metadata.service.CoupledResource;
+import org.opengis.metadata.service.CouplingType;
+import org.opengis.metadata.service.OperationChainMetadata;
+import org.opengis.metadata.service.OperationMetadata;
+import org.apache.sis.metadata.iso.identification.AbstractIdentification;
 
 
 /**
@@ -29,17 +39,85 @@ import org.apache.sis.xml.Namespaces;
  * @author  Martin Desruisseaux (IRD, Geomatys)
  * @author  Touraïvane (IRD)
  * @author  Cédric Briançon (Geomatys)
- * @since   0.3 (derived from geotk-2.1)
- * @version 0.3
+ * @author  Rémi Maréchal (Geomatys)
+ * @since   0.5
+ * @version 0.5
  * @module
  */
-@XmlType(name = "MD_ServiceIdentification_Type")
-@XmlRootElement(name = "SV_ServiceIdentification", namespace = Namespaces.SRV) // Prefix
is really SV_ according ISO 19115 corrigendum.
+@XmlType(name = "MD_ServiceIdentification_Type", propOrder = { // ISO 19139 still use the
old prefix.
+    "serviceType",
+    "serviceTypeVersions",
+    "accessProperties",
+    "couplingType",
+    "coupledResources",
+    "operatedDatasets",
+    "profiles",
+    "serviceStandards",
+    "containsOperations",
+    "operatesOn",
+    "containsChain"
+})
+@XmlRootElement(name = "SV_ServiceIdentification")
 public class DefaultServiceIdentification extends AbstractIdentification implements ServiceIdentification
{
     /**
      * Serial number for compatibility with different versions.
      */
-    private static final long serialVersionUID = 4988429302218128178L;
+    private static final long serialVersionUID = 7700836694236616300L;
+
+    /**
+     * A service type name.
+     */
+    private GenericName serviceType;
+
+    /**
+     * The version of the service, supports searching based on the version of serviceType.
+     */
+    private Collection<String> serviceTypeVersions;
+
+    /**
+     * Information about the availability of the service.
+     */
+    private StandardOrderProcess accessProperties;
+
+    /**
+     * Type of coupling between service and associated data (if exist).
+     */
+    private CouplingType couplingType;
+
+    /**
+     * Further description of the data coupling in the case of tightly coupled services.
+     */
+    private Collection<CoupledResource> coupledResources;
+
+    /**
+     * References to the resource on which the service operates.
+     */
+    private Collection<Citation> operatedDatasets;
+
+    /**
+     * Profiles to which the service adheres.
+     */
+    private Collection<Citation> profiles;
+
+    /**
+     * Standards to which the service adheres.
+     */
+    private Collection<Citation> serviceStandards;
+
+    /**
+     * Information about the operations that comprise the service.
+     */
+    private Collection<OperationMetadata> containsOperations;
+
+    /**
+     * Information on the resources that the service operates on.
+     */
+    private Collection<DataIdentification> operatesOn;
+
+    /**
+     * Information about the chain applied by the service.
+     */
+    private Collection<OperationChainMetadata> containsChain;
 
     /**
      * Constructs an initially empty service identification.
@@ -48,6 +126,21 @@ public class DefaultServiceIdentificatio
     }
 
     /**
+     * Constructs a service identification initialized to the specified values.
+     *
+     * @param serviceType Service type name.
+     * @param citation    Citation data for the resource(s).
+     * @param abstracts   Brief narrative summary of the content of the resource(s).
+     */
+    public DefaultServiceIdentification(final GenericName  serviceType,
+                                        final Citation     citation,
+                                        final CharSequence abstracts)
+    {
+        super(citation, abstracts);
+        this.serviceType = serviceType;
+    }
+
+    /**
      * Constructs a new instance initialized with the values from the specified metadata
object.
      * This is a <cite>shallow</cite> copy constructor, since the other metadata
contained in the
      * given object are not recursively copied.
@@ -58,6 +151,19 @@ public class DefaultServiceIdentificatio
      */
     public DefaultServiceIdentification(final ServiceIdentification object) {
         super(object);
+        if (object != null) {
+            serviceType         = object.getServiceType();
+            serviceTypeVersions = copyCollection(object.getServiceTypeVersions(), String.class);
+            accessProperties    = object.getAccessProperties();
+            couplingType        = object.getCouplingType();
+            coupledResources    = copyCollection(object.getCoupledResources(), CoupledResource.class);
+            operatedDatasets    = copyCollection(object.getOperatedDatasets(), Citation.class);
+            profiles            = copyCollection(object.getProfiles(), Citation.class);
+            serviceStandards    = copyCollection(object.getServiceStandards(), Citation.class);
+            containsOperations  = copyCollection(object.getContainsOperations(), OperationMetadata.class);
+            operatesOn          = copyCollection(object.getOperatesOn(), DataIdentification.class);
+            containsChain       = copyCollection(object.getContainsChain(), OperationChainMetadata.class);
+        }
     }
 
     /**
@@ -84,4 +190,230 @@ public class DefaultServiceIdentificatio
         }
         return new DefaultServiceIdentification(object);
     }
+
+    /**
+     * Returns a service type name.
+     *
+     * <div class="note"><b>Examples:</b> "discovery", "view", "download",
"transformation", or "invoke"</div>
+     *
+     * @return A service type name.
+     */
+    @Override
+    @XmlElement(name = "serviceType", required = true)
+    public GenericName getServiceType() {
+        return serviceType;
+    }
+
+    /**
+     * Sets the service type name.
+     *
+     * @param newValue The new service type name.
+     */
+    public void setServiceType(final GenericName newValue) {
+        checkWritePermission();
+        serviceType = newValue;
+    }
+
+    /**
+     * Returns the versions of the service.
+     *
+     * @return The versions of the service.
+     */
+    @Override
+    @XmlElement(name = "serviceTypeVersion")
+    public Collection<String> getServiceTypeVersions() {
+        return serviceTypeVersions = nonNullCollection(serviceTypeVersions, String.class);
+    }
+
+    /**
+     * Sets the versions of the service.
+     *
+     * @param newValues The new versions of the service.
+     */
+    public void setServiceTypeVersions(final Collection<? extends String> newValues)
{
+        serviceTypeVersions = writeCollection(newValues, serviceTypeVersions, String.class);
+    }
+
+    /**
+     * Returns information about the availability of the service.
+     *
+     * @return Information about the availability of the service, or {@code null} if none.
+     */
+    @Override
+    @XmlElement(name = "accessProperties")
+    public StandardOrderProcess getAccessProperties() {
+        return accessProperties;
+
+    }
+
+    /**
+     * Sets information about the availability of the service.
+     *
+     * @param newValue The new information about the availability of the service.
+     */
+    public void setAccessProperties(final StandardOrderProcess newValue) {
+        checkWritePermission();
+        accessProperties = newValue;
+    }
+
+    /**
+     * Returns type of coupling between service and associated data (if exist).
+     *
+     * @return Type of coupling between service and associated data, or {@code null} if none.
+     */
+    @Override
+    @XmlElement(name = "couplingType")
+    public CouplingType getCouplingType() {
+        return couplingType;
+    }
+
+    /**
+     * Sets the type of coupling between service and associated data.
+     *
+     * @param newValue The new type of coupling between service and associated data.
+     */
+    public void setCouplingType(final CouplingType newValue) {
+        checkWritePermission();
+        couplingType = newValue;
+    }
+
+    /**
+     * Returns further description(s) of the data coupling in the case of tightly coupled
services.
+     *
+     * @return Further description(s) of the data coupling in the case of tightly coupled
services.
+     */
+    @Override
+    @XmlElement(name = "coupledResource")
+    public Collection<CoupledResource> getCoupledResources() {
+        return coupledResources = nonNullCollection(coupledResources, CoupledResource.class);
+    }
+
+    /**
+     * Sets further description(s) of the data coupling in the case of tightly coupled services.
+     *
+     * @param newValues The new further description(s) of the data coupling.
+     */
+    public void setCoupledResources(final Collection<? extends CoupledResource> newValues)
{
+        coupledResources = writeCollection(newValues, coupledResources, CoupledResource.class);
+    }
+
+    /**
+     * Returns the reference(s) to the resource on which the service operates.
+     *
+     * @return Reference(s) to the resource on which the service operates.
+     */
+    @Override
+    @XmlElement(name = "operatedDataset")
+    public Collection<Citation> getOperatedDatasets() {
+        return operatedDatasets = nonNullCollection(operatedDatasets, Citation.class);
+    }
+
+    /**
+     * Sets the reference(s) to the resource on which the service operates.
+     *
+     * @param newValues The new reference(s) to the resource on which the service operates.
+     */
+    public void setOperatedDatasets(final Collection<? extends Citation> newValues)
{
+        operatedDatasets = writeCollection(newValues, operatedDatasets, Citation.class);
+    }
+
+    /**
+     * Returns the profile(s) to which the service adheres.
+     *
+     * @return Profile(s) to which the service adheres.
+     */
+    @Override
+    @XmlElement(name = "profile")
+    public Collection<Citation> getProfiles() {
+        return profiles = nonNullCollection(profiles, Citation.class);
+    }
+
+    /**
+     * Sets the profile(s) to which the service adheres.
+     *
+     * @param newValues The new profile(s) to which the service adheres.
+     */
+    public void setProfiles(final Collection<? extends Citation> newValues) {
+        profiles = writeCollection(newValues, profiles, Citation.class);
+    }
+
+    /**
+     * Returns the standard(s) to which the service adheres.
+     *
+     * @return Standard(s) to which the service adheres.
+     */
+    @Override
+    @XmlElement(name = "serviceStandard")
+    public Collection<Citation> getServiceStandards() {
+        return serviceStandards = nonNullCollection(serviceStandards, Citation.class);
+    }
+
+    /**
+     * Sets the standard(s) to which the service adheres.
+     *
+     * @param newValues The new standard(s) to which the service adheres.
+     */
+    public void setServiceStandards(final Collection<? extends Citation> newValues)
{
+        serviceStandards = writeCollection(newValues, serviceStandards, Citation.class);
+    }
+
+    /**
+     * Provides information about the operations that comprise the service.
+     *
+     * @return Information about the operations that comprise the service.
+     */
+    @Override
+    @XmlElement(name = "containsOperations")
+    public Collection<OperationMetadata> getContainsOperations() {
+        return containsOperations = nonNullCollection(containsOperations, OperationMetadata.class);
+    }
+
+    /**
+     * Sets information(s) about the operations that comprise the service.
+     *
+     * @param newValues The new information(s) about the operations that comprise the service.
+     */
+    public void setContainsOperations(final Collection<? extends OperationMetadata>
newValues) {
+        containsOperations = writeCollection(newValues, containsOperations, OperationMetadata.class);
+    }
+
+    /**
+     * Provides information on the resources that the service operates on.
+     *
+     * @return Information on the resources that the service operates on.
+     */
+    @Override
+    @XmlElement(name = "operatesOn")
+    public Collection<DataIdentification> getOperatesOn() {
+        return operatesOn = nonNullCollection(operatesOn, DataIdentification.class);
+    }
+
+    /**
+     * Sets the information on the resources that the service operates on.
+     *
+     * @param newValues The new information on the resources that the service operates on.
+     */
+    public void setOperatesOn(final Collection<? extends DataIdentification> newValues)
{
+        operatesOn = writeCollection(newValues, operatesOn, DataIdentification.class);
+    }
+
+    /**
+     * Provides information about the chain applied by the service.
+     *
+     * @return Information about the chain applied by the service.
+     */
+    @Override
+    @XmlElement(name = "containsChain")
+    public Collection<OperationChainMetadata> getContainsChain() {
+        return containsChain = nonNullCollection(containsChain, OperationChainMetadata.class);
+    }
+
+    /**
+     * Sets the information about the chain applied by the service.
+     *
+     * @param newValues The new information about the chain applied by the service.
+     */
+    public void setContainsChain(final Collection<? extends OperationChainMetadata>
 newValues) {
+        containsChain = writeCollection(newValues, containsChain, OperationChainMetadata.class);
+    }
 }

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/service/package-info.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/service/package-info.java?rev=1610639&r1=1610638&r2=1610639&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/service/package-info.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/service/package-info.java
[UTF-8] Tue Jul 15 10:48:05 2014
@@ -50,6 +50,22 @@
     @XmlNs(prefix = "xsi", namespaceURI = Namespaces.XSI)
 })
 @XmlAccessorType(XmlAccessType.NONE)
+@XmlJavaTypeAdapters({
+    @XmlJavaTypeAdapter(CI_Citation.class),
+    @XmlJavaTypeAdapter(CI_OnlineResource.class),
+    @XmlJavaTypeAdapter(MD_DataIdentification.class),
+    @XmlJavaTypeAdapter(MD_StandardOrderProcess.class),
+    @XmlJavaTypeAdapter(SV_CoupledResource.class),
+    @XmlJavaTypeAdapter(SV_CouplingType.class),
+    @XmlJavaTypeAdapter(SV_OperationMetadata.class),
+    @XmlJavaTypeAdapter(SV_OperationChainMetadata.class),
+    @XmlJavaTypeAdapter(SV_Parameter.class),
+
+    // Java types, primitive types and basic OGC types handling
+    @XmlJavaTypeAdapter(InternationalStringAdapter.class),
+    @XmlJavaTypeAdapter(GO_GenericName.class),
+    @XmlJavaTypeAdapter(GO_Boolean.class), @XmlJavaTypeAdapter(type=boolean.class, value=GO_Boolean.class)
+})
 package org.apache.sis.metadata.iso.service;
 
 import javax.xml.bind.annotation.XmlNs;
@@ -57,4 +73,9 @@ import javax.xml.bind.annotation.XmlNsFo
 import javax.xml.bind.annotation.XmlSchema;
 import javax.xml.bind.annotation.XmlAccessType;
 import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapters;
 import org.apache.sis.xml.Namespaces;
+import org.apache.sis.internal.jaxb.gco.*;
+import org.apache.sis.internal.jaxb.code.*;
+import org.apache.sis.internal.jaxb.metadata.*;

Modified: sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/AllMetadataTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/AllMetadataTest.java?rev=1610639&r1=1610638&r2=1610639&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/AllMetadataTest.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/AllMetadataTest.java
[UTF-8] Tue Jul 15 10:48:05 2014
@@ -191,7 +191,7 @@ public final strictfp class AllMetadataT
             org.opengis.metadata.service.OperationChainMetadata.class,
             org.opengis.metadata.service.OperationMetadata.class,
             org.opengis.metadata.service.Parameter.class,
-//          org.opengis.metadata.service.ServiceIdentification.class,
+            org.opengis.metadata.service.ServiceIdentification.class,
             org.opengis.metadata.spatial.CellGeometry.class,
             org.opengis.metadata.spatial.Dimension.class,
             org.opengis.metadata.spatial.DimensionNameType.class,
@@ -233,9 +233,6 @@ public final strictfp class AllMetadataT
             assertEquals(Specification.ISO_19115, specification);
             return Namespaces.SRV;
         }
-        if (impl == org.apache.sis.metadata.iso.identification.DefaultServiceIdentification.class)
{
-            return Namespaces.SRV;
-        }
         return super.getExpectedNamespace(impl, specification);
     }
 



Mime
View raw message