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/20 12:59:21 UTC
svn commit: r1458777 - in
/sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis: metadata/
metadata/iso/constraint/ referencing/
Author: desruisseaux
Date: Wed Mar 20 11:59:20 2013
New Revision: 1458777
URL: http://svn.apache.org/r1458777
Log:
Ported the metadata constraint package.
Added:
sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/iso/constraint/DefaultSecurityConstraints.java (with props)
sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/iso/constraint/package-info.java (with props)
Modified:
sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/ModifiableMetadata.java
sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/iso/constraint/DefaultConstraints.java
sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/iso/constraint/DefaultLegalConstraints.java
sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/referencing/DefaultReferenceIdentifier.java
Modified: sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/ModifiableMetadata.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/ModifiableMetadata.java?rev=1458777&r1=1458776&r2=1458777&view=diff
==============================================================================
--- sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/ModifiableMetadata.java [UTF-8] (original)
+++ sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/ModifiableMetadata.java [UTF-8] Wed Mar 20 11:59:20 2013
@@ -369,7 +369,7 @@ public abstract class ModifiableMetadata
* freeze() method is under progress. The source collection is already
* an unmodifiable instance created by unmodifiable(Object).
*/
- assert collectionType(elementType).isAssignableFrom(source.getClass());
+ assert collectionType(elementType).isInstance(source);
return (Collection<E>) source;
}
checkWritePermission();
@@ -403,15 +403,13 @@ public abstract class ModifiableMetadata
/**
* Returns the specified list, or a new one if {@code c} is null.
- * This is a convenience method for implementation of {@code getFoo()}
- * methods.
+ * This is a convenience method for implementation of {@code getFoo()} methods.
*
* @param <E> The type of elements in the list.
- * @param c The list to checks.
+ * @param c The existing list, or {@code null} if the list has not yet been created.
* @param elementType The element type (used only if {@code c} is null).
* @return {@code c}, or a new list if {@code c} is null.
*/
- // See the comments in nonNullCollection(...) for implementation notes.
protected final <E> List<E> nonNullList(final List<E> c, final Class<E> elementType) {
assert Thread.holdsLock(this);
if (c != null) {
@@ -428,15 +426,13 @@ public abstract class ModifiableMetadata
/**
* Returns the specified set, or a new one if {@code c} is null.
- * This is a convenience method for implementation of {@code getFoo()}
- * methods.
+ * This is a convenience method for implementation of {@code getFoo()} methods.
*
* @param <E> The type of elements in the set.
- * @param c The set to checks.
+ * @param c The existing set, or {@code null} if the set has not yet been created.
* @param elementType The element type (used only if {@code c} is null).
* @return {@code c}, or a new set if {@code c} is null.
*/
- // See the comments in nonNullCollection(...) for implementation notes.
protected final <E> Set<E> nonNullSet(final Set<E> c, final Class<E> elementType) {
assert Thread.holdsLock(this);
if (c != null) {
@@ -453,28 +449,25 @@ public abstract class ModifiableMetadata
/**
* Returns the specified collection, or a new one if {@code c} is null.
- * This is a convenience method for implementation of {@code getFoo()}
- * methods.
+ * This is a convenience method for implementation of {@code getFoo()} methods.
*
* {@section Choosing a collection type}
- * Implementations shall invoke {@link #nonNullList nonNullList} or {@link #nonNullSet
- * nonNullSet} instead than this method when the collection type is enforced by ISO
+ * Implementations shall invoke {@link #nonNullList nonNullList(…)} or {@link #nonNullSet
+ * nonNullSet(…)} instead than this method when the collection type is enforced by ISO
* specification. When the type is not enforced by the specification, some freedom are
* allowed at implementor choice. The default implementation invokes
* {@link #collectionType(Class)} in order to get a hint about whether a {@link List}
* or a {@link Set} should be used.
*
* @param <E> The type of elements in the collection.
- * @param c The collection to checks.
+ * @param c The existing collection, or {@code null} if the collection has not yet been created.
* @param elementType The element type (used only if {@code c} is null).
* @return {@code c}, or a new collection if {@code c} is null.
*/
- // Despite the javadoc claims, we do not yet return null during copy operations.
- // However a future version may do so if it appears worth on a performance point of view.
protected final <E> Collection<E> nonNullCollection(final Collection<E> c, final Class<E> elementType) {
assert Thread.holdsLock(this);
if (c != null) {
- assert collectionType(elementType).isAssignableFrom(c.getClass());
+ assert collectionType(elementType).isInstance(c);
return c.isEmpty() && isMarshaling() ? null : c;
}
if (isMarshaling()) {
@@ -497,6 +490,34 @@ public abstract class ModifiableMetadata
}
/**
+ * Creates a modifiable collection containing only the given value, if non-null.
+ * This is a convenience method for initializing fields in subclass constructors.
+ * This method should not be invoked in other context.
+ *
+ * <p>The collection type is selected as described in the
+ * {@link #nonNullCollection(Collection, Class)}.</p>
+ *
+ * @param <E> The type of elements in the collection.
+ * @param elementType The element type (used only if {@code value} is non-null).
+ * @param value The singleton value to put in the returned collection, or {@code null}.
+ * @return A new modifiable collection containing the given value, or {@code null} if
+ * the given value was null.
+ */
+ protected final <E> Collection<E> singleton(final Class<E> elementType, final E value) {
+ if (value == null) {
+ return null;
+ }
+ final Collection<E> collection;
+ if (useSet(elementType)) {
+ collection = new MutableSet<>(elementType);
+ } else {
+ collection = new MutableList<>(elementType);
+ }
+ collection.add(value);
+ return collection;
+ }
+
+ /**
* A checked set synchronized on the enclosing {@link ModifiableMetadata}.
* Used for mutable sets only.
*/
Modified: sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/iso/constraint/DefaultConstraints.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/iso/constraint/DefaultConstraints.java?rev=1458777&r1=1458776&r2=1458777&view=diff
==============================================================================
--- sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/iso/constraint/DefaultConstraints.java [UTF-8] (original)
+++ sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/iso/constraint/DefaultConstraints.java [UTF-8] Wed Mar 20 11:59:20 2013
@@ -13,20 +13,118 @@
* 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.
+ *
+ * This package contains documentation from OGC specifications.
+ * Open Geospatial Consortium's work is fully acknowledged here.
*/
package org.apache.sis.metadata.iso.constraint;
import java.util.Collection;
-import org.opengis.metadata.constraint.Constraints;
+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.util.InternationalString;
+import org.opengis.metadata.constraint.Constraints;
+import org.opengis.metadata.constraint.LegalConstraints;
+import org.opengis.metadata.constraint.SecurityConstraints;
import org.apache.sis.metadata.iso.ISOMetadata;
+import org.apache.sis.util.iso.Types;
+
+/**
+ * Restrictions on the access and use of a resource or metadata.
+ *
+ * @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_Constraints_Type")
+@XmlRootElement(name = "MD_Constraints")
+@XmlSeeAlso({
+ DefaultLegalConstraints.class,
+ DefaultSecurityConstraints.class
+})
public class DefaultConstraints extends ISOMetadata implements Constraints {
+ /**
+ * Serial number for inter-operability with different versions.
+ */
+ private static final long serialVersionUID = 1771854790746022204L;
+ /**
+ * Limitation affecting the fitness for use of the resource.
+ * Example: "<cite>not to be used for navigation</cite>".
+ */
private Collection<InternationalString> useLimitations;
+ /**
+ * Constructs an initially empty constraints.
+ */
+ public DefaultConstraints() {
+ }
+
+ /**
+ * Constructs a new constraints with the given {@linkplain #getUseLimitations() use limitation}.
+ *
+ * @param useLimitation The use limitation, or {@code null} if none.
+ */
+ public DefaultConstraints(final CharSequence useLimitation) {
+ useLimitations = singleton(InternationalString.class, Types.toInternationalString(useLimitation));
+ }
+
+ /**
+ * 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 LegalConstraints} and {@link SecurityConstraints}
+ * 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 DefaultConstraints castOrCopy(final Constraints object) {
+ if (object instanceof LegalConstraints) {
+ return DefaultLegalConstraints.castOrCopy((LegalConstraints) object);
+ }
+ if (object instanceof SecurityConstraints) {
+ return DefaultSecurityConstraints.castOrCopy((SecurityConstraints) object);
+ }
+ if (object == null || object instanceof DefaultConstraints) {
+ return (DefaultConstraints) object;
+ }
+ final DefaultConstraints copy = new DefaultConstraints();
+ copy.shallowCopy(object);
+ return copy;
+ }
+
+ /**
+ * Returns the limitation affecting the fitness for use of the resource.
+ * Example: "<cite>not to be used for navigation</cite>".
+ */
@Override
+ @XmlElement(name = "useLimitation")
public synchronized Collection<InternationalString> getUseLimitations() {
- return useLimitations;
+ return useLimitations = nonNullCollection(useLimitations, InternationalString.class);
+ }
+
+ /**
+ * Sets the limitation affecting the fitness for use of the resource.
+ * Example: "<cite>not to be used for navigation</cite>".
+ *
+ * @param newValues The new use limitations.
+ */
+ public synchronized void setUseLimitations(final Collection<? extends InternationalString> newValues) {
+ useLimitations = copyCollection(newValues, useLimitations, InternationalString.class);
}
}
Modified: sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/iso/constraint/DefaultLegalConstraints.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/iso/constraint/DefaultLegalConstraints.java?rev=1458777&r1=1458776&r2=1458777&view=diff
==============================================================================
--- sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/iso/constraint/DefaultLegalConstraints.java [UTF-8] (original)
+++ sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/iso/constraint/DefaultLegalConstraints.java [UTF-8] Wed Mar 20 11:59:20 2013
@@ -13,34 +13,148 @@
* 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.
+ *
+ * This package contains documentation from OGC specifications.
+ * Open Geospatial Consortium's work is fully acknowledged here.
*/
package org.apache.sis.metadata.iso.constraint;
import java.util.Collection;
-import org.opengis.metadata.constraint.LegalConstraints;
-import org.opengis.metadata.constraint.Restriction;
+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.constraint.Restriction;
+import org.opengis.metadata.constraint.LegalConstraints;
-public class DefaultLegalConstraints extends DefaultConstraints implements LegalConstraints {
+/**
+ * Restrictions and legal prerequisites for accessing and using the resource.
+ *
+ * @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_LegalConstraints_Type", propOrder = {
+ "accessConstraints",
+ "useConstraints",
+ "otherConstraints"
+})
+@XmlRootElement(name = "MD_LegalConstraints")
+public class DefaultLegalConstraints extends DefaultConstraints implements LegalConstraints {
+ /**
+ * Serial number for inter-operability with different versions.
+ */
+ private static final long serialVersionUID = -2891061818279024901L;
+
+ /**
+ * Access constraints applied to assure the protection of privacy or intellectual property,
+ * and any special restrictions or limitations on obtaining the resource.
+ */
private Collection<Restriction> accessConstraints;
+ /**
+ * Constraints applied to assure the protection of privacy or intellectual property,
+ * and any special restrictions or limitations or warnings on using the resource.
+ */
private Collection<Restriction> useConstraints;
+ /**
+ * Other restrictions and legal prerequisites for accessing and using the resource.
+ * Should be a non-empty value only if {@linkplain #getAccessConstraints() access constraints}
+ * or {@linkplain #getUseConstraints() use constraints} declares
+ * {@linkplain Restriction#OTHER_RESTRICTIONS other restrictions}.
+ */
private Collection<InternationalString> otherConstraints;
+ /**
+ * Constructs an initially empty constraints.
+ */
+ public DefaultLegalConstraints() {
+ }
+
+ /**
+ * 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 DefaultLegalConstraints castOrCopy(final LegalConstraints object) {
+ if (object == null || object instanceof DefaultLegalConstraints) {
+ return (DefaultLegalConstraints) object;
+ }
+ final DefaultLegalConstraints copy = new DefaultLegalConstraints();
+ copy.shallowCopy(object);
+ return copy;
+ }
+
+ /**
+ * Returns the access constraints applied to assure the protection of privacy or intellectual property,
+ * and any special restrictions or limitations on obtaining the resource.
+ */
@Override
+ @XmlElement(name = "accessConstraints")
public synchronized Collection<Restriction> getAccessConstraints() {
- return accessConstraints;
+ return accessConstraints = nonNullCollection(accessConstraints, Restriction.class);
+ }
+
+ /**
+ * Sets the access constraints applied to assure the protection of privacy or intellectual property,
+ * and any special restrictions or limitations on obtaining the resource.
+ *
+ * @param newValues The new access constraints.
+ */
+ public synchronized void setAccessConstraints(final Collection<? extends Restriction> newValues) {
+ accessConstraints = copyCollection(newValues, accessConstraints, Restriction.class);
}
+ /**
+ * Returns the constraints applied to assure the protection of privacy or intellectual property,
+ * and any special restrictions or limitations or warnings on using the resource.
+ */
@Override
+ @XmlElement(name = "useConstraints")
public synchronized Collection<Restriction> getUseConstraints() {
- return useConstraints;
+ return useConstraints = nonNullCollection(useConstraints, Restriction.class);
}
+ /**
+ * Sets the constraints applied to assure the protection of privacy or intellectual property,
+ * and any special restrictions or limitations or warnings on using the resource.
+ *
+ * @param newValues The new use constraints.
+ */
+ public synchronized void setUseConstraints(final Collection<? extends Restriction> newValues) {
+ useConstraints = copyCollection(newValues, useConstraints, Restriction.class);
+ }
+
+ /**
+ * Returns the other restrictions and legal prerequisites for accessing and using the resource.
+ * Should be a non-empty value only if {@linkplain #getAccessConstraints() access constraints}
+ * or {@linkplain #getUseConstraints() use constraints} declares
+ * {@linkplain Restriction#OTHER_RESTRICTIONS other restrictions}.
+ */
@Override
+ @XmlElement(name = "otherConstraints")
public synchronized Collection<InternationalString> getOtherConstraints() {
- return otherConstraints;
+ return otherConstraints = nonNullCollection(otherConstraints, InternationalString.class);
+ }
+
+ /**
+ * Sets the other restrictions and legal prerequisites for accessing and using the resource.
+ *
+ * @param newValues Other constraints.
+ */
+ public synchronized void setOtherConstraints(final Collection<? extends InternationalString> newValues) {
+ otherConstraints = copyCollection(newValues, otherConstraints, InternationalString.class);
}
}
Added: sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/iso/constraint/DefaultSecurityConstraints.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/iso/constraint/DefaultSecurityConstraints.java?rev=1458777&view=auto
==============================================================================
--- sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/iso/constraint/DefaultSecurityConstraints.java (added)
+++ sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/iso/constraint/DefaultSecurityConstraints.java [UTF-8] Wed Mar 20 11:59:20 2013
@@ -0,0 +1,187 @@
+/*
+ * 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.
+ *
+ * This package contains documentation from OGC specifications.
+ * Open Geospatial Consortium's work is fully acknowledged here.
+ */
+package org.apache.sis.metadata.iso.constraint;
+
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.opengis.util.InternationalString;
+import org.opengis.metadata.constraint.Classification;
+import org.opengis.metadata.constraint.SecurityConstraints;
+
+
+/**
+ * Handling restrictions imposed on the resource for national security or similar security concerns.
+ *
+ * @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_SecurityConstraints_Type", propOrder = {
+ "classification",
+ "userNote",
+ "classificationSystem",
+ "handlingDescription"
+})
+@XmlRootElement(name = "MD_SecurityConstraints")
+public class DefaultSecurityConstraints extends DefaultConstraints implements SecurityConstraints {
+ /**
+ * Serial number for inter-operability with different versions.
+ */
+ private static final long serialVersionUID = 6412833018607679734L;;
+
+ /**
+ * Name of the handling restrictions on the resource.
+ */
+ private Classification classification;
+
+ /**
+ * Explanation of the application of the legal constraints or other restrictions and legal
+ * prerequisites for obtaining and using the resource.
+ */
+ private InternationalString userNote;
+
+ /**
+ * Name of the classification system.
+ */
+ private InternationalString classificationSystem;
+
+ /**
+ * Additional information about the restrictions on handling the resource.
+ */
+ private InternationalString handlingDescription;
+
+ /**
+ * Creates an initially empty security constraints.
+ */
+ public DefaultSecurityConstraints() {
+ }
+
+ /**
+ * Creates a security constraints initialized with the specified classification.
+ *
+ * @param classification The name of the handling restrictions on the resource.
+ */
+ public DefaultSecurityConstraints(final Classification classification) {
+ this.classification = classification;
+ }
+
+ /**
+ * 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 DefaultSecurityConstraints castOrCopy(final SecurityConstraints object) {
+ if (object == null || object instanceof DefaultSecurityConstraints) {
+ return (DefaultSecurityConstraints) object;
+ }
+ final DefaultSecurityConstraints copy = new DefaultSecurityConstraints();
+ copy.shallowCopy(object);
+ return copy;
+ }
+
+ /**
+ * Returns the name of the handling restrictions on the resource.
+ */
+ @Override
+ @XmlElement(name = "classification", required = true)
+ public synchronized Classification getClassification() {
+ return classification;
+ }
+
+ /**
+ * Sets the name of the handling restrictions on the resource.
+ *
+ * @param newValue The new classification.
+ */
+ public synchronized void setClassification(final Classification newValue) {
+ checkWritePermission();
+ classification = newValue;
+ }
+
+ /**
+ * Returns the explanation of the application of the legal constraints or other restrictions and legal
+ * prerequisites for obtaining and using the resource.
+ */
+ @Override
+ @XmlElement(name = "userNote")
+ public synchronized InternationalString getUserNote() {
+ return userNote;
+ }
+
+ /**
+ * Sets the explanation of the application of the legal constraints or other restrictions and legal
+ * prerequisites for obtaining and using the resource.
+ *
+ * @param newValue The new user note.
+ */
+ public synchronized void setUserNote(final InternationalString newValue) {
+ checkWritePermission();
+ userNote = newValue;
+ }
+
+ /**
+ * Returns the name of the classification system.
+ */
+ @Override
+ @XmlElement(name = "classificationSystem")
+ public synchronized InternationalString getClassificationSystem() {
+ return classificationSystem;
+ }
+
+ /**
+ * Sets the name of the classification system.
+ *
+ * @param newValue The new classification system.
+ */
+ public synchronized void setClassificationSystem(final InternationalString newValue) {
+ checkWritePermission();
+ classificationSystem = newValue;
+ }
+
+ /**
+ * Returns the additional information about the restrictions on handling the resource.
+ */
+ @Override
+ @XmlElement(name = "handlingDescription")
+ public synchronized InternationalString getHandlingDescription() {
+ return handlingDescription;
+ }
+
+ /**
+ * Sets the additional information about the restrictions on handling the resource.
+ *
+ * @param newValue The new handling description.
+ */
+ public synchronized void setHandlingDescription(final InternationalString newValue) {
+ checkWritePermission();
+ handlingDescription = newValue;
+ }
+}
Propchange: sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/iso/constraint/DefaultSecurityConstraints.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/iso/constraint/DefaultSecurityConstraints.java
------------------------------------------------------------------------------
svn:mime-type = text/plain;charset=UTF-8
Added: sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/iso/constraint/package-info.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/iso/constraint/package-info.java?rev=1458777&view=auto
==============================================================================
--- sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/iso/constraint/package-info.java (added)
+++ sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/iso/constraint/package-info.java [UTF-8] Wed Mar 20 11:59:20 2013
@@ -0,0 +1,66 @@
+/*
+ * 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.
+ *
+ * This package contains documentation from OGC specifications.
+ * Open Geospatial Consortium's work is fully acknowledged here.
+ */
+
+/**
+ * {@linkplain org.apache.sis.metadata.iso.constraint.DefaultConstraints Constraints} implementation.
+ * An explanation for this package is provided in the {@linkplain org.opengis.metadata.constraint 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>.
+ *
+ * {@section Parameterized types}
+ * In GeoAPI interfaces, most collections are typed with wildcards, for example {@code Collection<? extends Citation>}.
+ * The SIS implementation removes the wildcards and declares {@code Collection<Citation>} instead.
+ * This allows collections to be <cite>live</cite>: it is possible to add new elements directly in
+ * an existing collection using code like {@code getCitations().add(myCitation)} instead than
+ * setting the collection as a whole with {@code setCitations(myCitations)}.
+ *
+ * @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(MD_ClassificationCode.class),
+ @XmlJavaTypeAdapter(MD_RestrictionCode.class),
+ @XmlJavaTypeAdapter(InternationalStringAdapter.class)
+})
+package org.apache.sis.metadata.iso.constraint;
+
+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.code.*;
Propchange: sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/iso/constraint/package-info.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/metadata/iso/constraint/package-info.java
------------------------------------------------------------------------------
svn:mime-type = text/plain;charset=UTF-8
Modified: sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/referencing/DefaultReferenceIdentifier.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/referencing/DefaultReferenceIdentifier.java?rev=1458777&r1=1458776&r2=1458777&view=diff
==============================================================================
--- sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/referencing/DefaultReferenceIdentifier.java [UTF-8] (original)
+++ sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/referencing/DefaultReferenceIdentifier.java [UTF-8] Wed Mar 20 11:59:20 2013
@@ -14,8 +14,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * This package contains documentation from OpenGIS specifications.
- * OpenGIS consortium's work is fully acknowledged here.
+ * This package contains documentation from OGC specifications.
+ * Open Geospatial Consortium's work is fully acknowledged here.
*/
package org.apache.sis.referencing;