Author: desruisseaux
Date: Mon Feb 25 23:18:08 2013
New Revision: 1449958
URL: http://svn.apache.org/r1449958
Log:
Annotation which is going to be needed for the metadata implementation.
Added:
sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/internal/metadata/
sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/internal/metadata/ValueRange.java
(with props)
sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/internal/metadata/package-info.java
- copied, changed from r1449754,
sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/internal/util/package-info.java
Added:
sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/internal/metadata/ValueRange.java
URL:
http://svn.apache.org/viewvc/sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/internal/metadata/ValueRange.java?rev=1449958&view=auto
==============================================================================
---
sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/internal/metadata/ValueRange.java
(added)
+++
sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/internal/metadata/ValueRange.java
[UTF-8] Mon Feb 25 23:18:08 2013
@@ -0,0 +1,73 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sis.internal.metadata;
+
+import java.lang.annotation.Target;
+import java.lang.annotation.Retention;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.RetentionPolicy;
+
+
+/**
+ * The range of values that a method can return.
+ * This is used mostly for metadata objects performing runtime checks.
+ *
+ * <p>We do not put (yet) this annotation in public API because it may be
+ * replaced by some <cite>checker framework</cite> in a future JDK version.</p>
+ *
+ * @author Martin Desruisseaux (Geomatys)
+ * @since 0.3 (derived from geotk-3.04)
+ * @version 0.3
+ * @module
+ */
+@Target(ElementType.METHOD)
+@Retention(RetentionPolicy.RUNTIME)
+public @interface ValueRange {
+ /**
+ * Returns the minimal value that a method can return. The default value is
+ * {@linkplain Double#NEGATIVE_INFINITY negative infinity}, which means
that
+ * there is no minimal value.
+ *
+ * @return The minimal value.
+ */
+ double minimum() default Double.NEGATIVE_INFINITY;
+
+ /**
+ * Returns the maximal value that a method can return. The default value is
+ * {@linkplain Double#POSITIVE_INFINITY positive infinity}, which means
that
+ * there is no maximal value.
+ *
+ * @return The maximal value.
+ */
+ double maximum() default Double.POSITIVE_INFINITY;
+
+ /**
+ * {@code true} if the {@linkplain #minimum() minimal} value is inclusive,
or {@code false}
+ * if it is exclusive. By default the minimum value is inclusive.
+ *
+ * @return {@code true} if the minimum value is inclusive.
+ */
+ boolean isMinIncluded() default true;
+
+ /**
+ * {@code true} if the {@linkplain #maximum() maximal} value is inclusive,
or {@code false}
+ * if it is exclusive. By default the maximum value is
<strong>inclusive</strong>.
+ *
+ * @return {@code true} if the maximum value is inclusive.
+ */
+ boolean isMaxIncluded() default true;
+}
Propchange:
sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/internal/metadata/ValueRange.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/internal/metadata/ValueRange.java
------------------------------------------------------------------------------
svn:mime-type = text/plain;charset=UTF-8
Copied:
sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/internal/metadata/package-info.java
(from r1449754,
sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/internal/util/package-info.java)
URL:
http://svn.apache.org/viewvc/sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/internal/metadata/package-info.java?p2=sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/internal/metadata/package-info.java&p1=sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/internal/util/package-info.java&r1=1449754&r2=1449958&rev=1449958&view=diff
==============================================================================
---
sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/internal/util/package-info.java
[UTF-8] (original)
+++
sis/branches/JDK7/sis-metadata/src/main/java/org/apache/sis/internal/metadata/package-info.java
[UTF-8] Mon Feb 25 23:18:08 2013
@@ -23,15 +23,9 @@
* This package is for internal use by SIS only. Classes in this package
* may change in incompatible ways in any future version without notice.
*
- * {@section Note on serialization}
- * Developers should avoid putting serializable classes in this package as
much as possible,
- * since the serialization forms may be considered as a kind of API contract
(depending how
- * much strict we want to be regarding compatibility). This is not always
practical however,
- * so some serialized classes still exist in this package.
- *
* @author Martin Desruisseaux (Geomatys)
- * @since 0.3 (derived from geotk-2.0)
+ * @since 0.3 (derived from geotk-3.0)
* @version 0.3
* @module
*/
-package org.apache.sis.internal.util;
+package org.apache.sis.internal.metadata;