You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sis.apache.org by tl...@apache.org on 2013/08/25 17:49:59 UTC
svn commit: r1517321 [8/16] - in /sis/branches/Shapefile: ./ application/
application/sis-console/ application/sis-console/src/main/artifact/
application/sis-console/src/main/java/org/apache/sis/console/
application/sis-console/src/main/resources/org/a...
Modified: sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultCompletenessOmission.java
URL: http://svn.apache.org/viewvc/sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultCompletenessOmission.java?rev=1517321&r1=1517320&r2=1517321&view=diff
==============================================================================
--- sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultCompletenessOmission.java [UTF-8] (original)
+++ sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultCompletenessOmission.java [UTF-8] Sun Aug 25 15:49:51 2013
@@ -49,7 +49,7 @@ public class DefaultCompletenessOmission
* This is a <cite>shallow</cite> copy constructor, since the other metadata contained in the
* given object are not recursively copied.
*
- * @param object The metadata to copy values from.
+ * @param object The metadata to copy values from, or {@code null} if none.
*
* @see #castOrCopy(CompletenessOmission)
*/
Modified: sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultConceptualConsistency.java
URL: http://svn.apache.org/viewvc/sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultConceptualConsistency.java?rev=1517321&r1=1517320&r2=1517321&view=diff
==============================================================================
--- sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultConceptualConsistency.java [UTF-8] (original)
+++ sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultConceptualConsistency.java [UTF-8] Sun Aug 25 15:49:51 2013
@@ -51,7 +51,7 @@ public class DefaultConceptualConsistenc
* This is a <cite>shallow</cite> copy constructor, since the other metadata contained in the
* given object are not recursively copied.
*
- * @param object The metadata to copy values from.
+ * @param object The metadata to copy values from, or {@code null} if none.
*
* @see #castOrCopy(ConceptualConsistency)
*/
Modified: sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultConformanceResult.java
URL: http://svn.apache.org/viewvc/sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultConformanceResult.java?rev=1517321&r1=1517320&r2=1517321&view=diff
==============================================================================
--- sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultConformanceResult.java [UTF-8] (original)
+++ sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultConformanceResult.java [UTF-8] Sun Aug 25 15:49:51 2013
@@ -94,15 +94,17 @@ public class DefaultConformanceResult ex
* This is a <cite>shallow</cite> copy constructor, since the other metadata contained in the
* given object are not recursively copied.
*
- * @param object The metadata to copy values from.
+ * @param object The metadata to copy values from, or {@code null} if none.
*
* @see #castOrCopy(ConformanceResult)
*/
public DefaultConformanceResult(final ConformanceResult object) {
super(object);
- specification = object.getSpecification();
- explanation = object.getExplanation();
- pass = object.pass();
+ if (object != null) {
+ specification = object.getSpecification();
+ explanation = object.getExplanation();
+ pass = object.pass();
+ }
}
/**
@@ -131,8 +133,9 @@ public class DefaultConformanceResult ex
}
/**
- * Returns the citation of product specification or user
- * requirement against which data is being evaluated.
+ * Returns the citation of product specification or user requirement against which data is being evaluated.
+ *
+ * @return Citation of product specification or user requirement, or {@code null}.
*/
@Override
@XmlElement(name = "specification", required = true)
@@ -141,8 +144,7 @@ public class DefaultConformanceResult ex
}
/**
- * Sets the citation of product specification or user requirement against which data
- * is being evaluated.
+ * Sets the citation of product specification or user requirement against which data is being evaluated.
*
* @param newValue The new specification.
*/
@@ -153,6 +155,8 @@ public class DefaultConformanceResult ex
/**
* Returns the explanation of the meaning of conformance for this result.
+ *
+ * @return Explanation of the meaning of conformance, or {@code null}.
*/
@Override
@XmlElement(name = "explanation", required = true)
@@ -172,6 +176,8 @@ public class DefaultConformanceResult ex
/**
* Returns an indication of the conformance result.
+ *
+ * @return Indication of the conformance result, or {@code null}.
*/
@Override
public Boolean pass() {
Modified: sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultCoverageResult.java
URL: http://svn.apache.org/viewvc/sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultCoverageResult.java?rev=1517321&r1=1517320&r2=1517321&view=diff
==============================================================================
--- sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultCoverageResult.java [UTF-8] (original)
+++ sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultCoverageResult.java [UTF-8] Sun Aug 25 15:49:51 2013
@@ -88,17 +88,19 @@ public class DefaultCoverageResult exten
* This is a <cite>shallow</cite> copy constructor, since the other metadata contained in the
* given object are not recursively copied.
*
- * @param object The metadata to copy values from.
+ * @param object The metadata to copy values from, or {@code null} if none.
*
* @see #castOrCopy(CoverageResult)
*/
public DefaultCoverageResult(final CoverageResult object) {
super(object);
- spatialRepresentationType = object.getSpatialRepresentationType();
- resultSpatialRepresentation = object.getResultSpatialRepresentation();
- resultContentDescription = object.getResultContentDescription();
- resultFormat = object.getResultFormat();
- resultFile = object.getResultFile();
+ if (object != null) {
+ spatialRepresentationType = object.getSpatialRepresentationType();
+ resultSpatialRepresentation = object.getResultSpatialRepresentation();
+ resultContentDescription = object.getResultContentDescription();
+ resultFormat = object.getResultFormat();
+ resultFile = object.getResultFile();
+ }
}
/**
@@ -128,6 +130,8 @@ public class DefaultCoverageResult exten
/**
* Returns the method used to spatially represent the coverage result.
+ *
+ * @return Spatial representation of the coverage result, or {@code null}.
*/
@Override
@XmlElement(name = "spatialRepresentationType", namespace = Namespaces.GMI, required = true)
@@ -147,6 +151,8 @@ public class DefaultCoverageResult exten
/**
* Returns the digital representation of data quality measures composing the coverage result.
+ *
+ * @return Digital representation of data quality measures composing the coverage result, or {@code null}.
*/
@Override
@XmlElement(name = "resultSpatialRepresentation", namespace = Namespaces.GMI, required = true)
@@ -167,6 +173,8 @@ public class DefaultCoverageResult exten
/**
* Returns the description of the content of the result coverage, i.e. semantic definition
* of the data quality measures.
+ *
+ * @return Description of the content of the result coverage, or {@code null}.
*/
@Override
@XmlElement(name = "resultContentDescription", namespace = Namespaces.GMI, required = true)
@@ -187,6 +195,8 @@ public class DefaultCoverageResult exten
/**
* Returns the information about the format of the result coverage data.
+ *
+ * @return Format of the result coverage data, or {@code null}.
*/
@Override
@XmlElement(name = "resultFormat", namespace = Namespaces.GMI, required = true)
@@ -206,6 +216,8 @@ public class DefaultCoverageResult exten
/**
* Returns the information about the data file containing the result coverage data.
+ *
+ * @return Data file containing the result coverage data, or {@code null}.
*/
@Override
@XmlElement(name = "resultFile", namespace = Namespaces.GMX, required = true)
Modified: sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultDataQuality.java
URL: http://svn.apache.org/viewvc/sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultDataQuality.java?rev=1517321&r1=1517320&r2=1517321&view=diff
==============================================================================
--- sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultDataQuality.java [UTF-8] (original)
+++ sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultDataQuality.java [UTF-8] Sun Aug 25 15:49:51 2013
@@ -91,15 +91,17 @@ public class DefaultDataQuality extends
* This is a <cite>shallow</cite> copy constructor, since the other metadata contained in the
* given object are not recursively copied.
*
- * @param object The metadata to copy values from.
+ * @param object The metadata to copy values from, or {@code null} if none.
*
* @see #castOrCopy(DataQuality)
*/
public DefaultDataQuality(final DataQuality object) {
super(object);
- scope = object.getScope();
- reports = copyCollection(object.getReports(), Element.class);
- lineage = object.getLineage();
+ if (object != null) {
+ scope = object.getScope();
+ reports = copyCollection(object.getReports(), Element.class);
+ lineage = object.getLineage();
+ }
}
/**
@@ -129,6 +131,8 @@ public class DefaultDataQuality extends
/**
* Returns the specific data to which the data quality information applies.
+ *
+ * @return The specific data to which the data quality information applies, or {@code null}.
*/
@Override
@XmlElement(name = "scope", required = true)
@@ -149,7 +153,7 @@ public class DefaultDataQuality extends
/**
* Returns the quantitative quality information for the data specified by the scope.
*
- * @return The quantitative quality information.
+ * @return Quantitative quality information for the data.
*/
@Override
@XmlElement(name = "report")
@@ -167,8 +171,9 @@ public class DefaultDataQuality extends
}
/**
- * Returns non-quantitative quality information about the lineage of the data specified
- * by the scope.
+ * Returns non-quantitative quality information about the lineage of the data specified by the scope.
+ *
+ * @return Non-quantitative quality information about the lineage of the data specified, or {@code null}.
*/
@Override
@XmlElement(name = "lineage")
@@ -177,8 +182,7 @@ public class DefaultDataQuality extends
}
/**
- * Sets the non-quantitative quality information about the lineage of the data specified
- * by the scope.
+ * Sets the non-quantitative quality information about the lineage of the data specified by the scope.
*
* @param newValue The new lineage.
*/
Modified: sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultDomainConsistency.java
URL: http://svn.apache.org/viewvc/sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultDomainConsistency.java?rev=1517321&r1=1517320&r2=1517321&view=diff
==============================================================================
--- sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultDomainConsistency.java [UTF-8] (original)
+++ sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultDomainConsistency.java [UTF-8] Sun Aug 25 15:49:51 2013
@@ -49,7 +49,7 @@ public class DefaultDomainConsistency ex
* This is a <cite>shallow</cite> copy constructor, since the other metadata contained in the
* given object are not recursively copied.
*
- * @param object The metadata to copy values from.
+ * @param object The metadata to copy values from, or {@code null} if none.
*
* @see #castOrCopy(DomainConsistency)
*/
Modified: sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultFormatConsistency.java
URL: http://svn.apache.org/viewvc/sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultFormatConsistency.java?rev=1517321&r1=1517320&r2=1517321&view=diff
==============================================================================
--- sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultFormatConsistency.java [UTF-8] (original)
+++ sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultFormatConsistency.java [UTF-8] Sun Aug 25 15:49:51 2013
@@ -50,7 +50,7 @@ public class DefaultFormatConsistency ex
* This is a <cite>shallow</cite> copy constructor, since the other metadata contained in the
* given object are not recursively copied.
*
- * @param object The metadata to copy values from.
+ * @param object The metadata to copy values from, or {@code null} if none.
*
* @see #castOrCopy(FormatConsistency)
*/
Modified: sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultGriddedDataPositionalAccuracy.java
URL: http://svn.apache.org/viewvc/sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultGriddedDataPositionalAccuracy.java?rev=1517321&r1=1517320&r2=1517321&view=diff
==============================================================================
--- sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultGriddedDataPositionalAccuracy.java [UTF-8] (original)
+++ sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultGriddedDataPositionalAccuracy.java [UTF-8] Sun Aug 25 15:49:51 2013
@@ -51,7 +51,7 @@ public class DefaultGriddedDataPositiona
* This is a <cite>shallow</cite> copy constructor, since the other metadata contained in the
* given object are not recursively copied.
*
- * @param object The metadata to copy values from.
+ * @param object The metadata to copy values from, or {@code null} if none.
*
* @see #castOrCopy(GriddedDataPositionalAccuracy)
*/
Modified: sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultNonQuantitativeAttributeAccuracy.java
URL: http://svn.apache.org/viewvc/sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultNonQuantitativeAttributeAccuracy.java?rev=1517321&r1=1517320&r2=1517321&view=diff
==============================================================================
--- sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultNonQuantitativeAttributeAccuracy.java [UTF-8] (original)
+++ sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultNonQuantitativeAttributeAccuracy.java [UTF-8] Sun Aug 25 15:49:51 2013
@@ -50,7 +50,7 @@ public class DefaultNonQuantitativeAttri
* This is a <cite>shallow</cite> copy constructor, since the other metadata contained in the
* given object are not recursively copied.
*
- * @param object The metadata to copy values from.
+ * @param object The metadata to copy values from, or {@code null} if none.
*
* @see #castOrCopy(NonQuantitativeAttributeAccuracy)
*/
Modified: sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultQuantitativeAttributeAccuracy.java
URL: http://svn.apache.org/viewvc/sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultQuantitativeAttributeAccuracy.java?rev=1517321&r1=1517320&r2=1517321&view=diff
==============================================================================
--- sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultQuantitativeAttributeAccuracy.java [UTF-8] (original)
+++ sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultQuantitativeAttributeAccuracy.java [UTF-8] Sun Aug 25 15:49:51 2013
@@ -51,7 +51,7 @@ public class DefaultQuantitativeAttribut
* This is a <cite>shallow</cite> copy constructor, since the other metadata contained in the
* given object are not recursively copied.
*
- * @param object The metadata to copy values from.
+ * @param object The metadata to copy values from, or {@code null} if none.
*
* @see #castOrCopy(QuantitativeAttributeAccuracy)
*/
Modified: sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultQuantitativeResult.java
URL: http://svn.apache.org/viewvc/sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultQuantitativeResult.java?rev=1517321&r1=1517320&r2=1517321&view=diff
==============================================================================
--- sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultQuantitativeResult.java [UTF-8] (original)
+++ sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultQuantitativeResult.java [UTF-8] Sun Aug 25 15:49:51 2013
@@ -37,7 +37,7 @@ import org.opengis.util.RecordType;
* @module
*/
@XmlType(name = "DQ_QuantitativeResult_Type", propOrder = {
-// TODO "valueType",
+ "valueType",
"valueUnit",
"errorStatistic"
})
@@ -79,16 +79,18 @@ public class DefaultQuantitativeResult e
* This is a <cite>shallow</cite> copy constructor, since the other metadata contained in the
* given object are not recursively copied.
*
- * @param object The metadata to copy values from.
+ * @param object The metadata to copy values from, or {@code null} if none.
*
* @see #castOrCopy(QuantitativeResult)
*/
public DefaultQuantitativeResult(final QuantitativeResult object) {
super(object);
- valueType = object.getValueType();
- valueUnit = object.getValueUnit();
- errorStatistic = object.getErrorStatistic();
- values = copyList(object.getValues(), Record.class);
+ if (object != null) {
+ valueType = object.getValueType();
+ valueUnit = object.getValueUnit();
+ errorStatistic = object.getErrorStatistic();
+ values = copyList(object.getValues(), Record.class);
+ }
}
/**
@@ -118,6 +120,8 @@ public class DefaultQuantitativeResult e
/**
* Returns the quantitative value or values, content determined by the evaluation procedure used.
+ *
+ * @return Quantitative value or values.
*/
@Override
// @XmlElement(name = "value", required = true) // TODO
@@ -135,16 +139,18 @@ public class DefaultQuantitativeResult e
}
/**
- * Return the value type for reporting a data quality result, or {@code null} if none.
+ * Return the value type for reporting a data quality result.
+ *
+ * @return Value type for reporting a data quality result, or {@code null}.
*/
@Override
- // TODO @XmlElement(name = "valueType")
+ @XmlElement(name = "valueType")
public RecordType getValueType() {
return valueType;
}
/**
- * Sets the value type for reporting a data quality result, or {@code null} if none.
+ * Sets the value type for reporting a data quality result.
*
* @param newValue The new value type.
*/
@@ -154,7 +160,9 @@ public class DefaultQuantitativeResult e
}
/**
- * Returns the value unit for reporting a data quality result, or {@code null} if none.
+ * Returns the value unit for reporting a data quality result.
+ *
+ * @return Value unit for reporting a data quality result, or {@code null}.
*/
@Override
@XmlElement(name = "valueUnit", required = true)
@@ -163,7 +171,7 @@ public class DefaultQuantitativeResult e
}
/**
- * Sets the value unit for reporting a data quality result, or {@code null} if none.
+ * Sets the value unit for reporting a data quality result.
*
* @param newValue The new value unit.
*/
@@ -173,7 +181,9 @@ public class DefaultQuantitativeResult e
}
/**
- * Returns the statistical method used to determine the value, or {@code null} if none.
+ * Returns the statistical method used to determine the value.
+ *
+ * @return Statistical method used to determine the value, or {@code null}.
*/
@Override
@XmlElement(name = "errorStatistic")
Modified: sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultRelativeInternalPositionalAccuracy.java
URL: http://svn.apache.org/viewvc/sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultRelativeInternalPositionalAccuracy.java?rev=1517321&r1=1517320&r2=1517321&view=diff
==============================================================================
--- sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultRelativeInternalPositionalAccuracy.java [UTF-8] (original)
+++ sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultRelativeInternalPositionalAccuracy.java [UTF-8] Sun Aug 25 15:49:51 2013
@@ -52,7 +52,7 @@ public class DefaultRelativeInternalPosi
* This is a <cite>shallow</cite> copy constructor, since the other metadata contained in the
* given object are not recursively copied.
*
- * @param object The metadata to copy values from.
+ * @param object The metadata to copy values from, or {@code null} if none.
*
* @see #castOrCopy(RelativeInternalPositionalAccuracy)
*/
Modified: sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultScope.java
URL: http://svn.apache.org/viewvc/sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultScope.java?rev=1517321&r1=1517320&r2=1517321&view=diff
==============================================================================
--- sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultScope.java [UTF-8] (original)
+++ sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultScope.java [UTF-8] Sun Aug 25 15:49:51 2013
@@ -83,15 +83,17 @@ public class DefaultScope extends ISOMet
* This is a <cite>shallow</cite> copy constructor, since the other metadata contained in the
* given object are not recursively copied.
*
- * @param object The metadata to copy values from.
+ * @param object The metadata to copy values from, or {@code null} if none.
*
* @see #castOrCopy(Scope)
*/
public DefaultScope(final Scope object) {
super(object);
- level = object.getLevel();
- extent = object.getExtent();
- levelDescription = copyCollection(object.getLevelDescription(), ScopeDescription.class);
+ if (object != null) {
+ level = object.getLevel();
+ extent = object.getExtent();
+ levelDescription = copyCollection(object.getLevelDescription(), ScopeDescription.class);
+ }
}
/**
@@ -121,6 +123,8 @@ public class DefaultScope extends ISOMet
/**
* Returns the hierarchical level of the data specified by the scope.
+ *
+ * @return Hierarchical level of the data, or {@code null}.
*/
@Override
@XmlElement(name = "level", required = true)
@@ -140,6 +144,8 @@ public class DefaultScope extends ISOMet
/**
* Returns detailed descriptions about the level of the data specified by the scope.
+ *
+ * @return Detailed description about the level of the data.
*/
@Override
@XmlElement(name = "levelDescription")
@@ -157,8 +163,9 @@ public class DefaultScope extends ISOMet
}
/**
- * Information about the spatial, vertical and temporal extent of the data specified by the
- * scope.
+ * Information about the spatial, vertical and temporal extent of the data specified by the scope.
+ *
+ * @return Information about the extent of the data, or {@code null}.
*/
@Override
@XmlElement(name = "extent")
Modified: sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultTemporalConsistency.java
URL: http://svn.apache.org/viewvc/sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultTemporalConsistency.java?rev=1517321&r1=1517320&r2=1517321&view=diff
==============================================================================
--- sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultTemporalConsistency.java [UTF-8] (original)
+++ sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultTemporalConsistency.java [UTF-8] Sun Aug 25 15:49:51 2013
@@ -49,7 +49,7 @@ public class DefaultTemporalConsistency
* This is a <cite>shallow</cite> copy constructor, since the other metadata contained in the
* given object are not recursively copied.
*
- * @param object The metadata to copy values from.
+ * @param object The metadata to copy values from, or {@code null} if none.
*
* @see #castOrCopy(TemporalConsistency)
*/
Modified: sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultTemporalValidity.java
URL: http://svn.apache.org/viewvc/sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultTemporalValidity.java?rev=1517321&r1=1517320&r2=1517321&view=diff
==============================================================================
--- sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultTemporalValidity.java [UTF-8] (original)
+++ sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultTemporalValidity.java [UTF-8] Sun Aug 25 15:49:51 2013
@@ -49,7 +49,7 @@ public class DefaultTemporalValidity ext
* This is a <cite>shallow</cite> copy constructor, since the other metadata contained in the
* given object are not recursively copied.
*
- * @param object The metadata to copy values from.
+ * @param object The metadata to copy values from, or {@code null} if none.
*
* @see #castOrCopy(TemporalValidity)
*/
Modified: sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultThematicClassificationCorrectness.java
URL: http://svn.apache.org/viewvc/sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultThematicClassificationCorrectness.java?rev=1517321&r1=1517320&r2=1517321&view=diff
==============================================================================
--- sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultThematicClassificationCorrectness.java [UTF-8] (original)
+++ sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultThematicClassificationCorrectness.java [UTF-8] Sun Aug 25 15:49:51 2013
@@ -51,7 +51,7 @@ public class DefaultThematicClassificati
* This is a <cite>shallow</cite> copy constructor, since the other metadata contained in the
* given object are not recursively copied.
*
- * @param object The metadata to copy values from.
+ * @param object The metadata to copy values from, or {@code null} if none.
*
* @see #castOrCopy(ThematicClassificationCorrectness)
*/
Modified: sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultTopologicalConsistency.java
URL: http://svn.apache.org/viewvc/sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultTopologicalConsistency.java?rev=1517321&r1=1517320&r2=1517321&view=diff
==============================================================================
--- sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultTopologicalConsistency.java [UTF-8] (original)
+++ sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultTopologicalConsistency.java [UTF-8] Sun Aug 25 15:49:51 2013
@@ -52,7 +52,7 @@ public class DefaultTopologicalConsisten
* This is a <cite>shallow</cite> copy constructor, since the other metadata contained in the
* given object are not recursively copied.
*
- * @param object The metadata to copy values from.
+ * @param object The metadata to copy values from, or {@code null} if none.
*
* @see #castOrCopy(TopologicalConsistency)
*/
Modified: sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultUsability.java
URL: http://svn.apache.org/viewvc/sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultUsability.java?rev=1517321&r1=1517320&r2=1517321&view=diff
==============================================================================
--- sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultUsability.java [UTF-8] (original)
+++ sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultUsability.java [UTF-8] Sun Aug 25 15:49:51 2013
@@ -50,7 +50,7 @@ public class DefaultUsability extends Ab
* This is a <cite>shallow</cite> copy constructor, since the other metadata contained in the
* given object are not recursively copied.
*
- * @param object The metadata to copy values from.
+ * @param object The metadata to copy values from, or {@code null} if none.
*
* @see #castOrCopy(Usability)
*/
Modified: sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/package-info.java
URL: http://svn.apache.org/viewvc/sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/package-info.java?rev=1517321&r1=1517320&r2=1517321&view=diff
==============================================================================
--- sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/package-info.java [UTF-8] (original)
+++ sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/package-info.java [UTF-8] Sun Aug 25 15:49:51 2013
@@ -139,11 +139,11 @@
@XmlJavaTypeAdapter(MX_DataFile.class),
// Java types, primitive types and basic OGC types handling
-// @XmlJavaTypeAdapter(UnitAdapter.class), // TODO
+ @XmlJavaTypeAdapter(UnitAdapter.class),
@XmlJavaTypeAdapter(StringAdapter.class),
@XmlJavaTypeAdapter(InternationalStringAdapter.class),
-// @XmlJavaTypeAdapter(GO_DateTime.class), // TODO
-// @XmlJavaTypeAdapter(GO_RecordType.class), // TODO
+ @XmlJavaTypeAdapter(GO_DateTime.class),
+ @XmlJavaTypeAdapter(GO_RecordType.class),
@XmlJavaTypeAdapter(GO_Boolean.class), @XmlJavaTypeAdapter(type=boolean.class, value=GO_Boolean.class)
})
package org.apache.sis.metadata.iso.quality;
Modified: sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/AbstractGeolocationInformation.java
URL: http://svn.apache.org/viewvc/sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/AbstractGeolocationInformation.java?rev=1517321&r1=1517320&r2=1517321&view=diff
==============================================================================
--- sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/AbstractGeolocationInformation.java [UTF-8] (original)
+++ sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/AbstractGeolocationInformation.java [UTF-8] Sun Aug 25 15:49:51 2013
@@ -62,13 +62,15 @@ public class AbstractGeolocationInformat
* This is a <cite>shallow</cite> copy constructor, since the other metadata contained in the
* given object are not recursively copied.
*
- * @param object The metadata to copy values from.
+ * @param object The metadata to copy values from, or {@code null} if none.
*
* @see #castOrCopy(GeolocationInformation)
*/
public AbstractGeolocationInformation(final GeolocationInformation object) {
super(object);
- qualityInfo = copyCollection(object.getQualityInfo(), DataQuality.class);
+ if (object != null) {
+ qualityInfo = copyCollection(object.getQualityInfo(), DataQuality.class);
+ }
}
/**
@@ -104,6 +106,8 @@ public class AbstractGeolocationInformat
/**
* Returns an overall assessment of quality of geolocation information.
+ *
+ * @return An overall assessment of quality of geolocation information.
*/
@Override
@XmlElement(name = "qualityInfo", namespace = Namespaces.GMI)
Modified: sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/AbstractSpatialRepresentation.java
URL: http://svn.apache.org/viewvc/sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/AbstractSpatialRepresentation.java?rev=1517321&r1=1517320&r2=1517321&view=diff
==============================================================================
--- sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/AbstractSpatialRepresentation.java [UTF-8] (original)
+++ sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/AbstractSpatialRepresentation.java [UTF-8] Sun Aug 25 15:49:51 2013
@@ -58,7 +58,7 @@ public class AbstractSpatialRepresentati
* This is a <cite>shallow</cite> copy constructor, since the other metadata contained in the
* given object are not recursively copied.
*
- * @param object The metadata to copy values from.
+ * @param object The metadata to copy values from, or {@code null} if none.
*
* @see #castOrCopy(SpatialRepresentation)
*/
Modified: sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultDimension.java
URL: http://svn.apache.org/viewvc/sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultDimension.java?rev=1517321&r1=1517320&r2=1517321&view=diff
==============================================================================
--- sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultDimension.java [UTF-8] (original)
+++ sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultDimension.java [UTF-8] Sun Aug 25 15:49:51 2013
@@ -22,8 +22,8 @@ import javax.xml.bind.annotation.XmlRoot
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import org.opengis.metadata.spatial.Dimension;
import org.opengis.metadata.spatial.DimensionNameType;
+import org.apache.sis.internal.jaxb.gco.GO_Measure;
import org.apache.sis.metadata.iso.ISOMetadata;
-//import org.apache.sis.internal.jaxb.gco.GO_Measure;
import org.apache.sis.measure.ValueRange;
@@ -86,15 +86,17 @@ public class DefaultDimension extends IS
* This is a <cite>shallow</cite> copy constructor, since the other metadata contained in the
* given object are not recursively copied.
*
- * @param object The metadata to copy values from.
+ * @param object The metadata to copy values from, or {@code null} if none.
*
* @see #castOrCopy(Dimension)
*/
public DefaultDimension(final Dimension object) {
super(object);
- dimensionName = object.getDimensionName();
- dimensionSize = object.getDimensionSize();
- resolution = object.getResolution();
+ if (object != null) {
+ dimensionName = object.getDimensionName();
+ dimensionSize = object.getDimensionSize();
+ resolution = object.getResolution();
+ }
}
/**
@@ -124,6 +126,8 @@ public class DefaultDimension extends IS
/**
* Returns the name of the axis.
+ *
+ * @return Name of the axis, or {@code null}.
*/
@Override
@XmlElement(name = "dimensionName", required = true)
@@ -143,6 +147,8 @@ public class DefaultDimension extends IS
/**
* Returns the number of elements along the axis.
+ *
+ * @return Number of elements along the axis, or {@code null}.
*/
@Override
@ValueRange(minimum=0)
@@ -163,10 +169,12 @@ public class DefaultDimension extends IS
/**
* Returns the degree of detail in the grid dataset.
+ *
+ * @return Degree of detail in the grid dataset, or {@code null}.
*/
@Override
@ValueRange(minimum=0, isMinIncluded=false)
-// @XmlJavaTypeAdapter(GO_Measure.class) // TODO
+ @XmlJavaTypeAdapter(GO_Measure.class)
@XmlElement(name = "resolution")
public Double getResolution() {
return resolution;
Modified: sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultGCP.java
URL: http://svn.apache.org/viewvc/sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultGCP.java?rev=1517321&r1=1517320&r2=1517321&view=diff
==============================================================================
--- sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultGCP.java [UTF-8] (original)
+++ sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultGCP.java [UTF-8] Sun Aug 25 15:49:51 2013
@@ -68,14 +68,16 @@ public class DefaultGCP extends ISOMetad
* This is a <cite>shallow</cite> copy constructor, since the other metadata contained in the
* given object are not recursively copied.
*
- * @param object The metadata to copy values from.
+ * @param object The metadata to copy values from, or {@code null} if none.
*
* @see #castOrCopy(GCP)
*/
public DefaultGCP(final GCP object) {
super(object);
- accuracyReports = copyCollection(object.getAccuracyReports(), Element.class);
- geographicCoordinates = object.getGeographicCoordinates();
+ if (object != null) {
+ accuracyReports = copyCollection(object.getAccuracyReports(), Element.class);
+ geographicCoordinates = object.getGeographicCoordinates();
+ }
}
/**
@@ -106,10 +108,12 @@ public class DefaultGCP extends ISOMetad
/**
* Returns the geographic or map position of the control point, in either two or three dimensions.
*
+ * @return Geographic or map position of the control point, or {@code null}.
+ *
* @todo finish the annotation on the referencing module before.
*/
@Override
- //@XmlElement(name = "geographicCoordinates")
+ //@XmlElement(name = "geographicCoordinates", required = true)
public DirectPosition getGeographicCoordinates() {
return geographicCoordinates;
}
@@ -125,7 +129,9 @@ public class DefaultGCP extends ISOMetad
}
/**
- * Get the accuracy of a ground control point.
+ * Returns the accuracy of a ground control point.
+ *
+ * @return Accuracy of a ground control point.
*/
@Override
@XmlElement(name = "accuracyReport", namespace = Namespaces.GMI)
Modified: sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultGCPCollection.java
URL: http://svn.apache.org/viewvc/sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultGCPCollection.java?rev=1517321&r1=1517320&r2=1517321&view=diff
==============================================================================
--- sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultGCPCollection.java [UTF-8] (original)
+++ sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultGCPCollection.java [UTF-8] Sun Aug 25 15:49:51 2013
@@ -80,16 +80,18 @@ public class DefaultGCPCollection extend
* This is a <cite>shallow</cite> copy constructor, since the other metadata contained in the
* given object are not recursively copied.
*
- * @param object The metadata to copy values from.
+ * @param object The metadata to copy values from, or {@code null} if none.
*
* @see #castOrCopy(GCPCollection)
*/
public DefaultGCPCollection(final GCPCollection object) {
super(object);
- collectionIdentification = object.getCollectionIdentification();
- collectionName = object.getCollectionName();
- coordinateReferenceSystem = object.getCoordinateReferenceSystem();
- GCPs = copyCollection(object.getGCPs(), GCP.class);
+ if (object != null) {
+ collectionIdentification = object.getCollectionIdentification();
+ collectionName = object.getCollectionName();
+ coordinateReferenceSystem = object.getCoordinateReferenceSystem();
+ GCPs = copyCollection(object.getGCPs(), GCP.class);
+ }
}
/**
@@ -119,6 +121,8 @@ public class DefaultGCPCollection extend
/**
* Returns the identifier of the GCP collection.
+ *
+ * @return The identifier, or {@code null}.
*/
@Override
@XmlElement(name = "collectionIdentification", namespace = Namespaces.GMI, required = true)
@@ -138,6 +142,8 @@ public class DefaultGCPCollection extend
/**
* Returns the name of the GCP collection.
+ *
+ * @return Name of the GCP collection, or {@code null}.
*/
@Override
@XmlElement(name = "collectionName", namespace = Namespaces.GMI, required = true)
@@ -157,6 +163,8 @@ public class DefaultGCPCollection extend
/**
* Returns the coordinate system in which the ground control points are defined.
+ *
+ * @return Coordinate system in which the ground control points are defined, or {@code null}.
*/
@Override
@XmlElement(name = "coordinateReferenceSystem", namespace = Namespaces.GMI, required = true)
@@ -176,6 +184,8 @@ public class DefaultGCPCollection extend
/**
* Returns the ground control point(s) used in the collection.
+ *
+ * @return Ground control point(s).
*/
@Override
@XmlElement(name = "gcp", namespace = Namespaces.GMI, required = true)
Modified: sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultGeometricObjects.java
URL: http://svn.apache.org/viewvc/sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultGeometricObjects.java?rev=1517321&r1=1517320&r2=1517321&view=diff
==============================================================================
--- sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultGeometricObjects.java [UTF-8] (original)
+++ sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultGeometricObjects.java [UTF-8] Sun Aug 25 15:49:51 2013
@@ -77,14 +77,16 @@ public class DefaultGeometricObjects ext
* This is a <cite>shallow</cite> copy constructor, since the other metadata contained in the
* given object are not recursively copied.
*
- * @param object The metadata to copy values from.
+ * @param object The metadata to copy values from, or {@code null} if none.
*
* @see #castOrCopy(GeometricObjects)
*/
public DefaultGeometricObjects(final GeometricObjects object) {
super(object);
- geometricObjectType = object.getGeometricObjectType();
- geometricObjectCount = object.getGeometricObjectCount();
+ if (object != null) {
+ geometricObjectType = object.getGeometricObjectType();
+ geometricObjectCount = object.getGeometricObjectCount();
+ }
}
/**
@@ -114,6 +116,8 @@ public class DefaultGeometricObjects ext
/**
* Returns the total number of the point or vector object type occurring in the dataset.
+ *
+ * @return Name of spatial objects used to locate spatial locations in the dataset, or {@code null}.
*/
@Override
@XmlElement(name = "geometricObjectType", required = true)
@@ -133,6 +137,8 @@ public class DefaultGeometricObjects ext
/**
* Returns the total number of the point or vector object type occurring in the dataset.
+ *
+ * @return Total number of the point or vector object type, or {@code null}.
*/
@Override
@ValueRange(minimum=0)
Modified: sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultGeorectified.java
URL: http://svn.apache.org/viewvc/sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultGeorectified.java?rev=1517321&r1=1517320&r2=1517321&view=diff
==============================================================================
--- sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultGeorectified.java [UTF-8] (original)
+++ sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultGeorectified.java [UTF-8] Sun Aug 25 15:49:51 2013
@@ -127,23 +127,25 @@ public class DefaultGeorectified extends
* This is a <cite>shallow</cite> copy constructor, since the other metadata contained in the
* given object are not recursively copied.
*
- * @param object The metadata to copy values from.
+ * @param object The metadata to copy values from, or {@code null} if none.
*
* @see #castOrCopy(Georectified)
*/
public DefaultGeorectified(final Georectified object) {
super(object);
- checkPointDescription = object.getCheckPointDescription();
- cornerPoints = copyList(object.getCornerPoints(), Point.class);
- centerPoint = object.getCenterPoint();
- pointInPixel = object.getPointInPixel();
- transformationDimensionDescription = object.getTransformationDimensionDescription();
- transformationDimensionMapping = copyCollection(object.getTransformationDimensionMapping(), InternationalString.class);
- checkPoints = copyCollection(object.getCheckPoints(), GCP.class);
-
- // checkPointAvailability is required to be 'true' if there is a description.
- if (checkPointDescription != null || object.isCheckPointAvailable()) {
- booleans |= CHECK_POINT_MASK;
+ if (object != null) {
+ checkPointDescription = object.getCheckPointDescription();
+ cornerPoints = copyList(object.getCornerPoints(), Point.class);
+ centerPoint = object.getCenterPoint();
+ pointInPixel = object.getPointInPixel();
+ transformationDimensionDescription = object.getTransformationDimensionDescription();
+ transformationDimensionMapping = copyCollection(object.getTransformationDimensionMapping(), InternationalString.class);
+ checkPoints = copyCollection(object.getCheckPoints(), GCP.class);
+
+ // checkPointAvailability is required to be 'true' if there is a description.
+ if (checkPointDescription != null || object.isCheckPointAvailable()) {
+ booleans |= CHECK_POINT_MASK;
+ }
}
}
@@ -175,6 +177,8 @@ public class DefaultGeorectified extends
/**
* Returns an indication of whether or not geographic position points are available to test the
* accuracy of the georeferenced grid data.
+ *
+ * @return Whether or not geographic position points are available to test accuracy.
*/
@Override
@XmlElement(name = "checkPointAvailability", required = true)
@@ -210,6 +214,8 @@ public class DefaultGeorectified extends
* Returns a description of geographic position points used to test the accuracy of the
* georeferenced grid data. This value is non-null only if {@link #isCheckPointAvailable()}
* returns {@code true}.
+ *
+ * @return Description of geographic position points used to test accuracy, or {@code null}.
*/
@Override
@XmlElement(name = "checkPointDescription")
@@ -240,6 +246,8 @@ public class DefaultGeorectified extends
* and the grid coordinate of the cells at opposite ends of grid coverage along two
* diagonals in the grid spatial dimensions. There are four corner points in a
* georectified grid; at least two corner points along one diagonal are required.
+ *
+ * @return The corner points.
*/
@Override
@XmlElement(name = "cornerPoints", required = true)
@@ -260,6 +268,8 @@ public class DefaultGeorectified extends
* Returns the Earth location in the coordinate system defined by the Spatial Reference System
* and the grid coordinate of the cell halfway between opposite ends of the grid in the
* spatial dimensions.
+ *
+ * @return The center point, or {@code null}.
*/
@Override
@XmlElement(name = "centerPoint")
@@ -279,6 +289,8 @@ public class DefaultGeorectified extends
/**
* Returns the point in a pixel corresponding to the Earth location of the pixel.
+ *
+ * @return Earth location of the pixel, or {@code null}.
*/
@Override
@XmlElement(name = "pointInPixel", required = true)
@@ -297,8 +309,9 @@ public class DefaultGeorectified extends
}
/**
- * Returns a description of the information about which grid dimensions are the spatial
- * dimensions.
+ * Returns a description of the information about which grid dimensions are the spatial dimensions.
+ *
+ * @return Description of the information about grid dimensions, or {@code null}.
*/
@Override
@XmlElement(name = "transformationDimensionDescription")
@@ -307,8 +320,7 @@ public class DefaultGeorectified extends
}
/**
- * Sets the description of the information about which grid dimensions are the spatial
- * dimensions.
+ * Sets the description of the information about which grid dimensions are the spatial dimensions.
*
* @param newValue The new transformation dimension description.
*/
@@ -319,6 +331,8 @@ public class DefaultGeorectified extends
/**
* Returns information about which grid dimensions are the spatial dimensions.
+ *
+ * @return Information about which grid dimensions are the spatial dimensions, or {@code null}.
*/
@Override
@XmlElement(name = "transformationDimensionMapping")
@@ -337,6 +351,8 @@ public class DefaultGeorectified extends
/**
* Returns the geographic references used to validate georectification of the data.
+ *
+ * @return Geographic references used to validate georectification.
*/
@Override
@XmlElement(name = "checkPoint", namespace = Namespaces.GMI)
Modified: sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultGeoreferenceable.java
URL: http://svn.apache.org/viewvc/sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultGeoreferenceable.java?rev=1517321&r1=1517320&r2=1517321&view=diff
==============================================================================
--- sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultGeoreferenceable.java [UTF-8] (original)
+++ sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultGeoreferenceable.java [UTF-8] Sun Aug 25 15:49:51 2013
@@ -101,22 +101,24 @@ public class DefaultGeoreferenceable ext
* This is a <cite>shallow</cite> copy constructor, since the other metadata contained in the
* given object are not recursively copied.
*
- * @param object The metadata to copy values from.
+ * @param object The metadata to copy values from, or {@code null} if none.
*
* @see #castOrCopy(Georeferenceable)
*/
public DefaultGeoreferenceable(final Georeferenceable object) {
super(object);
- if (object.isControlPointAvailable()) {
- booleans |= CONTROL_POINT_MASK;
- }
- if (object.isOrientationParameterAvailable()) {
- booleans |= OPERATION_MASK;
+ if (object != null) {
+ if (object.isControlPointAvailable()) {
+ booleans |= CONTROL_POINT_MASK;
+ }
+ if (object.isOrientationParameterAvailable()) {
+ booleans |= OPERATION_MASK;
+ }
+ orientationParameterDescription = object.getOrientationParameterDescription();
+ parameterCitations = copyCollection(object.getParameterCitations(), Citation.class);
+ geolocationInformation = copyCollection(object.getGeolocationInformation(), GeolocationInformation.class);
+ georeferencedParameters = object.getGeoreferencedParameters();
}
- orientationParameterDescription = object.getOrientationParameterDescription();
- parameterCitations = copyCollection(object.getParameterCitations(), Citation.class);
- geolocationInformation = copyCollection(object.getGeolocationInformation(), GeolocationInformation.class);
- georeferencedParameters = object.getGeoreferencedParameters();
}
/**
@@ -146,6 +148,8 @@ public class DefaultGeoreferenceable ext
/**
* Returns an indication of whether or not control point(s) exists.
+ *
+ * @return Whether or not control point(s) exists.
*/
@Override
@XmlElement(name = "controlPointAvailability", required = true)
@@ -169,6 +173,8 @@ public class DefaultGeoreferenceable ext
/**
* Returns an indication of whether or not orientation parameters are available.
+ *
+ * @return Whether or not orientation parameters are available.
*/
@Override
@XmlElement(name = "orientationParameterAvailability", required = true)
@@ -192,6 +198,8 @@ public class DefaultGeoreferenceable ext
/**
* Returns a description of parameters used to describe sensor orientation.
+ *
+ * @return Description of parameters used to describe sensor orientation, or {@code null}.
*/
@Override
@XmlElement(name = "orientationParameterDescription")
@@ -211,6 +219,8 @@ public class DefaultGeoreferenceable ext
/**
* Returns the terms which support grid data georeferencing.
+ *
+ * @return Terms which support grid data georeferencing, or {@code null}.
*/
@Override
/// @XmlElement(name = "georeferencedParameters", required = true)
@@ -230,6 +240,8 @@ public class DefaultGeoreferenceable ext
/**
* Returns a reference providing description of the parameters.
+ *
+ * @return Reference providing description of the parameters.
*/
@Override
@XmlElement(name = "parameterCitation")
@@ -249,9 +261,7 @@ public class DefaultGeoreferenceable ext
/**
* Returns the information that can be used to geolocate the data.
*
- * @todo This attribute is declared as mandatory in ISO 19115-2. However metadata compliant
- * with ISO 19115 (without the -2 part) do not contains this attribute. How should we
- * handle the XML formatting for this one?
+ * @return A geolocalisation of the data.
*/
@Override
@XmlElement(name = "geolocationInformation", namespace = Namespaces.GMI, required = true)
Modified: sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultGridSpatialRepresentation.java
URL: http://svn.apache.org/viewvc/sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultGridSpatialRepresentation.java?rev=1517321&r1=1517320&r2=1517321&view=diff
==============================================================================
--- sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultGridSpatialRepresentation.java [UTF-8] (original)
+++ sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultGridSpatialRepresentation.java [UTF-8] Sun Aug 25 15:49:51 2013
@@ -104,17 +104,19 @@ public class DefaultGridSpatialRepresent
* This is a <cite>shallow</cite> copy constructor, since the other metadata contained in the
* given object are not recursively copied.
*
- * @param object The metadata to copy values from.
+ * @param object The metadata to copy values from, or {@code null} if none.
*
* @see #castOrCopy(GridSpatialRepresentation)
*/
public DefaultGridSpatialRepresentation(final GridSpatialRepresentation object) {
super(object);
- numberOfDimensions = object.getNumberOfDimensions();
- axisDimensionProperties = copyList(object.getAxisDimensionProperties(), Dimension.class);
- cellGeometry = object.getCellGeometry();
- if (object.isTransformationParameterAvailable()) {
- booleans = TRANSFORMATION_MASK;
+ if (object != null) {
+ numberOfDimensions = object.getNumberOfDimensions();
+ axisDimensionProperties = copyList(object.getAxisDimensionProperties(), Dimension.class);
+ cellGeometry = object.getCellGeometry();
+ if (object.isTransformationParameterAvailable()) {
+ booleans = TRANSFORMATION_MASK;
+ }
}
}
@@ -157,6 +159,8 @@ public class DefaultGridSpatialRepresent
/**
* Returns the number of independent spatial-temporal axes.
+ *
+ * @return Number of independent spatial-temporal axes, or {@code null}.
*/
@Override
@ValueRange(minimum=0)
@@ -177,6 +181,8 @@ public class DefaultGridSpatialRepresent
/**
* Returns information about spatial-temporal axis properties.
+ *
+ * @return Information about spatial-temporal axis properties.
*/
@Override
@XmlElement(name = "axisDimensionProperties", required = true)
@@ -197,6 +203,8 @@ public class DefaultGridSpatialRepresent
/**
* Returns the identification of grid data as point or cell.
+ *
+ * @return Identification of grid data as point or cell, or {@code null}.
*/
@Override
@XmlElement(name = "cellGeometry", required = true)
@@ -216,6 +224,8 @@ public class DefaultGridSpatialRepresent
/**
* Returns indication of whether or not parameters for transformation exists.
+ *
+ * @return Whether or not parameters for transformation exists.
*/
@Override
@XmlElement(name = "transformationParameterAvailability", required = true)
Modified: sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultVectorSpatialRepresentation.java
URL: http://svn.apache.org/viewvc/sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultVectorSpatialRepresentation.java?rev=1517321&r1=1517320&r2=1517321&view=diff
==============================================================================
--- sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultVectorSpatialRepresentation.java [UTF-8] (original)
+++ sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultVectorSpatialRepresentation.java [UTF-8] Sun Aug 25 15:49:51 2013
@@ -69,14 +69,16 @@ public class DefaultVectorSpatialReprese
* This is a <cite>shallow</cite> copy constructor, since the other metadata contained in the
* given object are not recursively copied.
*
- * @param object The metadata to copy values from.
+ * @param object The metadata to copy values from, or {@code null} if none.
*
* @see #castOrCopy(VectorSpatialRepresentation)
*/
public DefaultVectorSpatialRepresentation(final VectorSpatialRepresentation object) {
super(object);
- topologyLevel = object.getTopologyLevel();
- geometricObjects = copyCollection(object.getGeometricObjects(), GeometricObjects.class);
+ if (object != null) {
+ topologyLevel = object.getTopologyLevel();
+ geometricObjects = copyCollection(object.getGeometricObjects(), GeometricObjects.class);
+ }
}
/**
@@ -106,6 +108,8 @@ public class DefaultVectorSpatialReprese
/**
* Returns the code which identifies the degree of complexity of the spatial relationships.
+ *
+ * @return The degree of complexity of the spatial relationships, or {@code null}.
*/
@Override
@XmlElement(name = "topologyLevel")
@@ -125,6 +129,8 @@ public class DefaultVectorSpatialReprese
/**
* Returns information about the geometric objects used in the dataset.
+ *
+ * @return Information about the geometric objects used in the dataset, or {@code null}.
*/
@Override
@XmlElement(name = "geometricObjects")
Modified: sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/package-info.java
URL: http://svn.apache.org/viewvc/sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/package-info.java?rev=1517321&r1=1517320&r2=1517321&view=diff
==============================================================================
--- sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/package-info.java [UTF-8] (original)
+++ sis/branches/Shapefile/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/package-info.java [UTF-8] Sun Aug 25 15:49:51 2013
@@ -111,7 +111,6 @@
// Java types, primitive types and basic OGC types handling
@XmlJavaTypeAdapter(InternationalStringAdapter.class),
- @XmlJavaTypeAdapter(GO_Decimal.class), @XmlJavaTypeAdapter(type=double.class, value=GO_Decimal.class),
@XmlJavaTypeAdapter(GO_Integer.class), @XmlJavaTypeAdapter(type=int.class, value=GO_Integer.class),
@XmlJavaTypeAdapter(GO_Boolean.class), @XmlJavaTypeAdapter(type=boolean.class, value=GO_Boolean.class)
})
Modified: sis/branches/Shapefile/core/sis-metadata/src/site/apt/index.apt
URL: http://svn.apache.org/viewvc/sis/branches/Shapefile/core/sis-metadata/src/site/apt/index.apt?rev=1517321&r1=1517320&r2=1517321&view=diff
==============================================================================
--- sis/branches/Shapefile/core/sis-metadata/src/site/apt/index.apt [UTF-8] (original)
+++ sis/branches/Shapefile/core/sis-metadata/src/site/apt/index.apt [UTF-8] Sun Aug 25 15:49:51 2013
@@ -1,3 +1,22 @@
+~~
+~~ 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.
+~~
+
------------------------------
Overview
------------------------------
@@ -9,7 +28,7 @@ Apache SIS Metadata
of the metadata interfaces defined in GeoAPI, and a framework for handling those metadata through
Java reflection.
- * {{{./faq.html}Frequently Asked Questions}}
+ * {{{http://sis.apache.org/faq.html#metadata}Frequently Asked Questions}}
* {{{https://geo-ide.noaa.gov/wiki/index.php?title=Category:ISO_19115}ISO 19115 wiki at NOAA}}
Modified: sis/branches/Shapefile/core/sis-metadata/src/site/site.xml
URL: http://svn.apache.org/viewvc/sis/branches/Shapefile/core/sis-metadata/src/site/site.xml?rev=1517321&r1=1517320&r2=1517321&view=diff
==============================================================================
--- sis/branches/Shapefile/core/sis-metadata/src/site/site.xml (original)
+++ sis/branches/Shapefile/core/sis-metadata/src/site/site.xml Sun Aug 25 15:49:51 2013
@@ -30,7 +30,7 @@
<body>
<menu name="Quick links">
<item name="Module Javadoc" href="apidocs/index.html"/>
- <item name="FAQ" href="faq.html"/>
+ <item name="FAQ" href="http://sis.apache.org/faq.html#metadata"/>
<item name="Apache SIS home" href="../index.html"/>
</menu>
Modified: sis/branches/Shapefile/core/sis-metadata/src/test/java/org/apache/sis/internal/metadata/MetadataUtilitiesTest.java
URL: http://svn.apache.org/viewvc/sis/branches/Shapefile/core/sis-metadata/src/test/java/org/apache/sis/internal/metadata/MetadataUtilitiesTest.java?rev=1517321&r1=1517320&r2=1517321&view=diff
==============================================================================
--- sis/branches/Shapefile/core/sis-metadata/src/test/java/org/apache/sis/internal/metadata/MetadataUtilitiesTest.java [UTF-8] (original)
+++ sis/branches/Shapefile/core/sis-metadata/src/test/java/org/apache/sis/internal/metadata/MetadataUtilitiesTest.java [UTF-8] Sun Aug 25 15:49:51 2013
@@ -21,8 +21,6 @@ import org.junit.Test;
import org.apache.sis.test.TestCase;
import static org.junit.Assert.*;
-import static java.lang.Boolean.TRUE;
-import static java.lang.Boolean.FALSE;
/**
@@ -30,7 +28,7 @@ import static java.lang.Boolean.FALSE;
*
* @author Martin Desruisseaux (Geomatys)
* @since 0.3
- * @version 0.3
+ * @version 0.4
* @module
*/
public final strictfp class MetadataUtilitiesTest extends TestCase {
@@ -51,22 +49,4 @@ public final strictfp class MetadataUtil
assertEquals(new Date(1000), MetadataUtilities.toDate(1000));
assertNull(MetadataUtilities.toDate(Long.MIN_VALUE));
}
-
- /**
- * Tests {@link MetadataUtilities#setBoolean(int, byte, Boolean)}.
- * This will indirectly test the getter method through Java assertion.
- */
- @Test
- public void testSetBoolean() {
- final int mask0 = 3; // 0b000011;
- final int mask1 = 12; // 0b001100;
- final int mask2 = 48; // 0b110000;
- int flags = 0;
- flags = MetadataUtilities.setBoolean(flags, mask1, null ); assertEquals( 0 /*0b000000*/, flags);
- flags = MetadataUtilities.setBoolean(flags, mask1, TRUE ); assertEquals(12 /*0b001100*/, flags);
- flags = MetadataUtilities.setBoolean(flags, mask2, FALSE); assertEquals(44 /*0b101100*/, flags);
- flags = MetadataUtilities.setBoolean(flags, mask1, null ); assertEquals(32 /*0b100000*/, flags);
- flags = MetadataUtilities.setBoolean(flags, mask0, TRUE ); assertEquals(35 /*0b100011*/, flags);
- flags = MetadataUtilities.setBoolean(flags, mask0, FALSE); assertEquals(34 /*0b100010*/, flags);
- }
}
Modified: sis/branches/Shapefile/core/sis-metadata/src/test/java/org/apache/sis/metadata/MetadataStandardTest.java
URL: http://svn.apache.org/viewvc/sis/branches/Shapefile/core/sis-metadata/src/test/java/org/apache/sis/metadata/MetadataStandardTest.java?rev=1517321&r1=1517320&r2=1517321&view=diff
==============================================================================
--- sis/branches/Shapefile/core/sis-metadata/src/test/java/org/apache/sis/metadata/MetadataStandardTest.java [UTF-8] (original)
+++ sis/branches/Shapefile/core/sis-metadata/src/test/java/org/apache/sis/metadata/MetadataStandardTest.java [UTF-8] Sun Aug 25 15:49:51 2013
@@ -24,6 +24,8 @@ import org.opengis.metadata.citation.Cit
import org.opengis.metadata.quality.Completeness;
import org.apache.sis.metadata.iso.citation.DefaultCitation;
import org.apache.sis.metadata.iso.citation.HardCodedCitations;
+import org.apache.sis.metadata.iso.acquisition.DefaultPlatform;
+import org.apache.sis.metadata.iso.acquisition.DefaultInstrument;
import org.apache.sis.metadata.iso.quality.AbstractCompleteness;
import org.apache.sis.util.iso.SimpleInternationalString;
import org.apache.sis.util.ComparisonMode;
@@ -33,6 +35,7 @@ import org.apache.sis.test.TestCase;
import org.junit.Test;
import static org.apache.sis.test.Assert.*;
+import static org.apache.sis.test.TestUtilities.getSingleton;
/**
@@ -109,6 +112,36 @@ public final strictfp class MetadataStan
}
/**
+ * Creates a metadata object having a cyclic association. The cycle is between
+ * {@code platform.instrument} and {@code instrument.isMountedOn}.
+ */
+ static DefaultPlatform createCyclicMetadata() {
+ final DefaultInstrument instrument = new DefaultInstrument();
+ instrument.setType(new SimpleInternationalString("An instrument type."));
+ final DefaultPlatform platform = new DefaultPlatform();
+ platform.setDescription(new SimpleInternationalString("A platform."));
+ instrument.setMountedOn(platform);
+ platform.getInstruments().add(instrument);
+ return platform;
+ }
+
+ /**
+ * Tests the {@link MetadataStandard#equals(Object, Object, ComparisonMode)} method on an object
+ * having cyclic associations. In absence of safety guard against infinite recursivity, this test
+ * would produce {@link StackOverflowError}.
+ */
+ @Test
+ @DependsOnMethod("testEquals")
+ public void testEqualsOnCyclicMetadata() {
+ final DefaultPlatform p1 = createCyclicMetadata();
+ final DefaultPlatform p2 = createCyclicMetadata();
+ assertTrue(p1.equals(p2));
+ ((DefaultInstrument) getSingleton(p2.getInstruments()))
+ .setType(new SimpleInternationalString("An other instrument type."));
+ assertFalse(p1.equals(p2));
+ }
+
+ /**
* Tests the {@link MetadataStandard#asValueMap(Object, KeyNamePolicy, ValueExistencePolicy)} implementation.
* This test duplicates {@link ValueMapTest}, but is done here again as an integration test and because many
* {@code MetadataStandard} methods depend on it ({@code equals}, {@code hashCode}, {@code prune}, <i>etc.</i>).
@@ -164,6 +197,24 @@ public final strictfp class MetadataStan
}
/**
+ * Tests the {@link MetadataStandard#hashCode(Object)} method on an object having cyclic associations.
+ * In absence of safety guard against infinite recursivity, this test would produce {@link StackOverflowError}.
+ *
+ * @see AbstractMetadataTest#testHashCodeOnCyclicMetadata()
+ */
+ @Test
+ @DependsOnMethod("testHashCode")
+ public void testHashCodeOnCyclicMetadata() {
+ final MetadataStandard std = MetadataStandard.ISO_19115;
+ final int code = std.hashCode(createCyclicMetadata());
+ /*
+ * Following line checks that the hash code is stable, just for doing something with the code.
+ * The real test was actually to ensure that the above line didn't threw a StackOverflowError.
+ */
+ assertEquals(code, std.hashCode(createCyclicMetadata()));
+ }
+
+ /**
* Tests serialization of pre-defined constants.
*/
@Test
Modified: sis/branches/Shapefile/core/sis-metadata/src/test/java/org/apache/sis/metadata/PrunerTest.java
URL: http://svn.apache.org/viewvc/sis/branches/Shapefile/core/sis-metadata/src/test/java/org/apache/sis/metadata/PrunerTest.java?rev=1517321&r1=1517320&r2=1517321&view=diff
==============================================================================
--- sis/branches/Shapefile/core/sis-metadata/src/test/java/org/apache/sis/metadata/PrunerTest.java [UTF-8] (original)
+++ sis/branches/Shapefile/core/sis-metadata/src/test/java/org/apache/sis/metadata/PrunerTest.java [UTF-8] Sun Aug 25 15:49:51 2013
@@ -21,6 +21,8 @@ import org.apache.sis.metadata.iso.citat
import org.apache.sis.metadata.iso.extent.DefaultExtent;
import org.apache.sis.metadata.iso.extent.DefaultGeographicBoundingBox;
import org.apache.sis.metadata.iso.identification.DefaultDataIdentification;
+import org.apache.sis.metadata.iso.acquisition.DefaultAcquisitionInformation;
+import org.apache.sis.test.DependsOnMethod;
import org.apache.sis.test.DependsOn;
import org.apache.sis.test.TestCase;
import org.junit.Test;
@@ -116,9 +118,32 @@ public final strictfp class PrunerTest e
}
/**
+ * Adds to the {@link #metadata} an object having a cyclic association.
+ * The cycle is between {@code platform.instrument} and {@code instrument.isMountedOn}.
+ */
+ private void createCyclicMetadata() {
+ final DefaultAcquisitionInformation acquisition = new DefaultAcquisitionInformation();
+ acquisition.getPlatforms().add(MetadataStandardTest.createCyclicMetadata());
+ metadata.getAcquisitionInformation().add(acquisition);
+ }
+
+ /**
+ * Tests the {@link AbstractMetadata#isEmpty()} method on a metadata object having a cycle association.
+ * In absence of safety guard against infinite recursivity, this test would produce {@link StackOverflowError}.
+ */
+ @Test
+ @DependsOnMethod("testIsEmpty")
+ public void testIsEmptyOnCyclicMetadata() {
+ assertTrue(metadata.isEmpty());
+ createCyclicMetadata();
+ assertFalse(metadata.isEmpty());
+ }
+
+ /**
* Tests the {@link ModifiableMetadata#prune()} method.
*/
@Test
+ @DependsOnMethod("testIsEmpty")
public void testPrune() {
metadata.setFileIdentifier("A file identifiers");
identification.setCitation(new DefaultCitation("A citation title"));
@@ -149,4 +174,19 @@ public final strictfp class PrunerTest e
assertTrue(extent.getGeographicElements().isEmpty());
assertTrue(metadata.isEmpty());
}
+
+ /**
+ * Tests the {@link AbstractMetadata#prune()} method on a metadata object having a cycle association.
+ * In absence of safety guard against infinite recursivity, this test would produce {@link StackOverflowError}.
+ */
+ @Test
+ @DependsOnMethod({"testPrune", "testIsEmptyOnCyclicMetadata"})
+ public void testPruneOnCyclicMetadata() {
+ createCyclicMetadata();
+ assertEquals(1, metadata.getIdentificationInfo() .size());
+ assertEquals(1, metadata.getAcquisitionInformation().size());
+ metadata.prune();
+ assertEquals(0, metadata.getIdentificationInfo() .size());
+ assertEquals(1, metadata.getAcquisitionInformation().size());
+ }
}
Modified: sis/branches/Shapefile/core/sis-metadata/src/test/java/org/apache/sis/metadata/TreeNodeChildrenTest.java
URL: http://svn.apache.org/viewvc/sis/branches/Shapefile/core/sis-metadata/src/test/java/org/apache/sis/metadata/TreeNodeChildrenTest.java?rev=1517321&r1=1517320&r2=1517321&view=diff
==============================================================================
--- sis/branches/Shapefile/core/sis-metadata/src/test/java/org/apache/sis/metadata/TreeNodeChildrenTest.java [UTF-8] (original)
+++ sis/branches/Shapefile/core/sis-metadata/src/test/java/org/apache/sis/metadata/TreeNodeChildrenTest.java [UTF-8] Sun Aug 25 15:49:51 2013
@@ -200,9 +200,9 @@ public final strictfp class TreeNodeChil
"Second alternate title",
"Third alternate title", // After addition
"New edition", // After "addition" (actually change).
+ "PresentationForm[IMAGE_DIGITAL]", // After addition
"PresentationForm[MAP_DIGITAL]",
"PresentationForm[MAP_HARDCOPY]",
- "PresentationForm[IMAGE_DIGITAL]", // After addition
"Some other details"
};
toAdd.setValue(TableColumn.IDENTIFIER, "edition");
Modified: sis/branches/Shapefile/core/sis-metadata/src/test/java/org/apache/sis/metadata/TreeNodeTest.java
URL: http://svn.apache.org/viewvc/sis/branches/Shapefile/core/sis-metadata/src/test/java/org/apache/sis/metadata/TreeNodeTest.java?rev=1517321&r1=1517320&r2=1517321&view=diff
==============================================================================
--- sis/branches/Shapefile/core/sis-metadata/src/test/java/org/apache/sis/metadata/TreeNodeTest.java [UTF-8] (original)
+++ sis/branches/Shapefile/core/sis-metadata/src/test/java/org/apache/sis/metadata/TreeNodeTest.java [UTF-8] Sun Aug 25 15:49:51 2013
@@ -55,7 +55,7 @@ public final strictfp class TreeNodeTest
* This method creates the following metadata:
*
* {@preformat text
- * DefaultCitation
+ * Citation
* ├─Title…………………………………………………………………………………… Some title
* ├─Alternate title (1 of 2)………………………………… First alternate title
* ├─Alternate title (2 of 2)………………………………… Second alternate title
@@ -108,13 +108,13 @@ public final strictfp class TreeNodeTest
public void testRootNode() {
final DefaultCitation citation = TreeNodeChildrenTest.metadataWithoutCollections();
final TreeNode node = create(citation, ValueExistencePolicy.NON_EMPTY);
- assertEquals("getName()", "DefaultCitation", node.getName());
- assertEquals("getIdentifier()", "CI_Citation", node.getIdentifier());
- assertEquals("getElementType()", Citation.class, node.getElementType());
- assertSame ("getUserObject()", citation, node.getUserObject());
- assertFalse ("isWritable()", node.isWritable());
- assertNull ("getParent()", node.getParent());
- assertFalse ("isLeaf()", node.isLeaf());
+ assertEquals("getName()", "Citation", node.getName());
+ assertEquals("getIdentifier()", "CI_Citation", node.getIdentifier());
+ assertEquals("getElementType()", Citation.class, node.getElementType());
+ assertSame ("getUserObject()", citation, node.getUserObject());
+ assertFalse ("isWritable()", node.isWritable());
+ assertNull ("getParent()", node.getParent());
+ assertFalse ("isLeaf()", node.isLeaf());
final TreeNodeChildren children = (TreeNodeChildren) node.getChildren();
assertSame ("children.metadata", citation, children.metadata);
@@ -131,7 +131,7 @@ public final strictfp class TreeNodeTest
public void testGetNameForSingleton() {
final DefaultCitation citation = TreeNodeChildrenTest.metadataWithSingletonInCollections();
assertColumnContentEquals(create(citation, ValueExistencePolicy.NON_EMPTY), TableColumn.NAME,
- "DefaultCitation",
+ "Citation",
"Title",
"Alternate title",
"Edition",
@@ -148,7 +148,7 @@ public final strictfp class TreeNodeTest
public void testGetNameForMultiOccurrences() {
final DefaultCitation citation = TreeNodeChildrenTest.metadataWithMultiOccurrences();
assertColumnContentEquals(create(citation, ValueExistencePolicy.NON_EMPTY), TableColumn.NAME,
- "DefaultCitation",
+ "Citation",
"Title",
"Alternate title (1 of 2)",
"Alternate title (2 of 2)",
@@ -166,7 +166,7 @@ public final strictfp class TreeNodeTest
public void testGetNameForHierarchy() {
final DefaultCitation citation = metadataWithHierarchy();
assertColumnContentEquals(create(citation, ValueExistencePolicy.NON_EMPTY), TableColumn.NAME,
- "DefaultCitation",
+ "Citation",
"Title",
"Alternate title (1 of 2)",
"Alternate title (2 of 2)",
Modified: sis/branches/Shapefile/core/sis-metadata/src/test/java/org/apache/sis/metadata/TreeTableViewTest.java
URL: http://svn.apache.org/viewvc/sis/branches/Shapefile/core/sis-metadata/src/test/java/org/apache/sis/metadata/TreeTableViewTest.java?rev=1517321&r1=1517320&r2=1517321&view=diff
==============================================================================
--- sis/branches/Shapefile/core/sis-metadata/src/test/java/org/apache/sis/metadata/TreeTableViewTest.java [UTF-8] (original)
+++ sis/branches/Shapefile/core/sis-metadata/src/test/java/org/apache/sis/metadata/TreeTableViewTest.java [UTF-8] Sun Aug 25 15:49:51 2013
@@ -53,23 +53,23 @@ public final strictfp class TreeTableVie
* with {@link ValueExistencePolicy#NON_EMPTY}.
*/
private static final String EXPECTED =
- "DefaultCitation\n" +
- " ├─Title…………………………………………………………………………………… Some title\n" +
- " ├─Alternate title (1 of 2)………………………………… First alternate title\n" +
- " ├─Alternate title (2 of 2)………………………………… Second alternate title\n" +
- " ├─Edition……………………………………………………………………………… Some edition\n" +
- " ├─Cited responsible party (1 of 2)\n" +
- " │ ├─Organisation name………………………………………… Some organisation\n" +
- " │ └─Role…………………………………………………………………………… Distributor\n" +
- " ├─Cited responsible party (2 of 2)\n" +
- " │ ├─Individual name……………………………………………… Some person of contact\n" +
- " │ ├─Contact info\n" +
- " │ │ └─Address\n" +
- " │ │ └─Electronic mail address…… Some email\n" +
- " │ └─Role…………………………………………………………………………… Point of contact\n" +
- " ├─Presentation form (1 of 2)…………………………… Map digital\n" +
- " ├─Presentation form (2 of 2)…………………………… Map hardcopy\n" +
- " └─Other citation details……………………………………… Some other details\n";
+ "Citation\n" +
+ " ├─Title…………………………………………………………………………………… Some title\n" +
+ " ├─Alternate title (1 of 2)………………………………… First alternate title\n" +
+ " ├─Alternate title (2 of 2)………………………………… Second alternate title\n" +
+ " ├─Edition……………………………………………………………………………… Some edition\n" +
+ " ├─Cited responsible party (1 of 2)\n" +
+ " │ ├─Organisation name………………………………………… Some organisation\n" +
+ " │ └─Role…………………………………………………………………………… Distributor\n" +
+ " ├─Cited responsible party (2 of 2)\n" +
+ " │ ├─Individual name……………………………………………… Some person of contact\n" +
+ " │ ├─Contact info\n" +
+ " │ │ └─Address\n" +
+ " │ │ └─Electronic mail address…… Some email\n" +
+ " │ └─Role…………………………………………………………………………… Point of contact\n" +
+ " ├─Presentation form (1 of 2)…………………………… Map digital\n" +
+ " ├─Presentation form (2 of 2)…………………………… Map hardcopy\n" +
+ " └─Other citation details……………………………………… Some other details\n";
/**
* Tests {@link TreeTableView#toString()}.