sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1543667 - in /sis/branches/JDK7/core: sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gml/ sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/ sis-referencing/src/main/java/org/apache/sis/referencing/datum/
Date Wed, 20 Nov 2013 00:26:31 GMT
Author: desruisseaux
Date: Wed Nov 20 00:26:30 2013
New Revision: 1543667

URL: http://svn.apache.org/r1543667
Log:
Ported JAXB adapters for datum objects.

Added:
    sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CD_Ellipsoid.java
  (with props)
    sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CD_GeodeticDatum.java
  (with props)
    sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CD_ImageDatum.java
  (with props)
    sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CD_PrimeMeridian.java
  (with props)
    sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CD_TemporalDatum.java
  (with props)
    sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CD_VerticalDatum.java
  (with props)
    sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CD_VerticalDatumType.java
  (with props)
    sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/package-info.java
  (with props)
Modified:
    sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gml/CodeListAdapter.java

Modified: sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gml/CodeListAdapter.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gml/CodeListAdapter.java?rev=1543667&r1=1543666&r2=1543667&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gml/CodeListAdapter.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gml/CodeListAdapter.java
[UTF-8] Wed Nov 20 00:26:30 2013
@@ -41,23 +41,6 @@ public abstract class CodeListAdapter<Bo
     }
 
     /**
-     * Forces the initialization of the given code list class, since some
-     * calls to {@link CodeList#valueOf} are done whereas the constructor
-     * has not already been called.
-     *
-     * @param <T>  The code list type.
-     * @param type The code list class to initialize.
-     */
-    protected static <T extends CodeList<T>> void ensureClassLoaded(final Class<T>
type) {
-        final String name = type.getName();
-        try {
-            Class.forName(name, true, type.getClassLoader());
-        } catch (ClassNotFoundException ex) {
-            throw new TypeNotPresentException(name, ex); // Should never happen.
-        }
-    }
-
-    /**
      * Returns the class of code list wrapped by this adapter.
      *
      * @return The code list class.

Added: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CD_Ellipsoid.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CD_Ellipsoid.java?rev=1543667&view=auto
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CD_Ellipsoid.java
(added)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CD_Ellipsoid.java
[UTF-8] Wed Nov 20 00:26:30 2013
@@ -0,0 +1,93 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sis.internal.jaxb.referencing;
+
+import javax.xml.bind.annotation.XmlElement;
+import org.opengis.referencing.datum.Ellipsoid;
+import org.apache.sis.internal.jaxb.gco.PropertyType;
+import org.apache.sis.referencing.datum.DefaultEllipsoid;
+
+
+/**
+ * JAXB adapter mapping implementing class to the GeoAPI interface. See
+ * package documentation for more information about JAXB and interface.
+ *
+ * @author  Cédric Briançon (Geomatys)
+ * @author  Martin Desruisseaux (Geomatys)
+ * @since   0.4 (derived from geotk-3.05)
+ * @version 0.4
+ * @module
+ */
+public final class CD_Ellipsoid extends PropertyType<CD_Ellipsoid, Ellipsoid> {
+    /**
+     * Empty constructor for JAXB only.
+     */
+    public CD_Ellipsoid() {
+    }
+
+    /**
+     * Returns the GeoAPI interface which is bound by this adapter.
+     * This method is indirectly invoked by the private constructor
+     * below, so it shall not depend on the state of this object.
+     *
+     * @return {@code Ellipsoid.class}
+     */
+    @Override
+    protected Class<Ellipsoid> getBoundType() {
+        return Ellipsoid.class;
+    }
+
+    /**
+     * Constructor for the {@link #wrap} method only.
+     */
+    private CD_Ellipsoid(final Ellipsoid metadata) {
+        super(metadata);
+    }
+
+    /**
+     * Invoked by {@link PropertyType} at marshalling time for wrapping the given value
+     * in a {@code <gml:Ellipsoid>} XML element.
+     *
+     * @param  value The element to marshall.
+     * @return A {@code PropertyType} wrapping the given the element.
+     */
+    @Override
+    protected CD_Ellipsoid wrap(final Ellipsoid value) {
+        return new CD_Ellipsoid(value);
+    }
+
+    /**
+     * Invoked by JAXB at marshalling time for getting the actual element to write
+     * inside the {@code <gml:Ellipsoid>} XML element.
+     * This is the value or a copy of the value given in argument to the {@code wrap} method.
+     *
+     * @return The element to be marshalled.
+     */
+    @XmlElement(name = "Ellipsoid")
+    public DefaultEllipsoid getElement() {
+        return skip() ? null : DefaultEllipsoid.castOrCopy(metadata);
+    }
+
+    /**
+     * Invoked by JAXB at unmarshalling time for storing the result temporarily.
+     *
+     * @param element The unmarshalled element.
+     */
+    public void setElement(final DefaultEllipsoid element) {
+        this.metadata = element;
+    }
+}

Propchange: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CD_Ellipsoid.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CD_Ellipsoid.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain;charset=UTF-8

Added: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CD_GeodeticDatum.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CD_GeodeticDatum.java?rev=1543667&view=auto
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CD_GeodeticDatum.java
(added)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CD_GeodeticDatum.java
[UTF-8] Wed Nov 20 00:26:30 2013
@@ -0,0 +1,93 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sis.internal.jaxb.referencing;
+
+import javax.xml.bind.annotation.XmlElement;
+import org.opengis.referencing.datum.GeodeticDatum;
+import org.apache.sis.internal.jaxb.gco.PropertyType;
+import org.apache.sis.referencing.datum.DefaultGeodeticDatum;
+
+
+/**
+ * JAXB adapter mapping implementing class to the GeoAPI interface. See
+ * package documentation for more information about JAXB and interface.
+ *
+ * @author  Cédric Briançon (Geomatys)
+ * @author  Martin Desruisseaux (Geomatys)
+ * @since   0.4 (derived from geotk-3.05)
+ * @version 0.4
+ * @module
+ */
+public final class CD_GeodeticDatum extends PropertyType<CD_GeodeticDatum, GeodeticDatum>
{
+    /**
+     * Empty constructor for JAXB only.
+     */
+    public CD_GeodeticDatum() {
+    }
+
+    /**
+     * Returns the GeoAPI interface which is bound by this adapter.
+     * This method is indirectly invoked by the private constructor
+     * below, so it shall not depend on the state of this object.
+     *
+     * @return {@code GeodeticDatum.class}
+     */
+    @Override
+    protected Class<GeodeticDatum> getBoundType() {
+        return GeodeticDatum.class;
+    }
+
+    /**
+     * Constructor for the {@link #wrap} method only.
+     */
+    private CD_GeodeticDatum(final GeodeticDatum metadata) {
+        super(metadata);
+    }
+
+    /**
+     * Invoked by {@link PropertyType} at marshalling time for wrapping the given value
+     * in a {@code <gml:geodeticDatum>} XML element.
+     *
+     * @param  value The element to marshall.
+     * @return A {@code PropertyType} wrapping the given the element.
+     */
+    @Override
+    protected CD_GeodeticDatum wrap(final GeodeticDatum value) {
+        return new CD_GeodeticDatum(value);
+    }
+
+    /**
+     * Invoked by JAXB at marshalling time for getting the actual element to write
+     * inside the {@code <gml:geodeticDatum>} XML element.
+     * This is the value or a copy of the value given in argument to the {@code wrap} method.
+     *
+     * @return The element to be marshalled.
+     */
+    @XmlElement(name = "GeodeticDatum")
+    public DefaultGeodeticDatum getElement() {
+        return skip() ? null : DefaultGeodeticDatum.castOrCopy(metadata);
+    }
+
+    /**
+     * Invoked by JAXB at unmarshalling time for storing the result temporarily.
+     *
+     * @param element The unmarshalled element.
+     */
+    public void setElement(final DefaultGeodeticDatum element) {
+        this.metadata = element;
+    }
+}

Propchange: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CD_GeodeticDatum.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CD_GeodeticDatum.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain;charset=UTF-8

Added: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CD_ImageDatum.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CD_ImageDatum.java?rev=1543667&view=auto
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CD_ImageDatum.java
(added)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CD_ImageDatum.java
[UTF-8] Wed Nov 20 00:26:30 2013
@@ -0,0 +1,93 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sis.internal.jaxb.referencing;
+
+import javax.xml.bind.annotation.XmlElement;
+import org.opengis.referencing.datum.ImageDatum;
+import org.apache.sis.internal.jaxb.gco.PropertyType;
+import org.apache.sis.referencing.datum.DefaultImageDatum;
+
+
+/**
+ * JAXB adapter mapping implementing class to the GeoAPI interface. See
+ * package documentation for more information about JAXB and interface.
+ *
+ * @author  Cédric Briançon (Geomatys)
+ * @author  Martin Desruisseaux (Geomatys)
+ * @since   0.4 (derived from geotk-3.05)
+ * @version 0.4
+ * @module
+ */
+public final class CD_ImageDatum extends PropertyType<CD_ImageDatum, ImageDatum> {
+    /**
+     * Empty constructor for JAXB only.
+     */
+    public CD_ImageDatum() {
+    }
+
+    /**
+     * Returns the GeoAPI interface which is bound by this adapter.
+     * This method is indirectly invoked by the private constructor
+     * below, so it shall not depend on the state of this object.
+     *
+     * @return {@code ImageDatum.class}
+     */
+    @Override
+    protected Class<ImageDatum> getBoundType() {
+        return ImageDatum.class;
+    }
+
+    /**
+     * Constructor for the {@link #wrap} method only.
+     */
+    private CD_ImageDatum(final ImageDatum metadata) {
+        super(metadata);
+    }
+
+    /**
+     * Invoked by {@link PropertyType} at marshalling time for wrapping the given value
+     * in a {@code <gml:imageDatum>} XML element.
+     *
+     * @param  value The element to marshall.
+     * @return A {@code PropertyType} wrapping the given the element.
+     */
+    @Override
+    protected CD_ImageDatum wrap(final ImageDatum value) {
+        return new CD_ImageDatum(value);
+    }
+
+    /**
+     * Invoked by JAXB at marshalling time for getting the actual element to write
+     * inside the {@code <gml:imageDatum>} XML element.
+     * This is the value or a copy of the value given in argument to the {@code wrap} method.
+     *
+     * @return The element to be marshalled.
+     */
+    @XmlElement(name = "ImageDatum")
+    public DefaultImageDatum getElement() {
+        return skip() ? null : DefaultImageDatum.castOrCopy(metadata);
+    }
+
+    /**
+     * Invoked by JAXB at unmarshalling time for storing the result temporarily.
+     *
+     * @param element The unmarshalled element.
+     */
+    public void setElement(final DefaultImageDatum element) {
+        this.metadata = element;
+    }
+}

Propchange: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CD_ImageDatum.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CD_ImageDatum.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain;charset=UTF-8

Added: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CD_PrimeMeridian.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CD_PrimeMeridian.java?rev=1543667&view=auto
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CD_PrimeMeridian.java
(added)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CD_PrimeMeridian.java
[UTF-8] Wed Nov 20 00:26:30 2013
@@ -0,0 +1,93 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sis.internal.jaxb.referencing;
+
+import javax.xml.bind.annotation.XmlElement;
+import org.opengis.referencing.datum.PrimeMeridian;
+import org.apache.sis.internal.jaxb.gco.PropertyType;
+import org.apache.sis.referencing.datum.DefaultPrimeMeridian;
+
+
+/**
+ * JAXB adapter mapping implementing class to the GeoAPI interface. See
+ * package documentation for more information about JAXB and interface.
+ *
+ * @author  Cédric Briançon (Geomatys)
+ * @author  Martin Desruisseaux (Geomatys)
+ * @since   0.4 (derived from geotk-3.05)
+ * @version 0.4
+ * @module
+ */
+public final class CD_PrimeMeridian extends PropertyType<CD_PrimeMeridian, PrimeMeridian>
{
+    /**
+     * Empty constructor for JAXB only.
+     */
+    public CD_PrimeMeridian() {
+    }
+
+    /**
+     * Returns the GeoAPI interface which is bound by this adapter.
+     * This method is indirectly invoked by the private constructor
+     * below, so it shall not depend on the state of this object.
+     *
+     * @return {@code PrimeMeridian.class}
+     */
+    @Override
+    protected Class<PrimeMeridian> getBoundType() {
+        return PrimeMeridian.class;
+    }
+
+    /**
+     * Constructor for the {@link #wrap} method only.
+     */
+    private CD_PrimeMeridian(final PrimeMeridian metadata) {
+        super(metadata);
+    }
+
+    /**
+     * Invoked by {@link PropertyType} at marshalling time for wrapping the given value
+     * in a {@code <gml:PrimeMeridian>} XML element.
+     *
+     * @param  value The element to marshall.
+     * @return A {@code PropertyType} wrapping the given the element.
+     */
+    @Override
+    protected CD_PrimeMeridian wrap(final PrimeMeridian value) {
+        return new CD_PrimeMeridian(value);
+    }
+
+    /**
+     * Invoked by JAXB at marshalling time for getting the actual element to write
+     * inside the {@code <gml:PrimeMeridian>} XML element.
+     * This is the value or a copy of the value given in argument to the {@code wrap} method.
+     *
+     * @return The element to be marshalled.
+     */
+    @XmlElement(name = "Ellipsoid")
+    public DefaultPrimeMeridian getElement() {
+        return skip() ? null : DefaultPrimeMeridian.castOrCopy(metadata);
+    }
+
+    /**
+     * Invoked by JAXB at unmarshalling time for storing the result temporarily.
+     *
+     * @param element The unmarshalled element.
+     */
+    public void setElement(final DefaultPrimeMeridian element) {
+        this.metadata = element;
+    }
+}

Propchange: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CD_PrimeMeridian.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CD_PrimeMeridian.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain;charset=UTF-8

Added: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CD_TemporalDatum.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CD_TemporalDatum.java?rev=1543667&view=auto
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CD_TemporalDatum.java
(added)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CD_TemporalDatum.java
[UTF-8] Wed Nov 20 00:26:30 2013
@@ -0,0 +1,93 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sis.internal.jaxb.referencing;
+
+import javax.xml.bind.annotation.XmlElement;
+import org.opengis.referencing.datum.TemporalDatum;
+import org.apache.sis.internal.jaxb.gco.PropertyType;
+import org.apache.sis.referencing.datum.DefaultTemporalDatum;
+
+
+/**
+ * JAXB adapter mapping implementing class to the GeoAPI interface. See
+ * package documentation for more information about JAXB and interface.
+ *
+ * @author  Cédric Briançon (Geomatys)
+ * @author  Martin Desruisseaux (Geomatys)
+ * @since   0.4 (derived from geotk-3.05)
+ * @version 0.4
+ * @module
+ */
+public final class CD_TemporalDatum extends PropertyType<CD_TemporalDatum, TemporalDatum>
{
+    /**
+     * Empty constructor for JAXB only.
+     */
+    public CD_TemporalDatum() {
+    }
+
+    /**
+     * Returns the GeoAPI interface which is bound by this adapter.
+     * This method is indirectly invoked by the private constructor
+     * below, so it shall not depend on the state of this object.
+     *
+     * @return {@code TemporalDatum.class}
+     */
+    @Override
+    protected Class<TemporalDatum> getBoundType() {
+        return TemporalDatum.class;
+    }
+
+    /**
+     * Constructor for the {@link #wrap} method only.
+     */
+    private CD_TemporalDatum(final TemporalDatum metadata) {
+        super(metadata);
+    }
+
+    /**
+     * Invoked by {@link PropertyType} at marshalling time for wrapping the given value
+     * in a {@code <gml:temporalDatum>} XML element.
+     *
+     * @param  value The element to marshall.
+     * @return A {@code PropertyType} wrapping the given the element.
+     */
+    @Override
+    protected CD_TemporalDatum wrap(final TemporalDatum value) {
+        return new CD_TemporalDatum(value);
+    }
+
+    /**
+     * Invoked by JAXB at marshalling time for getting the actual element to write
+     * inside the {@code <gml:temporalDatum>} XML element.
+     * This is the value or a copy of the value given in argument to the {@code wrap} method.
+     *
+     * @return The element to be marshalled.
+     */
+    @XmlElement(name = "TemporalDatum")
+    public DefaultTemporalDatum getElement() {
+        return skip() ? null : DefaultTemporalDatum.castOrCopy(metadata);
+    }
+
+    /**
+     * Invoked by JAXB at unmarshalling time for storing the result temporarily.
+     *
+     * @param element The unmarshalled element.
+     */
+    public void setElement(final DefaultTemporalDatum element) {
+        this.metadata = element;
+    }
+}

Propchange: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CD_TemporalDatum.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CD_TemporalDatum.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain;charset=UTF-8

Added: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CD_VerticalDatum.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CD_VerticalDatum.java?rev=1543667&view=auto
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CD_VerticalDatum.java
(added)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CD_VerticalDatum.java
[UTF-8] Wed Nov 20 00:26:30 2013
@@ -0,0 +1,93 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sis.internal.jaxb.referencing;
+
+import javax.xml.bind.annotation.XmlElement;
+import org.opengis.referencing.datum.VerticalDatum;
+import org.apache.sis.internal.jaxb.gco.PropertyType;
+import org.apache.sis.referencing.datum.DefaultVerticalDatum;
+
+
+/**
+ * JAXB adapter mapping implementing class to the GeoAPI interface. See
+ * package documentation for more information about JAXB and interface.
+ *
+ * @author  Cédric Briançon (Geomatys)
+ * @author  Martin Desruisseaux (Geomatys)
+ * @since   0.4 (derived from geotk-3.05)
+ * @version 0.4
+ * @module
+ */
+public final class CD_VerticalDatum extends PropertyType<CD_VerticalDatum, VerticalDatum>
{
+    /**
+     * Empty constructor for JAXB only.
+     */
+    public CD_VerticalDatum() {
+    }
+
+    /**
+     * Returns the GeoAPI interface which is bound by this adapter.
+     * This method is indirectly invoked by the private constructor
+     * below, so it shall not depend on the state of this object.
+     *
+     * @return {@code VerticalDatum.class}
+     */
+    @Override
+    protected Class<VerticalDatum> getBoundType() {
+        return VerticalDatum.class;
+    }
+
+    /**
+     * Constructor for the {@link #wrap} method only.
+     */
+    private CD_VerticalDatum(final VerticalDatum metadata) {
+        super(metadata);
+    }
+
+    /**
+     * Invoked by {@link PropertyType} at marshalling time for wrapping the given value
+     * in a {@code <gml:verticalDatum>} XML element.
+     *
+     * @param  value The element to marshall.
+     * @return A {@code PropertyType} wrapping the given the element.
+     */
+    @Override
+    protected CD_VerticalDatum wrap(final VerticalDatum value) {
+        return new CD_VerticalDatum(value);
+    }
+
+    /**
+     * Invoked by JAXB at marshalling time for getting the actual element to write
+     * inside the {@code <gml:verticalDatum>} XML element.
+     * This is the value or a copy of the value given in argument to the {@code wrap} method.
+     *
+     * @return The element to be marshalled.
+     */
+    @XmlElement(name = "VerticalDatum")
+    public DefaultVerticalDatum getElement() {
+        return skip() ? null : DefaultVerticalDatum.castOrCopy(metadata);
+    }
+
+    /**
+     * Invoked by JAXB at unmarshalling time for storing the result temporarily.
+     *
+     * @param element The unmarshalled element.
+     */
+    public void setElement(final DefaultVerticalDatum element) {
+        this.metadata = element;
+    }
+}

Propchange: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CD_VerticalDatum.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CD_VerticalDatum.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain;charset=UTF-8

Added: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CD_VerticalDatumType.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CD_VerticalDatumType.java?rev=1543667&view=auto
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CD_VerticalDatumType.java
(added)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CD_VerticalDatumType.java
[UTF-8] Wed Nov 20 00:26:30 2013
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sis.internal.jaxb.referencing;
+
+import org.opengis.referencing.datum.VerticalDatumType;
+import org.apache.sis.internal.jaxb.gml.CodeListAdapter;
+
+
+/**
+ * JAXB adapter mapping implementing class to the GeoAPI interface. See
+ * package documentation for more information about JAXB and interface.
+ *
+ * @author  Martin Desruisseaux (Geomatys)
+ * @since   0.4 (derived from geotk-3.20)
+ * @version 0.4
+ * @module
+ */
+public final class CD_VerticalDatumType extends CodeListAdapter<VerticalDatumType>
{
+    /**
+     * Empty constructor for JAXB only.
+     */
+    public CD_VerticalDatumType() {
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * @return {@code VerticalDatumType.class}
+     */
+    @Override
+    protected Class<VerticalDatumType> getCodeListClass() {
+        return VerticalDatumType.class;
+    }
+}

Propchange: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CD_VerticalDatumType.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CD_VerticalDatumType.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain;charset=UTF-8

Added: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/package-info.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/package-info.java?rev=1543667&view=auto
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/package-info.java
(added)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/package-info.java
[UTF-8] Wed Nov 20 00:26:30 2013
@@ -0,0 +1,62 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * {@linkplain org.apache.sis.referencing.datum.AbstractDatum Datum} implementations. An
explanation
+ * for this package is provided in the {@linkplain org.opengis.referencing.datum OpenGIS®
javadoc}.
+ * The remaining discussion on this page is specific to the SIS implementation.
+ *
+ * <p>Some worthy methods defined in this package are:</p>
+ * <ul>
+ *   <li>{@link org.apache.sis.referencing.datum.DefaultEllipsoid#orthodromicDistance(double,
double, double, double)}</li>
+ *   <li>{@link org.apache.sis.referencing.datum.DefaultGeodeticDatum#getPositionVectorTransformation
+ *       DefaultGeodeticDatum.getPositionVectorTransformation(GeodeticDatum, Extent)}</li>
+ * </ul>
+ *
+ * @author  Martin Desruisseaux (IRD, Geomatys)
+ * @author  Cédric Briançon (Geomatys)
+ * @since   0.4 (derived from geotk-1.2)
+ * @version 0.4
+ * @module
+ */
+@XmlSchema(elementFormDefault = XmlNsForm.QUALIFIED, namespace = Namespaces.GML, xmlns =
{
+    @XmlNs(prefix = "gmd", namespaceURI = Namespaces.GMD),
+    @XmlNs(prefix = "gco", namespaceURI = Namespaces.GCO),
+    @XmlNs(prefix = "xsi", namespaceURI = Namespaces.XSI)
+})
+@XmlAccessorType(XmlAccessType.NONE)
+@XmlJavaTypeAdapters({
+    @XmlJavaTypeAdapter(EX_Extent.class),
+    @XmlJavaTypeAdapter(CD_Ellipsoid.class),
+    @XmlJavaTypeAdapter(CD_PrimeMeridian.class),
+    @XmlJavaTypeAdapter(CD_VerticalDatumType.class),
+    @XmlJavaTypeAdapter(StringAdapter.class),
+    @XmlJavaTypeAdapter(InternationalStringConverter.class)
+})
+package org.apache.sis.referencing.datum;
+
+import javax.xml.bind.annotation.XmlNs;
+import javax.xml.bind.annotation.XmlNsForm;
+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.metadata.*;
+import org.apache.sis.internal.jaxb.referencing.*;

Propchange: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/package-info.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/package-info.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain;charset=UTF-8



Mime
View raw message