You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sis.apache.org by de...@apache.org on 2013/03/21 12:47:51 UTC
svn commit: r1459242 -
/sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/
Author: desruisseaux
Date: Thu Mar 21 11:47:50 2013
New Revision: 1459242
URL: http://svn.apache.org/r1459242
Log:
Added the identification package.
Added:
sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultAggregateInformation.java (with props)
sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultBrowseGraphic.java (with props)
sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultKeywords.java (with props)
sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultServiceIdentification.java (with props)
sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultUsage.java (with props)
sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/package-info.java (with props)
Modified:
sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/AbstractIdentification.java
sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultDataIdentification.java
sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultRepresentativeFraction.java
sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultResolution.java
Modified: sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/AbstractIdentification.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/AbstractIdentification.java?rev=1459242&r1=1459241&r2=1459242&view=diff
==============================================================================
--- sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/AbstractIdentification.java [UTF-8] (original)
+++ sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/AbstractIdentification.java [UTF-8] Thu Mar 21 11:47:50 2013
@@ -17,111 +17,407 @@
package org.apache.sis.metadata.iso.identification;
import java.util.Collection;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.XmlSeeAlso;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
import org.opengis.metadata.citation.Citation;
import org.opengis.metadata.citation.ResponsibleParty;
import org.opengis.metadata.constraint.Constraints;
import org.opengis.metadata.distribution.Format;
import org.opengis.metadata.identification.AggregateInformation;
-import org.opengis.metadata.identification.BrowseGraphic;
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.maintenance.MaintenanceInformation;
import org.opengis.util.InternationalString;
import org.apache.sis.metadata.iso.ISOMetadata;
+import org.apache.sis.util.iso.Types;
+/**
+ * Basic information required to uniquely identify a resource or resources.
+ *
+ * @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
+ * @module
+ */
+@XmlType(name = "AbstractMD_Identification_Type", propOrder = {
+ "citation", "abstract", "purpose", "credits", "status", "pointOfContacts",
+ "resourceMaintenances", "graphicOverviews", "resourceFormats", "descriptiveKeywords",
+ "resourceSpecificUsages", "resourceConstraints", "aggregationInfo"
+})
+@XmlRootElement(name = "MD_Identification")
+@XmlSeeAlso({
+ DefaultDataIdentification.class,
+ DefaultServiceIdentification.class
+})
public class AbstractIdentification extends ISOMetadata implements Identification {
-
+ /**
+ * Serial number for compatibility with different versions.
+ */
+ private static final long serialVersionUID = 5794381277658853611L;
+
+ /**
+ * Citation data for the resource(s).
+ */
private Citation citation;
+ /**
+ * Brief narrative summary of the content of the resource(s).
+ */
private InternationalString abstracts;
+ /**
+ * Summary of the intentions with which the resource(s) was developed.
+ */
private InternationalString purpose;
+ /**
+ * Recognition of those who contributed to the resource(s).
+ */
private Collection<String> credits;
+ /**
+ * Status of the resource(s).
+ */
private Collection<Progress> status;
+ /**
+ * Identification of, and means of communication with, person(s) and organizations(s)
+ * associated with the resource(s).
+ */
private Collection<ResponsibleParty> pointOfContacts;
+ /**
+ * Provides information about the frequency of resource updates, and the scope of those updates.
+ */
private Collection<MaintenanceInformation> resourceMaintenances;
+ /**
+ * Provides a graphic that illustrates the resource(s) (should include a legend for the graphic).
+ */
private Collection<BrowseGraphic> graphicOverviews;
+ /**
+ * Provides a description of the format of the resource(s).
+ */
private Collection<Format> resourceFormats;
+ /**
+ * Provides category keywords, their type, and reference source.
+ */
private Collection<Keywords> descriptiveKeywords;
+ /**
+ * Provides basic information about specific application(s) for which the resource(s)
+ * has/have been or is being used by different users.
+ */
private Collection<Usage> resourceSpecificUsages;
+ /**
+ * Provides information about constraints which apply to the resource(s).
+ */
private Collection<Constraints> resourceConstraints;
+ /**
+ * Provides aggregate dataset information.
+ */
private Collection<AggregateInformation> aggregationInfo;
+ /**
+ * Constructs an initially empty identification.
+ */
+ public AbstractIdentification() {
+ }
+
+ /**
+ * Creates an identification initialized to the specified values.
+ *
+ * @param citation The citation data for the resource(s), or {@code null} if none.
+ * @param abstracts A brief narrative summary of the content of the resource(s), or {@code null} if none.
+ */
+ public AbstractIdentification(final Citation citation, final CharSequence abstracts) {
+ this.citation = citation;
+ this.abstracts = Types.toInternationalString(abstracts);
+ }
+
+ /**
+ * Returns a SIS metadata implementation with the same values than the given arbitrary
+ * implementation. If the given object is {@code null}, then this method returns {@code null}.
+ * Otherwise if the given object is already a SIS implementation, then the given object is
+ * returned unchanged. Otherwise a new SIS implementation is created and initialized to the
+ * property values of the given object, using a <cite>shallow</cite> copy operation
+ * (i.e. properties are not cloned).
+ *
+ * <p>This method checks for the {@link DataIdentification} and {@link ServiceIdentification}
+ * sub-interfaces. If one of those interfaces is found, then this method delegates to
+ * the corresponding {@code castOrCopy} static method. If the given object implements more
+ * than one of the above-cited interfaces, then the {@code castOrCopy} method to be used is
+ * unspecified.</p>
+ *
+ * @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.
+ */
+ public static AbstractIdentification castOrCopy(final Identification object) {
+ if (object instanceof DataIdentification) {
+ return DefaultDataIdentification.castOrCopy((DataIdentification) object);
+ }
+ if (object instanceof ServiceIdentification) {
+ return DefaultServiceIdentification.castOrCopy((ServiceIdentification) object);
+ }
+ if (object == null || object instanceof AbstractIdentification) {
+ return (AbstractIdentification) object;
+ }
+ final AbstractIdentification copy = new AbstractIdentification();
+ copy.shallowCopy(object);
+ return copy;
+ }
+
+ /**
+ * Returns the citation data for the resource(s).
+ */
@Override
+ @XmlElement(name = "citation", required = true)
public synchronized Citation getCitation() {
return citation;
}
+ /**
+ * Sets the citation data for the resource(s).
+ *
+ * @param newValue The new citation.
+ */
+ public synchronized void setCitation(final Citation newValue) {
+ checkWritePermission();
+ citation = newValue;
+ }
+
+ /**
+ * Returns a brief narrative summary of the content of the resource(s).
+ */
@Override
+ @XmlElement(name = "abstract", required = true)
public synchronized InternationalString getAbstract() {
return abstracts;
}
+ /**
+ * Sets a brief narrative summary of the content of the resource(s).
+ *
+ * @param newValue The new abstract.
+ */
+ public synchronized void setAbstract(final InternationalString newValue) {
+ checkWritePermission();
+ abstracts = newValue;
+ }
+
+ /**
+ * Returns a summary of the intentions with which the resource(s) was developed.
+ */
@Override
+ @XmlElement(name = "purpose")
public synchronized InternationalString getPurpose() {
return purpose;
}
+ /**
+ * Sets a summary of the intentions with which the resource(s) was developed.
+ *
+ * @param newValue The new purpose.
+ */
+ public synchronized void setPurpose(final InternationalString newValue) {
+ checkWritePermission();
+ purpose = newValue;
+ }
+
+ /**
+ * Returns the recognition of those who contributed to the resource(s).
+ */
@Override
+ @XmlElement(name = "credit")
public synchronized Collection<String> getCredits() {
- return credits;
+ return credits = nonNullCollection(credits, String.class);
+ }
+
+ /**
+ * Sets the recognition of those who contributed to the resource(s).
+ *
+ * @param newValues The new credits.
+ */
+ public synchronized void setCredits(final Collection<? extends String> newValues) {
+ credits = copyCollection(newValues, credits, String.class);
}
+ /**
+ * Returns the status of the resource(s).
+ */
@Override
+ @XmlElement(name = "status")
public synchronized Collection<Progress> getStatus() {
- return status;
+ return status = nonNullCollection(status, Progress.class);
}
+ /**
+ * Sets the status of the resource(s).
+ *
+ * @param newValues The new status.
+ */
+ public synchronized void setStatus(final Collection<? extends Progress> newValues) {
+ status = copyCollection(newValues, status, Progress.class);
+ }
+
+ /**
+ * Returns the identification of, and means of communication with, person(s) and organizations(s)
+ * associated with the resource(s).
+ */
@Override
+ @XmlElement(name = "pointOfContact")
public synchronized Collection<ResponsibleParty> getPointOfContacts() {
- return pointOfContacts;
+ return pointOfContacts = nonNullCollection(pointOfContacts, ResponsibleParty.class);
+ }
+
+ /**
+ * Sets the point of contacts.
+ *
+ * @param newValues The new points of contacts.
+ */
+ public synchronized void setPointOfContacts(final Collection<? extends ResponsibleParty> newValues) {
+ pointOfContacts = copyCollection(newValues, pointOfContacts, ResponsibleParty.class);
}
+ /**
+ * Provides information about the frequency of resource updates, and the scope of those updates.
+ */
@Override
+ @XmlElement(name = "resourceMaintenance")
public synchronized Collection<MaintenanceInformation> getResourceMaintenances() {
- return resourceMaintenances;
+ return resourceMaintenances = nonNullCollection(resourceMaintenances, MaintenanceInformation.class);
}
+ /**
+ * Sets information about the frequency of resource updates, and the scope of those updates.
+ *
+ * @param newValues The new resource maintenance info.
+ */
+ public synchronized void setResourceMaintenances(final Collection<? extends MaintenanceInformation> newValues) {
+ resourceMaintenances = copyCollection(newValues, resourceMaintenances, MaintenanceInformation.class);
+ }
+
+ /**
+ * Provides a graphic that illustrates the resource(s) (should include a legend for the graphic).
+ */
@Override
+ @XmlElement(name = "graphicOverview")
public synchronized Collection<BrowseGraphic> getGraphicOverviews() {
- return graphicOverviews;
+ return graphicOverviews = nonNullCollection(graphicOverviews, BrowseGraphic.class);
+ }
+
+ /**
+ * Sets a graphic that illustrates the resource(s).
+ *
+ * @param newValues The new graphics overviews.
+ */
+ public synchronized void setGraphicOverviews(final Collection<? extends BrowseGraphic> newValues) {
+ graphicOverviews = copyCollection(newValues, graphicOverviews, BrowseGraphic.class);
}
+ /**
+ * Provides a description of the format of the resource(s).
+ */
@Override
+ @XmlElement(name = "resourceFormat")
public synchronized Collection<Format> getResourceFormats() {
- return resourceFormats;
+ return resourceFormats = nonNullCollection(resourceFormats, Format.class);
}
+ /**
+ * Sets a description of the format of the resource(s).
+ *
+ * @param newValues The new resource format.
+ */
+ public synchronized void setResourceFormats(final Collection<? extends Format> newValues) {
+ resourceFormats = copyCollection(newValues, resourceFormats, Format.class);
+ }
+
+ /**
+ * Provides category keywords, their type, and reference source.
+ */
@Override
+ @XmlElement(name = "descriptiveKeywords")
public synchronized Collection<Keywords> getDescriptiveKeywords() {
- return descriptiveKeywords;
+ return descriptiveKeywords = nonNullCollection(descriptiveKeywords, Keywords.class);
+ }
+
+ /**
+ * Sets category keywords, their type, and reference source.
+ *
+ * @param newValues The new descriptive keywords.
+ */
+ public synchronized void setDescriptiveKeywords(final Collection<? extends Keywords> newValues) {
+ descriptiveKeywords = copyCollection(newValues, descriptiveKeywords, Keywords.class);
}
+ /**
+ * Provides basic information about specific application(s) for which the resource(s)
+ * has/have been or is being used by different users.
+ */
@Override
+ @XmlElement(name = "resourceSpecificUsage")
public synchronized Collection<Usage> getResourceSpecificUsages() {
- return resourceSpecificUsages;
+ return resourceSpecificUsages = nonNullCollection(resourceSpecificUsages, Usage.class);
+ }
+
+ /**
+ * Sets basic information about specific application(s).
+ *
+ * @param newValues The new resource specific usages.
+ */
+ public synchronized void setResourceSpecificUsages(final Collection<? extends Usage> newValues) {
+ resourceSpecificUsages = copyCollection(newValues, resourceSpecificUsages, Usage.class);
}
+ /**
+ * Provides information about constraints which apply to the resource(s).
+ */
@Override
+ @XmlElement(name = "resourceConstraints")
public synchronized Collection<Constraints> getResourceConstraints() {
- return resourceConstraints;
+ return resourceConstraints = nonNullCollection(resourceConstraints, Constraints.class);
}
+ /**
+ * Sets information about constraints which apply to the resource(s).
+ *
+ * @param newValues The new resource constraints.
+ */
+ public synchronized void setResourceConstraints(final Collection<? extends Constraints> newValues) {
+ resourceConstraints = copyCollection(newValues, resourceConstraints, Constraints.class);
+ }
+
+ /**
+ * Provides aggregate dataset information.
+ */
@Override
+ @XmlElement(name = "aggregationInfo")
public synchronized Collection<AggregateInformation> getAggregationInfo() {
- return aggregationInfo;
+ return aggregationInfo = nonNullCollection(aggregationInfo, AggregateInformation.class);
+ }
+
+ /**
+ * Sets aggregate dataset information.
+ *
+ * @param newValues The new aggregation info.
+ */
+ public synchronized void setAggregationInfo(final Collection<? extends AggregateInformation> newValues) {
+ aggregationInfo = copyCollection(newValues, aggregationInfo, AggregateInformation.class);
}
}
Added: sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultAggregateInformation.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultAggregateInformation.java?rev=1459242&view=auto
==============================================================================
--- sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultAggregateInformation.java (added)
+++ sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultAggregateInformation.java [UTF-8] Thu Mar 21 11:47:50 2013
@@ -0,0 +1,179 @@
+/*
+ * 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.metadata.iso.identification;
+
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import org.opengis.metadata.Identifier;
+import org.opengis.metadata.citation.Citation;
+import org.opengis.metadata.identification.AggregateInformation;
+import org.opengis.metadata.identification.AssociationType;
+import org.opengis.metadata.identification.InitiativeType;
+import org.apache.sis.metadata.iso.ISOMetadata;
+
+
+/**
+ * Aggregate dataset information.
+ *
+ * @author Guilhem Legal (Geomatys)
+ * @author Martin Desruisseaux (Geomatys)
+ * @since 0.3 (derived from geotk-3.00)
+ * @version 0.3
+ * @module
+ */
+@XmlType(name = "MD_AggregateInformation_Type", propOrder = {
+ "aggregateDataSetName",
+ "aggregateDataSetIdentifier",
+ "associationType",
+ "initiativeType"
+})
+@XmlRootElement(name = "MD_AggregateInformation")
+public class DefaultAggregateInformation extends ISOMetadata implements AggregateInformation {
+ /**
+ * Serial number for compatibility with different versions.
+ */
+ private static final long serialVersionUID = 5520234916010871192L;
+
+ /**
+ * Citation information about the aggregate dataset.
+ */
+ private Citation aggregateDataSetName;
+
+ /**
+ * Identification information about aggregate dataset.
+ */
+ private Identifier aggregateDataSetIdentifier;
+
+ /**
+ * Association type of the aggregate dataset.
+ */
+ private AssociationType associationType;
+
+ /**
+ * Type of initiative under which the aggregate dataset was produced.
+ */
+ private InitiativeType initiativeType;
+
+ /**
+ * Constructs an initially empty Aggregate dataset information.
+ */
+ public DefaultAggregateInformation() {
+ }
+
+ /**
+ * Returns a SIS metadata implementation with the same values than the given arbitrary
+ * implementation. If the given object is {@code null}, then this method returns {@code null}.
+ * Otherwise if the given object is already a SIS implementation, then the given object is
+ * returned unchanged. Otherwise a new SIS implementation is created and initialized to the
+ * property values of the given object, using a <cite>shallow</cite> copy operation
+ * (i.e. properties are not cloned).
+ *
+ * @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.
+ */
+ public static DefaultAggregateInformation castOrCopy(final AggregateInformation object) {
+ if (object == null || object instanceof DefaultAggregateInformation) {
+ return (DefaultAggregateInformation) object;
+ }
+ final DefaultAggregateInformation copy = new DefaultAggregateInformation();
+ copy.shallowCopy(object);
+ return copy;
+ }
+
+ /**
+ * Citation information about the aggregate dataset.
+ *
+ * @return Citation information about the aggregate dataset, or {@code null}.
+ */
+ @Override
+ @XmlElement(name = "aggregateDataSetName")
+ public synchronized Citation getAggregateDataSetName() {
+ return aggregateDataSetName;
+ }
+
+ /**
+ * Sets the citation information about the aggregate dataset.
+ *
+ * @param newValue The new citation.
+ */
+ public synchronized void setAggregateDataSetName(final Citation newValue) {
+ checkWritePermission();
+ aggregateDataSetName = newValue;
+ }
+
+ /**
+ * Identification information about aggregate dataset.
+ *
+ * @return Identification information about aggregate dataset, or {@code null}.
+ */
+ @Override
+ @XmlElement(name = "aggregateDataSetIdentifier")
+ public synchronized Identifier getAggregateDataSetIdentifier() {
+ return aggregateDataSetIdentifier;
+ }
+
+ /**
+ * Sets the identification information about aggregate dataset.
+ *
+ * @param newValue The new identifier.
+ */
+ public synchronized void setAggregateDataSetIdentifier(final Identifier newValue) {
+ aggregateDataSetIdentifier = newValue;
+ }
+
+ /**
+ * Association type of the aggregate dataset.
+ *
+ * @return Association type of the aggregate dataset.
+ */
+ @Override
+ @XmlElement(name = "associationType", required = true)
+ public synchronized AssociationType getAssociationType() {
+ return associationType;
+ }
+
+ /**
+ * Sets the association type of the aggregate dataset.
+ *
+ * @param newValue The new association type.
+ */
+ public synchronized void setAssociationType(final AssociationType newValue) {
+ associationType = newValue;
+ }
+
+ /**
+ * Type of initiative under which the aggregate dataset was produced.
+ *
+ * @return Type of initiative under which the aggregate dataset was produced, or {@code null}.
+ */
+ @Override
+ @XmlElement(name = "initiativeType")
+ public synchronized InitiativeType getInitiativeType() {
+ return initiativeType;
+ }
+
+ /**
+ * Sets the type of initiative under which the aggregate dataset was produced.
+ *
+ * @param newValue The new initiative.
+ */
+ public synchronized void setInitiativeType(final InitiativeType newValue) {
+ initiativeType = newValue;
+ }
+}
Propchange: sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultAggregateInformation.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultAggregateInformation.java
------------------------------------------------------------------------------
svn:mime-type = text/plain;charset=UTF-8
Added: sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultBrowseGraphic.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultBrowseGraphic.java?rev=1459242&view=auto
==============================================================================
--- sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultBrowseGraphic.java (added)
+++ sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultBrowseGraphic.java [UTF-8] Thu Mar 21 11:47:50 2013
@@ -0,0 +1,159 @@
+/*
+ * 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.metadata.iso.identification;
+
+import java.net.URI;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import org.opengis.util.InternationalString;
+import org.opengis.metadata.identification.BrowseGraphic;
+import org.apache.sis.metadata.iso.ISOMetadata;
+
+
+/**
+ * Graphic that provides an illustration of the dataset (should include a legend for the graphic).
+ *
+ * @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
+ * @module
+ */
+@XmlType(name = "MD_BrowseGraphic_Type", propOrder = {
+ "fileName",
+ "fileDescription",
+ "fileType"
+})
+@XmlRootElement(name = "MD_BrowseGraphic")
+public class DefaultBrowseGraphic extends ISOMetadata implements BrowseGraphic {
+ /**
+ * Serial number for compatibility with different versions.
+ */
+ private static final long serialVersionUID = 1715873406472953616L;
+
+ /**
+ * Name of the file that contains a graphic that provides an illustration of the dataset.
+ */
+ private URI fileName;
+
+ /**
+ * Text description of the illustration.
+ */
+ private InternationalString fileDescription;
+
+ /**
+ * Format in which the illustration is encoded.
+ * Examples: CGM, EPS, GIF, JPEG, PBM, PS, TIFF, XWD.
+ */
+ private String fileType;
+
+ /**
+ * Constructs an initially empty browse graphic.
+ */
+ public DefaultBrowseGraphic() {
+ }
+
+ /**
+ * Creates a browse graphics initialized to the specified URI.
+ *
+ * @param fileName The name of the file that contains a graphic.
+ */
+ public DefaultBrowseGraphic(final URI fileName) {
+ this.fileName = fileName;
+ }
+
+ /**
+ * Returns a SIS metadata implementation with the same values than the given arbitrary
+ * implementation. If the given object is {@code null}, then this method returns {@code null}.
+ * Otherwise if the given object is already a SIS implementation, then the given object is
+ * returned unchanged. Otherwise a new SIS implementation is created and initialized to the
+ * property values of the given object, using a <cite>shallow</cite> copy operation
+ * (i.e. properties are not cloned).
+ *
+ * @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.
+ */
+ public static DefaultBrowseGraphic castOrCopy(final BrowseGraphic object) {
+ if (object == null || object instanceof DefaultBrowseGraphic) {
+ return (DefaultBrowseGraphic) object;
+ }
+ final DefaultBrowseGraphic copy = new DefaultBrowseGraphic();
+ copy.shallowCopy(object);
+ return copy;
+ }
+
+ /**
+ * Returns the name of the file that contains a graphic that provides an illustration of the dataset.
+ */
+ @Override
+ @XmlElement(name = "fileName", required = true)
+ public synchronized URI getFileName() {
+ return fileName;
+ }
+
+ /**
+ * Sets the name of the file that contains a graphic that provides an illustration of the dataset.
+ *
+ * @param newValue The new filename.
+ */
+ public synchronized void setFileName(final URI newValue) {
+ checkWritePermission();
+ fileName = newValue;
+ }
+
+ /**
+ * Returns the text description of the illustration.
+ */
+ @Override
+ @XmlElement(name = "fileDescription")
+ public synchronized InternationalString getFileDescription() {
+ return fileDescription;
+ }
+
+ /**
+ * Sets the text description of the illustration.
+ *
+ * @param newValue The new file description.
+ */
+ public synchronized void setFileDescription(final InternationalString newValue) {
+ checkWritePermission();
+ fileDescription = newValue;
+ }
+
+ /**
+ * Format in which the illustration is encoded.
+ * Examples: CGM, EPS, GIF, JPEG, PBM, PS, TIFF, XWD.
+ */
+ @Override
+ @XmlElement(name = "fileType")
+ public synchronized String getFileType() {
+ return fileType;
+ }
+
+ /**
+ * Sets the format in which the illustration is encoded.
+ *
+ * @param newValue The new file type.
+ */
+ public synchronized void setFileType(final String newValue) {
+ checkWritePermission();
+ fileType = newValue;
+ }
+}
Propchange: sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultBrowseGraphic.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultBrowseGraphic.java
------------------------------------------------------------------------------
svn:mime-type = text/plain;charset=UTF-8
Modified: sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultDataIdentification.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultDataIdentification.java?rev=1459242&r1=1459241&r2=1459242&view=diff
==============================================================================
--- sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultDataIdentification.java [UTF-8] (original)
+++ sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultDataIdentification.java [UTF-8] Thu Mar 21 11:47:50 2013
@@ -18,69 +18,280 @@ package org.apache.sis.metadata.iso.iden
import java.util.Collection;
import java.util.Locale;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
import org.opengis.metadata.extent.Extent;
-import org.opengis.metadata.identification.CharacterSet;
-import org.opengis.metadata.identification.DataIdentification;
+import org.opengis.metadata.citation.Citation;
import org.opengis.metadata.identification.Resolution;
+import org.opengis.metadata.identification.CharacterSet;
import org.opengis.metadata.identification.TopicCategory;
+import org.opengis.metadata.identification.DataIdentification;
import org.opengis.metadata.spatial.SpatialRepresentationType;
import org.opengis.util.InternationalString;
-public class DefaultDataIdentification extends AbstractIdentification implements DataIdentification {
+/**
+ * Information required to identify a dataset.
+ *
+ * @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
+ * @module
+ */
+@XmlType(name = "MD_DataIdentification_Type", propOrder = {
+ "spatialRepresentationTypes",
+ "spatialResolutions",
+ "languages",
+ "characterSets",
+ "topicCategories",
+ "environmentDescription",
+ "extents",
+ "supplementalInformation"
+})
+@XmlRootElement(name = "MD_DataIdentification")
+public class DefaultDataIdentification extends AbstractIdentification implements DataIdentification {
+ /**
+ * Serial number for compatibility with different versions.
+ */
+ private static final long serialVersionUID = 2099051218533426785L;
+
+ /**
+ * Method used to spatially represent geographic information.
+ */
private Collection<SpatialRepresentationType> spatialRepresentationTypes;
+ /**
+ * Factor which provides a general understanding of the density of spatial data in the dataset.
+ */
private Collection<Resolution> spatialResolutions;
+ /**
+ * Language(s) used within the dataset.
+ */
private Collection<Locale> languages;
+ /**
+ * Full name of the character coding standard used for the dataset.
+ */
private Collection<CharacterSet> characterSets;
+ /**
+ * Main theme(s) of the datset.
+ */
private Collection<TopicCategory> topicCategories;
+ /**
+ * Description of the dataset in the producers processing environment, including items
+ * such as the software, the computer operating system, file name, and the dataset size
+ */
private InternationalString environmentDescription;
+ /**
+ * Additional extent information including the bounding polygon, vertical, and temporal
+ * extent of the dataset.
+ */
private Collection<Extent> extents;
+ /**
+ * Any other descriptive information about the dataset.
+ */
private InternationalString supplementalInformation;
+ /**
+ * Constructs an initially empty data identification.
+ */
+ public DefaultDataIdentification() {
+ }
+
+ /**
+ * Creates a data identification initialized to the specified values.
+ *
+ * @param citation The citation data for the resource(s), or {@code null} if none.
+ * @param abstracts A brief narrative summary of the content of the resource(s), or {@code null} if none.
+ * @param language The language used within the dataset, or {@code null} if none.
+ * @param topicCategory The main theme of the dataset, or {@code null} if none.
+ */
+ public DefaultDataIdentification(final Citation citation,
+ final InternationalString abstracts,
+ final Locale language,
+ final TopicCategory topicCategory)
+ {
+ super(citation, abstracts);
+ languages = singleton(Locale.class, language);
+ topicCategories = singleton(TopicCategory.class, topicCategory);
+ }
+
+ /**
+ * Returns a SIS metadata implementation with the same values than the given arbitrary
+ * implementation. If the given object is {@code null}, then this method returns {@code null}.
+ * Otherwise if the given object is already a SIS implementation, then the given object is
+ * returned unchanged. Otherwise a new SIS implementation is created and initialized to the
+ * property values of the given object, using a <cite>shallow</cite> copy operation
+ * (i.e. properties are not cloned).
+ *
+ * @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.
+ */
+ public static DefaultDataIdentification castOrCopy(final DataIdentification object) {
+ if (object == null || object instanceof DefaultDataIdentification) {
+ return (DefaultDataIdentification) object;
+ }
+ final DefaultDataIdentification copy = new DefaultDataIdentification();
+ copy.shallowCopy(object);
+ return copy;
+ }
+
+ /**
+ * Returns the method used to spatially represent geographic information.
+ */
@Override
+ @XmlElement(name = "spatialRepresentationType")
public synchronized Collection<SpatialRepresentationType> getSpatialRepresentationTypes() {
- return spatialRepresentationTypes;
+ return spatialRepresentationTypes = nonNullCollection(spatialRepresentationTypes, SpatialRepresentationType.class);
+ }
+
+ /**
+ * Sets the method used to spatially represent geographic information.
+ *
+ * @param newValues The new spatial representation types.
+ */
+ public synchronized void setSpatialRepresentationTypes(final Collection<? extends SpatialRepresentationType> newValues) {
+ spatialRepresentationTypes = copyCollection(newValues, spatialRepresentationTypes, SpatialRepresentationType.class);
}
+ /**
+ * Returns the factor which provides a general understanding of the density of spatial data
+ * in the dataset.
+ */
@Override
+ @XmlElement(name = "spatialResolution")
public synchronized Collection<Resolution> getSpatialResolutions() {
- return spatialResolutions;
+ return spatialResolutions = nonNullCollection(spatialResolutions, Resolution.class);
}
+ /**
+ * Sets the factor which provides a general understanding of the density of spatial data
+ * in the dataset.
+ *
+ * @param newValues The new spatial resolutions.
+ */
+ public synchronized void setSpatialResolutions(final Collection<? extends Resolution> newValues) {
+ spatialResolutions = copyCollection(newValues, spatialResolutions, Resolution.class);
+ }
+
+ /**
+ * Returns the language(s) used within the dataset.
+ */
@Override
+ @XmlElement(name = "language", required = true)
public synchronized Collection<Locale> getLanguages() {
- return languages;
+ return languages = nonNullCollection(languages, Locale.class);
+ }
+
+ /**
+ * Sets the language(s) used within the dataset.
+ *
+ * @param newValues The new languages.
+ */
+ public synchronized void setLanguages(final Collection<? extends Locale> newValues) {
+ languages = copyCollection(newValues, languages, Locale.class);
}
+ /**
+ * Returns the full name of the character coding standard used for the dataset.
+ */
@Override
+ @XmlElement(name = "characterSet")
public synchronized Collection<CharacterSet> getCharacterSets() {
- return characterSets;
+ return characterSets = nonNullCollection(characterSets, CharacterSet.class);
}
+ /**
+ * Sets the full name of the character coding standard used for the dataset.
+ *
+ * @param newValues The new character sets.
+ */
+ public synchronized void setCharacterSets(final Collection<? extends CharacterSet> newValues) {
+ characterSets = copyCollection(newValues, characterSets, CharacterSet.class);
+ }
+
+ /**
+ * Returns the main theme(s) of the dataset.
+ */
@Override
- public synchronized Collection<TopicCategory> getTopicCategories() {
- return topicCategories;
+ @XmlElement(name = "topicCategory")
+ public synchronized Collection<TopicCategory> getTopicCategories() {
+ return topicCategories = nonNullCollection(topicCategories, TopicCategory.class);
+ }
+
+ /**
+ * Sets the main theme(s) of the dataset.
+ *
+ * @param newValues The new topic categories.
+ */
+ public synchronized void setTopicCategories(final Collection<? extends TopicCategory> newValues) {
+ topicCategories = copyCollection(newValues, topicCategories, TopicCategory.class);
}
+ /**
+ * Returns a description of the dataset in the producer's processing environment. This includes
+ * items such as the software, the computer operating system, file name, and the dataset size.
+ */
@Override
+ @XmlElement(name = "environmentDescription")
public synchronized InternationalString getEnvironmentDescription() {
return environmentDescription;
}
+ /**
+ * Sets the description of the dataset in the producers processing environment.
+ *
+ * @param newValue The new environment description.
+ */
+ public synchronized void setEnvironmentDescription(final InternationalString newValue) {
+ checkWritePermission();
+ environmentDescription = newValue;
+ }
+
+ /**
+ * Returns additional extent information including the bounding polygon, vertical, and temporal
+ * extent of the dataset.
+ */
@Override
+ @XmlElement(name = "extent")
public synchronized Collection<Extent> getExtents() {
- return extents;
+ return extents = nonNullCollection(extents, Extent.class);
}
+ /**
+ * Sets additional extent information.
+ *
+ * @param newValues The new extents
+ */
+ public synchronized void setExtents(final Collection<? extends Extent> newValues) {
+ extents = copyCollection(newValues, extents, Extent.class);
+ }
+
+ /**
+ * Any other descriptive information about the dataset.
+ */
@Override
+ @XmlElement(name = "supplementalInformation")
public synchronized InternationalString getSupplementalInformation() {
return supplementalInformation;
}
+
+ /**
+ * Sets any other descriptive information about the dataset.
+ *
+ * @param newValue The new supplemental information.
+ */
+ public synchronized void setSupplementalInformation(final InternationalString newValue) {
+ checkWritePermission();
+ supplementalInformation = newValue;
+ }
}
Added: sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultKeywords.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultKeywords.java?rev=1459242&view=auto
==============================================================================
--- sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultKeywords.java (added)
+++ sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultKeywords.java [UTF-8] Thu Mar 21 11:47:50 2013
@@ -0,0 +1,163 @@
+/*
+ * 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.metadata.iso.identification;
+
+import java.util.Collection;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import org.opengis.util.InternationalString;
+import org.opengis.metadata.citation.Citation;
+import org.opengis.metadata.identification.Keywords;
+import org.opengis.metadata.identification.KeywordType;
+import org.apache.sis.metadata.iso.ISOMetadata;
+import org.apache.sis.util.iso.Types;
+
+
+/**
+ * Keywords, their type and reference source.
+ *
+ * @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
+ * @module
+ */
+@XmlType(name = "MD_Keywords_Type", propOrder = {
+ "keywords",
+ "type",
+ "thesaurusName"
+})
+@XmlRootElement(name = "MD_Keywords")
+public class DefaultKeywords extends ISOMetadata implements Keywords {
+ /**
+ * Serial number for compatibility with different versions.
+ */
+ private static final long serialVersionUID = 48691634443678266L;
+
+ /**
+ * Commonly used word(s) or formalised word(s) or phrase(s) used to describe the subject.
+ */
+ private Collection<InternationalString> keywords;
+
+ /**
+ * Subject matter used to group similar keywords.
+ */
+ private KeywordType type;
+
+ /**
+ * Name of the formally registered thesaurus or a similar authoritative source of keywords.
+ */
+ private Citation thesaurusName;
+
+ /**
+ * Constructs an initially empty keywords.
+ */
+ public DefaultKeywords() {
+ super();
+ }
+
+ /**
+ * Creates keywords initialized to the given key word.
+ *
+ * @param keyword Commonly used word or formalised word or phrase used to describe
+ * the subject, or {@code null} if none.
+ */
+ public DefaultKeywords(final CharSequence keyword) {
+ keywords = singleton(InternationalString.class, Types.toInternationalString(keyword));
+ }
+
+ /**
+ * Returns a SIS metadata implementation with the same values than the given arbitrary
+ * implementation. If the given object is {@code null}, then this method returns {@code null}.
+ * Otherwise if the given object is already a SIS implementation, then the given object is
+ * returned unchanged. Otherwise a new SIS implementation is created and initialized to the
+ * property values of the given object, using a <cite>shallow</cite> copy operation
+ * (i.e. properties are not cloned).
+ *
+ * @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.
+ */
+ public static DefaultKeywords castOrCopy(final Keywords object) {
+ if (object == null || object instanceof DefaultKeywords) {
+ return (DefaultKeywords) object;
+ }
+ final DefaultKeywords copy = new DefaultKeywords();
+ copy.shallowCopy(object);
+ return copy;
+ }
+
+ /**
+ * Returns commonly used word(s) or formalised word(s) or phrase(s) used to describe the subject.
+ */
+ @Override
+ @XmlElement(name = "keyword", required = true)
+ public synchronized Collection<InternationalString> getKeywords() {
+ return keywords = nonNullCollection(keywords, InternationalString.class);
+ }
+
+ /**
+ * Sets commonly used word(s) or formalised word(s) or phrase(s) used to describe the subject.
+ *
+ * @param newValues The new keywords.
+ */
+ public synchronized void setKeywords(final Collection<? extends InternationalString> newValues) {
+ keywords = copyCollection(newValues, keywords, InternationalString.class);
+ }
+
+ /**
+ * Returns the subject matter used to group similar keywords.
+ */
+ @Override
+ @XmlElement(name = "type")
+ public synchronized KeywordType getType() {
+ return type;
+ }
+
+ /**
+ * Sets the subject matter used to group similar keywords.
+ *
+ * @param newValue The new keyword type.
+ */
+ public synchronized void setType(final KeywordType newValue) {
+ checkWritePermission();
+ type = newValue;
+ }
+
+ /**
+ * Returns the name of the formally registered thesaurus
+ * or a similar authoritative source of keywords.
+ */
+ @Override
+ @XmlElement(name = "thesaurusName")
+ public synchronized Citation getThesaurusName() {
+ return thesaurusName;
+ }
+
+ /**
+ * Sets the name of the formally registered thesaurus or a similar authoritative source
+ * of keywords.
+ *
+ * @param newValue The new thesaurus name.
+ */
+ public synchronized void setThesaurusName(final Citation newValue) {
+ checkWritePermission();
+ thesaurusName = newValue;
+ }
+}
Propchange: sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultKeywords.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultKeywords.java
------------------------------------------------------------------------------
svn:mime-type = text/plain;charset=UTF-8
Modified: sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultRepresentativeFraction.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultRepresentativeFraction.java?rev=1459242&r1=1459241&r2=1459242&view=diff
==============================================================================
--- sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultRepresentativeFraction.java [UTF-8] (original)
+++ sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultRepresentativeFraction.java [UTF-8] Thu Mar 21 11:47:50 2013
@@ -16,45 +16,188 @@
*/
package org.apache.sis.metadata.iso.identification;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
import org.opengis.metadata.identification.RepresentativeFraction;
+import org.apache.sis.util.ArgumentChecks;
+import org.apache.sis.util.resources.Errors;
-public class DefaultRepresentativeFraction extends Number implements RepresentativeFraction {
+/**
+ * A scale defined as the inverse of a denominator.
+ * Scale is defined as a kind of {@link Number}.
+ *
+ * @author Cédric Briançon (Geomatys)
+ * @author Martin Desruisseaux (Geomatys)
+ * @since 0.3 (derived from geotk-2.4)
+ * @version 0.3
+ * @module
+ */
+@XmlType(name = "MD_RepresentativeFraction_Type")
+@XmlRootElement(name = "MD_RepresentativeFraction")
+public class DefaultRepresentativeFraction extends Number implements RepresentativeFraction {
+ /**
+ * Serial number for compatibility with different versions.
+ */
+ private static final long serialVersionUID = -715235893904309869L;
+
+ /**
+ * The number below the line in a vulgar fraction, or 0 if undefined.
+ */
private long denominator;
+ /**
+ * Creates a uninitialized representative fraction.
+ * The {@linkplain #getDenominator() denominator} is initially zero
+ * and the {@linkplain #doubleValue() double value} is NaN.
+ */
+ public DefaultRepresentativeFraction() {
+ }
+
+ /**
+ * Creates a new representative fraction from the specified denominator.
+ *
+ * @param denominator The denominator as a positive number, or 0 if unspecified.
+ * @throws IllegalArgumentException If the given value is not a positive number or zero.
+ */
+ public DefaultRepresentativeFraction(final long denominator) throws IllegalArgumentException {
+ ArgumentChecks.ensurePositive("denominator", denominator);
+ this.denominator = denominator;
+ }
+
+ /**
+ * Constructs a new representative fraction initialized to the value of the given object.
+ *
+ * @param source The representative fraction to copy, or {@code null} if none.
+ * @throws IllegalArgumentException If the given source is non-null and its denominator
+ * is not a positive number or zero.
+ */
+ public DefaultRepresentativeFraction(final RepresentativeFraction source) throws IllegalArgumentException {
+ if (source != null) {
+ denominator = source.getDenominator();
+ ArgumentChecks.ensurePositive("source", denominator);
+ }
+ }
+
+ /**
+ * Returns a SIS metadata implementation with the same values than the given arbitrary
+ * implementation. If the given object is {@code null}, then this method returns {@code null}.
+ * Otherwise if the given object is already a SIS implementation, then the given object is
+ * returned unchanged. Otherwise a new SIS implementation is created and initialized to the
+ * property values of the given object, using a <cite>shallow</cite> copy operation
+ * (i.e. properties are not cloned).
+ *
+ * @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.
+ */
+ public static DefaultRepresentativeFraction castOrCopy(final RepresentativeFraction object) {
+ return (object == null) || (object instanceof DefaultRepresentativeFraction)
+ ? (DefaultRepresentativeFraction) object : new DefaultRepresentativeFraction(object);
+ }
+
+ /**
+ * Returns the denominator of this representative fraction.
+ */
@Override
+ @XmlElement(name = "denominator", required = true)
public long getDenominator() {
return denominator;
}
+ /**
+ * Sets the denominator value.
+ *
+ * @param denominator The new denominator value, or 0 if none.
+ * @throws IllegalArgumentException If the given value is not a positive number or zero.
+ */
+ public void setDenominator(final long denominator) throws IllegalArgumentException {
+ ArgumentChecks.ensurePositive("denominator", denominator);
+ this.denominator = denominator;
+ }
+
+ /**
+ * Sets the denominator from a scale in the [-1 … +1] range.
+ * The denominator is computed by {@code round(1 / scale)}.
+ *
+ * @param scale The scale as a number between -1 and +1 inclusive, or NaN.
+ * @throws IllegalArgumentException if the given scale is our of range.
+ */
+ public void setScale(final double scale) throws IllegalArgumentException {
+ if (Math.abs(scale) > 1) {
+ throw new IllegalArgumentException(Errors.format(
+ Errors.Keys.ValueOutOfRange_4, "scale", -1, +1, scale));
+ }
+ // round(NaN) == 0, which is the desired value.
+ setDenominator(Math.round(1.0 / scale));
+ }
+
+ /**
+ * Returns the scale value of this representative fraction.
+ * This method is the converse of {@link #setScale(double)}.
+ *
+ * @return The scale value of this representative fraction, or NaN if none.
+ */
@Override
public double doubleValue() {
- return 1.0 / denominator;
+ return (denominator != 0) ? (1.0 / (double) denominator) : Double.NaN;
}
+ /**
+ * Returns the scale as a {@code float} type.
+ */
@Override
public float floatValue() {
- return 1f / denominator;
+ return (denominator != 0) ? (1.0f / (float) denominator) : Float.NaN;
}
+ /**
+ * Returns 1 if the {@linkplain #getDenominator() denominator} is equals to 1, or 0 otherwise.
+ *
+ * {@note This method is defined that way because scales smaller than 1 can
+ * only be casted to 0, and NaN values are also represented by 0.}
+ */
@Override
public long longValue() {
- return (long) doubleValue();
+ return (denominator == 1) ? 1 : 0;
}
+ /**
+ * Returns 1 if the {@linkplain #getDenominator() denominator} is equals to 1, or 0 otherwise.
+ *
+ * {@note This method is defined that way because scales smaller than 1 can
+ * only be casted to 0, and NaN values are also represented by 0.}
+ */
@Override
public int intValue() {
- return (int) doubleValue();
+ return (denominator == 1) ? 1 : 0;
}
+ /**
+ * Compares this object with the specified value for equality.
+ *
+ * @param object The object to compare with.
+ * @return {@code true} if both objects are equal.
+ */
@Override
public boolean equals(Object object) {
+ /*
+ * Note: 'equals(Object)' and 'hashCode()' implementations are defined in the interface,
+ * in order to ensure that the following requirements hold:
+ *
+ * - a.equals(b) == b.equals(a) (reflexivity)
+ * - a.equals(b) implies (a.hashCode() == b.hashCode())
+ */
if (object instanceof RepresentativeFraction) {
return ((RepresentativeFraction) object).getDenominator() == denominator;
}
return false;
}
+ /**
+ * Returns a hash value for this representative fraction.
+ */
@Override
public int hashCode() {
return (int) denominator;
Modified: sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultResolution.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultResolution.java?rev=1459242&r1=1459241&r2=1459242&view=diff
==============================================================================
--- sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultResolution.java [UTF-8] (original)
+++ sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultResolution.java [UTF-8] Thu Mar 21 11:47:50 2013
@@ -16,23 +16,121 @@
*/
package org.apache.sis.metadata.iso.identification;
+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.metadata.identification.RepresentativeFraction;
import org.opengis.metadata.identification.Resolution;
+// import org.apache.sis.internal.jaxb.gco.GO_Distance; // TODO
import org.apache.sis.metadata.iso.ISOMetadata;
+import org.apache.sis.measure.ValueRange;
-public class DefaultResolution extends ISOMetadata implements Resolution {
+/**
+ * Level of detail expressed as a scale factor or a ground distance.
+ *
+ * @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
+ * @module
+ */
+@XmlType(name = "MD_Resolution_Type", propOrder = {
+ "equivalentScale",
+ "distance"
+})
+@XmlRootElement(name = "MD_Resolution")
+public class DefaultResolution extends ISOMetadata implements Resolution {
+ /**
+ * Serial number for compatibility with different versions.
+ */
+ private static final long serialVersionUID = -4644465057871958482L;
+
+ /**
+ * Level of detail expressed as the scale of a comparable hardcopy map or chart.
+ * This value should be between 0 and 1.
+ * Only one of {@linkplain #getEquivalentScale() equivalent scale} and
+ * {@linkplain #getDistance() ground sample distance} may be provided.
+ */
private RepresentativeFraction equivalentScale;
+ /**
+ * Ground sample distance.
+ * Only one of {@linkplain #getEquivalentScale() equivalent scale} and
+ * {@linkplain #getDistance() ground sample distance} may be provided.
+ */
private Double distance;
+ /**
+ * Constructs an initially empty resolution.
+ */
+ public DefaultResolution() {
+ }
+
+ /**
+ * Returns a SIS metadata implementation with the same values than the given arbitrary
+ * implementation. If the given object is {@code null}, then this method returns {@code null}.
+ * Otherwise if the given object is already a SIS implementation, then the given object is
+ * returned unchanged. Otherwise a new SIS implementation is created and initialized to the
+ * property values of the given object, using a <cite>shallow</cite> copy operation
+ * (i.e. properties are not cloned).
+ *
+ * @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.
+ */
+ public static DefaultResolution castOrCopy(final Resolution object) {
+ if (object == null || object instanceof DefaultResolution) {
+ return (DefaultResolution) object;
+ }
+ final DefaultResolution copy = new DefaultResolution();
+ copy.shallowCopy(object);
+ return copy;
+ }
+
+ /**
+ * Returns the level of detail expressed as the scale of a comparable hardcopy map or chart.
+ * Only one of {@linkplain #getEquivalentScale() equivalent scale} and
+ * {@linkplain #getDistance() ground sample distance} may be provided.
+ */
@Override
- public synchronized RepresentativeFraction getEquivalentScale() {
+ @XmlElement(name = "equivalentScale")
+ public synchronized RepresentativeFraction getEquivalentScale() {
return equivalentScale;
}
+ /**
+ * Sets the level of detail expressed as the scale of a comparable hardcopy map or chart.
+ *
+ * @param newValue The new equivalent scale.
+ */
+ public synchronized void setEquivalentScale(final RepresentativeFraction newValue) {
+ checkWritePermission();
+ equivalentScale = newValue;
+ }
+
+ /**
+ * Returns the ground sample distance.
+ * Only one of {@linkplain #getEquivalentScale equivalent scale} and
+ * {@linkplain #getDistance ground sample distance} may be provided.
+ */
@Override
+ @ValueRange(minimum=0, isMinIncluded=false)
+// @XmlJavaTypeAdapter(GO_Distance.class) // TODO
+ @XmlElement(name = "distance")
public synchronized Double getDistance() {
return distance;
}
+
+ /**
+ * Sets the ground sample distance.
+ *
+ * @param newValue The new distance.
+ */
+ public synchronized void setDistance(final Double newValue) {
+ checkWritePermission();
+ distance = newValue;
+ }
}
Added: sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultServiceIdentification.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultServiceIdentification.java?rev=1459242&view=auto
==============================================================================
--- sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultServiceIdentification.java (added)
+++ sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultServiceIdentification.java [UTF-8] Thu Mar 21 11:47:50 2013
@@ -0,0 +1,72 @@
+/*
+ * 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.metadata.iso.identification;
+
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.XmlRootElement;
+import net.jcip.annotations.ThreadSafe;
+
+import org.opengis.metadata.identification.ServiceIdentification;
+
+
+/**
+ * Identification of capabilities which a service provider makes available to a service user
+ * through a set of interfaces that define a behaviour.
+ *
+ * @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
+ * @module
+ */
+@ThreadSafe
+@XmlType(name = "MD_ServiceIdentification_Type")
+@XmlRootElement(name = "SV_ServiceIdentification") // Prefix is really SV_ according ISO 19115 corrigendum.
+public class DefaultServiceIdentification extends AbstractIdentification implements ServiceIdentification {
+ /**
+ * Serial number for compatibility with different versions.
+ */
+ private static final long serialVersionUID = -8337161132057617851L;
+
+ /**
+ * Constructs an initially empty service identification.
+ */
+ public DefaultServiceIdentification() {
+ }
+
+ /**
+ * Returns a SIS metadata implementation with the same values than the given arbitrary
+ * implementation. If the given object is {@code null}, then this method returns {@code null}.
+ * Otherwise if the given object is already a SIS implementation, then the given object is
+ * returned unchanged. Otherwise a new SIS implementation is created and initialized to the
+ * property values of the given object, using a <cite>shallow</cite> copy operation
+ * (i.e. properties are not cloned).
+ *
+ * @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.
+ */
+ public static DefaultServiceIdentification castOrCopy(final ServiceIdentification object) {
+ if (object == null || object instanceof DefaultServiceIdentification) {
+ return (DefaultServiceIdentification) object;
+ }
+ final DefaultServiceIdentification copy = new DefaultServiceIdentification();
+ copy.shallowCopy(object);
+ return copy;
+ }
+}
Propchange: sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultServiceIdentification.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultServiceIdentification.java
------------------------------------------------------------------------------
svn:mime-type = text/plain;charset=UTF-8
Added: sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultUsage.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultUsage.java?rev=1459242&view=auto
==============================================================================
--- sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultUsage.java (added)
+++ sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultUsage.java [UTF-8] Thu Mar 21 11:47:50 2013
@@ -0,0 +1,199 @@
+/*
+ * 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.metadata.iso.identification;
+
+import java.util.Date;
+import java.util.Collection;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import org.opengis.util.InternationalString;
+import org.opengis.metadata.identification.Usage;
+import org.opengis.metadata.citation.ResponsibleParty;
+import org.apache.sis.metadata.iso.ISOMetadata;
+import org.apache.sis.util.iso.Types;
+
+
+/**
+ * Brief description of ways in which the resource(s) is/are currently used.
+ *
+ * @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
+ * @module
+ */
+@XmlType(name = "MD_Usage_Type", propOrder = {
+ "specificUsage",
+ "usageDate",
+ "userDeterminedLimitations",
+ "userContactInfo"
+})
+@XmlRootElement(name = "MD_Usage")
+public class DefaultUsage extends ISOMetadata implements Usage {
+ /**
+ * Serial number for compatibility with different versions.
+ */
+ private static final long serialVersionUID = 4059324536168287490L;
+
+ /**
+ * Brief description of the resource and/or resource series usage.
+ */
+ private InternationalString specificUsage;
+
+ /**
+ * Date and time of the first use or range of uses of the resource and/or resource series.
+ * Values are milliseconds elapsed since January 1st, 1970,
+ * or {@link Long#MIN_VALUE} if this value is not set.
+ */
+ private long usageDate;
+
+ /**
+ * Applications, determined by the user for which the resource and/or resource series
+ * is not suitable.
+ */
+ private InternationalString userDeterminedLimitations;
+
+ /**
+ * Identification of and means of communicating with person(s) and organization(s)
+ * using the resource(s).
+ */
+ private Collection<ResponsibleParty> userContactInfo;
+
+ /**
+ * Constructs an initially empty usage.
+ */
+ public DefaultUsage() {
+ usageDate = Long.MIN_VALUE;
+ }
+
+ /**
+ * Creates an usage initialized to the specified values.
+ *
+ * @param specificUsage Brief description of the resource and/or resource series usage, or {@code null} if none.
+ * @param userContactInfo Means of communicating with person(s) and organization(s), or {@code null} if none.
+ */
+ public DefaultUsage(final CharSequence specificUsage,
+ final ResponsibleParty userContactInfo)
+ {
+ this(); // Initialize the date field.
+ this.specificUsage = Types.toInternationalString(specificUsage);
+ this.userContactInfo = singleton(ResponsibleParty.class, userContactInfo);
+ }
+
+ /**
+ * Returns a SIS metadata implementation with the same values than the given arbitrary
+ * implementation. If the given object is {@code null}, then this method returns {@code null}.
+ * Otherwise if the given object is already a SIS implementation, then the given object is
+ * returned unchanged. Otherwise a new SIS implementation is created and initialized to the
+ * property values of the given object, using a <cite>shallow</cite> copy operation
+ * (i.e. properties are not cloned).
+ *
+ * @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.
+ */
+ public static DefaultUsage castOrCopy(final Usage object) {
+ if (object == null || object instanceof DefaultUsage) {
+ return (DefaultUsage) object;
+ }
+ final DefaultUsage copy = new DefaultUsage();
+ copy.shallowCopy(object);
+ return copy;
+ }
+
+ /**
+ * Returns a brief description of the resource and/or resource series usage.
+ */
+ @Override
+ @XmlElement(name = "specificUsage", required = true)
+ public synchronized InternationalString getSpecificUsage() {
+ return specificUsage;
+ }
+
+ /**
+ * Sets a brief description of the resource and/or resource series usage.
+ *
+ * @param newValue The new specific usage.
+ */
+ public synchronized void setSpecificUsage(final InternationalString newValue) {
+ checkWritePermission();
+ specificUsage = newValue;
+ }
+
+ /**
+ * Returns the date and time of the first use or range of uses
+ * of the resource and/or resource series.
+ */
+ @Override
+ @XmlElement(name = "usageDateTime")
+ public synchronized Date getUsageDate() {
+ return (usageDate != Long.MIN_VALUE) ? new Date(usageDate) : null;
+ }
+
+ /**
+ * Sets the date and time of the first use.
+ *
+ * @param newValue The new usage date.
+ */
+ public synchronized void setUsageDate(final Date newValue) {
+ checkWritePermission();
+ usageDate = (newValue != null) ? newValue.getTime() : Long.MIN_VALUE;
+ }
+
+ /**
+ * Returns applications, determined by the user for which the resource and/or resource series
+ * is not suitable.
+ */
+ @Override
+ @XmlElement(name = "userDeterminedLimitations")
+ public synchronized InternationalString getUserDeterminedLimitations() {
+ return userDeterminedLimitations;
+ }
+
+ /**
+ * Sets applications, determined by the user for which the resource and/or resource series
+ * is not suitable.
+ *
+ * @param newValue The new user determined limitations.
+ */
+ public synchronized void setUserDeterminedLimitations(final InternationalString newValue) {
+ checkWritePermission();
+ this.userDeterminedLimitations = newValue;
+ }
+
+ /**
+ * Returns identification of and means of communicating with person(s) and organization(s)
+ * using the resource(s).
+ */
+ @Override
+ @XmlElement(name = "userContactInfo", required = true)
+ public synchronized Collection<ResponsibleParty> getUserContactInfo() {
+ return userContactInfo = nonNullCollection(userContactInfo, ResponsibleParty.class);
+ }
+
+ /**
+ * Sets identification of and means of communicating with person(s) and organization(s)
+ * using the resource(s).
+ *
+ * @param newValues The new user contact info.
+ */
+ public synchronized void setUserContactInfo(final Collection<? extends ResponsibleParty> newValues) {
+ userContactInfo = copyCollection(newValues, userContactInfo, ResponsibleParty.class);
+ }
+}
Propchange: sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultUsage.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultUsage.java
------------------------------------------------------------------------------
svn:mime-type = text/plain;charset=UTF-8
Added: sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/package-info.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/package-info.java?rev=1459242&view=auto
==============================================================================
--- sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/package-info.java (added)
+++ sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/package-info.java [UTF-8] Thu Mar 21 11:47:50 2013
@@ -0,0 +1,84 @@
+/*
+ * 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.metadata.iso.identification.AbstractIdentification Identification} implementation.
+ * An explanation for this package is provided in the {@linkplain org.opengis.metadata.content OpenGIS® javadoc}.
+ * The remaining discussion on this page is specific to the SIS implementation.
+ *
+ * {@section Overview}
+ * For a global overview of metadata in SIS, see the
+ * <a href="{@docRoot}/../sis-metadata/index.html">Metadata page on the project web site</a>.
+ *
+ * @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
+ * @module
+ */
+@XmlSchema(elementFormDefault = XmlNsForm.QUALIFIED, namespace = Namespaces.GMD, xmlns = {
+ @XmlNs(prefix = "gmd", namespaceURI = Namespaces.GMD),
+ @XmlNs(prefix = "gco", namespaceURI = Namespaces.GCO),
+ @XmlNs(prefix = "xsi", namespaceURI = Namespaces.XSI)
+})
+@XmlAccessorType(XmlAccessType.NONE)
+@XmlJavaTypeAdapters({
+ @XmlJavaTypeAdapter(CI_Citation.class),
+ @XmlJavaTypeAdapter(CI_ResponsibleParty.class),
+ @XmlJavaTypeAdapter(DS_AssociationTypeCode.class),
+ @XmlJavaTypeAdapter(DS_InitiativeTypeCode.class),
+ @XmlJavaTypeAdapter(EX_Extent.class),
+ @XmlJavaTypeAdapter(MD_AggregateInformation.class),
+ @XmlJavaTypeAdapter(MD_BrowseGraphic.class),
+ @XmlJavaTypeAdapter(MD_CharacterSetCode.class),
+ @XmlJavaTypeAdapter(MD_Constraints.class),
+ @XmlJavaTypeAdapter(MD_Format.class),
+ @XmlJavaTypeAdapter(MD_Identifier.class),
+ @XmlJavaTypeAdapter(MD_Keywords.class),
+ @XmlJavaTypeAdapter(MD_KeywordTypeCode.class),
+ @XmlJavaTypeAdapter(MD_MaintenanceInformation.class),
+ @XmlJavaTypeAdapter(MD_ProgressCode.class),
+ @XmlJavaTypeAdapter(MD_RepresentativeFraction.class),
+ @XmlJavaTypeAdapter(MD_Resolution.class),
+ @XmlJavaTypeAdapter(MD_SpatialRepresentationTypeCode.class),
+ @XmlJavaTypeAdapter(MD_TopicCategoryCode.class),
+ @XmlJavaTypeAdapter(MD_Usage.class),
+
+ // Java types, primitive types and basic OGC types handling
+ @XmlJavaTypeAdapter(URIAdapter.class),
+ @XmlJavaTypeAdapter(LocaleAdapter.class),
+ @XmlJavaTypeAdapter(StringAdapter.class),
+ @XmlJavaTypeAdapter(InternationalStringAdapter.class),
+// @XmlJavaTypeAdapter(GO_DateTime.class), TODO
+ @XmlJavaTypeAdapter(GO_Decimal.class), @XmlJavaTypeAdapter(type=double.class, value=GO_Decimal.class),
+ @XmlJavaTypeAdapter(GO_Integer.AsLong.class), @XmlJavaTypeAdapter(type=long.class, value=GO_Integer.AsLong.class)
+})
+package org.apache.sis.metadata.iso.identification;
+
+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.gmd.*;
+import org.apache.sis.internal.jaxb.code.*;
+import org.apache.sis.internal.jaxb.metadata.*;
Propchange: sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/package-info.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/package-info.java
------------------------------------------------------------------------------
svn:mime-type = text/plain;charset=UTF-8