Author: desruisseaux
Date: Wed Apr 20 13:21:27 2016
New Revision: 1740143
URL: http://svn.apache.org/viewvc?rev=1740143&view=rev
Log:
Rename NameConvention back to AttributeConvention because it defines methods
looking for conventional characteristics of feature attributes.
Added:
sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/internal/feature/AttributeConvention.java
- copied, changed from r1740142,
sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/internal/feature/NameConvention.java
sis/branches/JDK8/core/sis-feature/src/test/java/org/apache/sis/internal/feature/AttributeConventionTest.java
- copied, changed from r1740142,
sis/branches/JDK8/core/sis-feature/src/test/java/org/apache/sis/internal/feature/NameConventionTest.java
Removed:
sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/internal/feature/NameConvention.java
sis/branches/JDK8/core/sis-feature/src/test/java/org/apache/sis/internal/feature/NameConventionTest.java
Modified:
sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/EnvelopeOperation.java
sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/internal/feature/FeatureTypeBuilder.java
sis/branches/JDK8/core/sis-feature/src/test/java/org/apache/sis/feature/EnvelopeOperationTest.java
sis/branches/JDK8/core/sis-feature/src/test/java/org/apache/sis/internal/feature/FeatureTypeBuilderTest.java
sis/branches/JDK8/core/sis-feature/src/test/java/org/apache/sis/test/suite/FeatureTestSuite.java
sis/branches/JDK8/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/gpx/GPXConstants.java
Modified:
sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/EnvelopeOperation.java
URL:
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/EnvelopeOperation.java?rev=1740143&r1=1740142&r2=1740143&view=diff
==============================================================================
---
sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/EnvelopeOperation.java
[UTF-8] (original)
+++
sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/EnvelopeOperation.java
[UTF-8] Wed Apr 20 13:21:27 2016
@@ -28,7 +28,7 @@ import org.opengis.parameter.ParameterVa
import org.opengis.referencing.crs.CoordinateReferenceSystem;
import org.opengis.referencing.operation.CoordinateOperation;
import org.opengis.referencing.operation.TransformException;
-import org.apache.sis.internal.feature.NameConvention;
+import org.apache.sis.internal.feature.AttributeConvention;
import org.apache.sis.internal.feature.Geometries;
import org.apache.sis.internal.util.CollectionsExt;
import org.apache.sis.geometry.Envelopes;
@@ -126,7 +126,7 @@ final class EnvelopeOperation extends Ab
{
super(identification);
String defaultGeometry = null;
- final String characteristicName =
NameConvention.CRS_CHARACTERISTIC.toString();
+ final String characteristicName =
AttributeConvention.CRS_CHARACTERISTIC.toString();
/*
* Get all property names without duplicated values. If a property is
a link to an attribute,
* then the key will be the name of the referenced attribute instead
than the operation name.
@@ -138,11 +138,11 @@ final class EnvelopeOperation extends Ab
boolean characterizedByCRS = false;
final Map<String,CoordinateReferenceSystem> names = new
LinkedHashMap<>(4);
for (IdentifiedType property : geometryAttributes) {
- if (NameConvention.isGeometryAttribute(property)) {
+ if (AttributeConvention.isGeometryAttribute(property)) {
final GenericName name = property.getName();
final String attributeName = (property instanceof
LinkOperation)
? ((LinkOperation)
property).referentName : name.toString();
- final boolean isDefault =
NameConvention.DEFAULT_GEOMETRY_PROPERTY.equals(name.tip());
+ final boolean isDefault =
AttributeConvention.DEFAULT_GEOMETRY_PROPERTY.equals(name.tip());
if (isDefault) {
defaultGeometry = attributeName;
}
@@ -317,7 +317,7 @@ final class EnvelopeOperation extends Ab
* Envelopes.transform(…) searches a coordinate operation.
*/
final Attribute<?> at = ((Attribute<?>)
property).characteristics()
-
.get(NameConvention.CRS_CHARACTERISTIC.toString());
+
.get(AttributeConvention.CRS_CHARACTERISTIC.toString());
try {
if (at == null) {
final CoordinateOperation op = attributeToCRS[i];
Copied:
sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/internal/feature/AttributeConvention.java
(from r1740142,
sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/internal/feature/NameConvention.java)
URL:
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/internal/feature/AttributeConvention.java?p2=sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/internal/feature/AttributeConvention.java&p1=sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/internal/feature/NameConvention.java&r1=1740142&r2=1740143&rev=1740143&view=diff
==============================================================================
---
sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/internal/feature/NameConvention.java
[UTF-8] (original)
+++
sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/internal/feature/AttributeConvention.java
[UTF-8] Wed Apr 20 13:21:27 2016
@@ -36,7 +36,7 @@ import org.opengis.feature.Property;
/**
* Defines the names of some properties or characteristics for which we assign
a conventional usage.
- * Properties with the names defined in this {@code NameConvention} class are
often aliases generated
+ * Properties with the names defined in this {@code AttributeConvention} class
are often aliases generated
* by the SIS implementation of various file readers. Those synthetic
properties redirect to the most
* appropriate "real" property in the feature.
*
@@ -70,7 +70,7 @@ import org.opengis.feature.Property;
* @version 0.7
* @module
*/
-public final class NameConvention extends Static {
+public final class AttributeConvention extends Static {
/**
* Namespace of all names defined by SIS convention.
*/
@@ -179,7 +179,7 @@ public final class NameConvention extend
/**
* Do not allow instantiation of this class.
*/
- private NameConvention() {
+ private AttributeConvention() {
}
/**
Modified:
sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/internal/feature/FeatureTypeBuilder.java
URL:
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/internal/feature/FeatureTypeBuilder.java?rev=1740143&r1=1740142&r2=1740143&view=diff
==============================================================================
---
sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/internal/feature/FeatureTypeBuilder.java
[UTF-8] (original)
+++
sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/internal/feature/FeatureTypeBuilder.java
[UTF-8] Wed Apr 20 13:21:27 2016
@@ -125,7 +125,7 @@ public class FeatureTypeBuilder extends
/**
* The default geometry attribute, or {@code null} if none.
*
- * @see NameConvention#DEFAULT_GEOMETRY_PROPERTY
+ * @see AttributeConvention#DEFAULT_GEOMETRY_PROPERTY
*/
private Property<?> defaultGeometry;
@@ -301,7 +301,7 @@ public class FeatureTypeBuilder extends
}
if (defaultGeometry != null) {
throw new
IllegalStateException(errors().getString(Errors.Keys.PropertyAlreadyExists_2,
- getDisplayName(),
NameConvention.DEFAULT_GEOMETRY_PROPERTY));
+ getDisplayName(),
AttributeConvention.DEFAULT_GEOMETRY_PROPERTY));
}
final Property<V> property = new Property<>(valueClass);
defaultGeometry = property;
@@ -497,11 +497,11 @@ public class FeatureTypeBuilder extends
* @return {@code this} for allowing method calls chaining.
* @throws UnsupportedOperationException if this property does not
support characteristics.
*
- * @see NameConvention#VALID_VALUES_CHARACTERISTIC
+ * @see AttributeConvention#VALID_VALUES_CHARACTERISTIC
*/
@SafeVarargs
public final Property<V> setValidValues(final V... values) {
- return
setCharacteristic(NameConvention.VALID_VALUES_CHARACTERISTIC,
+ return
setCharacteristic(AttributeConvention.VALID_VALUES_CHARACTERISTIC,
Set.class, CollectionsExt.immutableSet(false, values));
}
@@ -517,10 +517,10 @@ public class FeatureTypeBuilder extends
* @return {@code this} for allowing method calls chaining.
* @throws UnsupportedOperationException if this property does not
support length characteristics.
*
- * @see NameConvention#MAXIMAL_LENGTH_CHARACTERISTIC
+ * @see AttributeConvention#MAXIMAL_LENGTH_CHARACTERISTIC
*/
public Property<V> setMaximalLengthCharacteristic(final Integer
length) {
- return
setCharacteristic(NameConvention.MAXIMAL_LENGTH_CHARACTERISTIC, Integer.class,
length);
+ return
setCharacteristic(AttributeConvention.MAXIMAL_LENGTH_CHARACTERISTIC,
Integer.class, length);
}
/**
@@ -535,10 +535,10 @@ public class FeatureTypeBuilder extends
* @return {@code this} for allowing method calls chaining.
* @throws UnsupportedOperationException if this property does not
support CRS characteristics.
*
- * @see NameConvention#CRS_CHARACTERISTIC
+ * @see AttributeConvention#CRS_CHARACTERISTIC
*/
public Property<V> setCRSCharacteristic(final
CoordinateReferenceSystem crs) {
- return setCharacteristic(NameConvention.CRS_CHARACTERISTIC,
CoordinateReferenceSystem.class, crs);
+ return setCharacteristic(AttributeConvention.CRS_CHARACTERISTIC,
CoordinateReferenceSystem.class, crs);
}
/**
@@ -712,11 +712,11 @@ public class FeatureTypeBuilder extends
*/
if (builder == defaultGeometry) {
final PropertyType geom;
- if
(NameConvention.DEFAULT_GEOMETRY_PROPERTY.equals(instance.getName())) {
+ if
(AttributeConvention.DEFAULT_GEOMETRY_PROPERTY.equals(instance.getName())) {
propertyTypes = ArraysExt.remove(propertyTypes, j--, 1);
geom = instance;
} else {
- geom =
FeatureOperations.link(name(NameConvention.DEFAULT_GEOMETRY_PROPERTY),
instance);
+ geom =
FeatureOperations.link(name(AttributeConvention.DEFAULT_GEOMETRY_PROPERTY),
instance);
}
propertyTypes[numSynthetic - 1] = geom;
}
@@ -727,12 +727,12 @@ public class FeatureTypeBuilder extends
* FeatureOperations.envelope(…) constructor will ignore any property
which is not for a value.
*/
if (defaultGeometry != null) try {
- propertyTypes[numSynthetic - 2] =
FeatureOperations.envelope(name(NameConvention.ENVELOPE_PROPERTY), null,
propertyTypes);
+ propertyTypes[numSynthetic - 2] =
FeatureOperations.envelope(name(AttributeConvention.ENVELOPE_PROPERTY), null,
propertyTypes);
} catch (FactoryException e) {
throw new IllegalStateException(e);
}
if (identifierTypes != null) {
- propertyTypes[0] =
FeatureOperations.compound(name(NameConvention.ID_PROPERTY), idDelimiter,
idPrefix, idSuffix, identifierTypes);
+ propertyTypes[0] =
FeatureOperations.compound(name(AttributeConvention.ID_PROPERTY), idDelimiter,
idPrefix, idSuffix, identifierTypes);
}
return new DefaultFeatureType(identification, isAbstract,
superTypes.toArray(new FeatureType[superTypes.size()]), propertyTypes);
}
Modified:
sis/branches/JDK8/core/sis-feature/src/test/java/org/apache/sis/feature/EnvelopeOperationTest.java
URL:
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-feature/src/test/java/org/apache/sis/feature/EnvelopeOperationTest.java?rev=1740143&r1=1740142&r2=1740143&view=diff
==============================================================================
---
sis/branches/JDK8/core/sis-feature/src/test/java/org/apache/sis/feature/EnvelopeOperationTest.java
[UTF-8] (original)
+++
sis/branches/JDK8/core/sis-feature/src/test/java/org/apache/sis/feature/EnvelopeOperationTest.java
[UTF-8] Wed Apr 20 13:21:27 2016
@@ -24,7 +24,7 @@ import com.esri.core.geometry.Polygon;
import org.opengis.geometry.Envelope;
import org.opengis.util.FactoryException;
import org.opengis.referencing.crs.CoordinateReferenceSystem;
-import org.apache.sis.internal.feature.NameConvention;
+import org.apache.sis.internal.feature.AttributeConvention;
import org.apache.sis.referencing.crs.HardCodedCRS;
import org.apache.sis.geometry.GeneralEnvelope;
@@ -68,10 +68,10 @@ public final strictfp class EnvelopeOper
*/
private static DefaultFeatureType school(final int defaultGeometry) throws
FactoryException {
final DefaultAttributeType<?> standardCRS = new DefaultAttributeType<>(
- name(NameConvention.CRS_CHARACTERISTIC),
CoordinateReferenceSystem.class, 1, 1, HardCodedCRS.WGS84_φλ);
+ name(AttributeConvention.CRS_CHARACTERISTIC),
CoordinateReferenceSystem.class, 1, 1, HardCodedCRS.WGS84_φλ);
final DefaultAttributeType<?> normalizedCRS = new
DefaultAttributeType<>(
- name(NameConvention.CRS_CHARACTERISTIC),
CoordinateReferenceSystem.class, 1, 1, HardCodedCRS.WGS84);
+ name(AttributeConvention.CRS_CHARACTERISTIC),
CoordinateReferenceSystem.class, 1, 1, HardCodedCRS.WGS84);
final PropertyType[] attributes = {
new DefaultAttributeType<>(name("name"), String.class,
1, 1, null),
@@ -81,7 +81,7 @@ public final strictfp class EnvelopeOper
null,
null
};
- attributes[4] =
FeatureOperations.link(name(NameConvention.DEFAULT_GEOMETRY_PROPERTY),
attributes[defaultGeometry]);
+ attributes[4] =
FeatureOperations.link(name(AttributeConvention.DEFAULT_GEOMETRY_PROPERTY),
attributes[defaultGeometry]);
attributes[5] = FeatureOperations.envelope(name("bounds"), null,
attributes);
return new DefaultFeatureType(name("school"), false, null, attributes);
}
Copied:
sis/branches/JDK8/core/sis-feature/src/test/java/org/apache/sis/internal/feature/AttributeConventionTest.java
(from r1740142,
sis/branches/JDK8/core/sis-feature/src/test/java/org/apache/sis/internal/feature/NameConventionTest.java)
URL:
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-feature/src/test/java/org/apache/sis/internal/feature/AttributeConventionTest.java?p2=sis/branches/JDK8/core/sis-feature/src/test/java/org/apache/sis/internal/feature/AttributeConventionTest.java&p1=sis/branches/JDK8/core/sis-feature/src/test/java/org/apache/sis/internal/feature/NameConventionTest.java&r1=1740142&r2=1740143&rev=1740143&view=diff
==============================================================================
---
sis/branches/JDK8/core/sis-feature/src/test/java/org/apache/sis/internal/feature/NameConventionTest.java
[UTF-8] (original)
+++
sis/branches/JDK8/core/sis-feature/src/test/java/org/apache/sis/internal/feature/AttributeConventionTest.java
[UTF-8] Wed Apr 20 13:21:27 2016
@@ -34,7 +34,7 @@ import org.opengis.feature.IdentifiedTyp
/**
- * Tests {@link NameConvention}.
+ * Tests {@link AttributeConvention}.
*
* @author Johann Sorel (Geomatys)
* @author Martin Desruisseaux (Geomatys)
@@ -42,74 +42,74 @@ import org.opengis.feature.IdentifiedTyp
* @version 0.7
* @module
*/
-public final strictfp class NameConventionTest extends TestCase {
+public final strictfp class AttributeConventionTest extends TestCase {
/**
- * Tests {@link NameConvention#contains(GenericName)} method.
+ * Tests {@link AttributeConvention#contains(GenericName)} method.
*/
@Test
public void testIsConventionProperty() {
- assertFalse("Feature-specific name",
NameConvention.contains(Names.createLocalName("MyFeature", ":", "City")));
- assertTrue ("Conventional name",
NameConvention.contains(NameConvention.ENVELOPE_PROPERTY));
- assertTrue ("Fully qualified name",
NameConvention.contains(NameConvention.ENVELOPE_PROPERTY.toFullyQualifiedName()));
+ assertFalse("Feature-specific name",
AttributeConvention.contains(Names.createLocalName("MyFeature", ":", "City")));
+ assertTrue ("Conventional name",
AttributeConvention.contains(AttributeConvention.ENVELOPE_PROPERTY));
+ assertTrue ("Fully qualified name",
AttributeConvention.contains(AttributeConvention.ENVELOPE_PROPERTY.toFullyQualifiedName()));
}
/**
- * Tests {@link NameConvention#isGeometryAttribute(IdentifiedType)} method.
+ * Tests {@link AttributeConvention#isGeometryAttribute(IdentifiedType)}
method.
*/
@Test
public void testIsGeometryAttribute() {
final Map<String,?> properties =
Collections.singletonMap(DefaultAttributeType.NAME_KEY, "geometry");
- assertFalse("AttributeType<Integer>",
NameConvention.isGeometryAttribute(
+ assertFalse("AttributeType<Integer>",
AttributeConvention.isGeometryAttribute(
new DefaultAttributeType<>(properties, Integer.class, 1, 1,
null)));
- assertTrue("AttributeType<Point>", NameConvention.isGeometryAttribute(
+ assertTrue("AttributeType<Point>",
AttributeConvention.isGeometryAttribute(
new DefaultAttributeType<>(properties, Point.class, 1, 1,
null)));
}
/**
- * Tests {@link NameConvention#characterizedByCRS(IdentifiedType)} and
- * {@link NameConvention#getCRSCharacteristic(Property)} methods.
+ * Tests {@link AttributeConvention#characterizedByCRS(IdentifiedType)} and
+ * {@link AttributeConvention#getCRSCharacteristic(Property)} methods.
*/
@Test
public void testGetCrsCharacteristic() {
final Map<String,?> properties =
Collections.singletonMap(DefaultAttributeType.NAME_KEY, "geometry");
DefaultAttributeType<Point> type = new
DefaultAttributeType<>(properties, Point.class, 1, 1, null);
- assertFalse("characterizedByCRS",
NameConvention.characterizedByCRS(type));
- assertNull("getCRSCharacteristic",
NameConvention.getCRSCharacteristic(type.newInstance()));
+ assertFalse("characterizedByCRS",
AttributeConvention.characterizedByCRS(type));
+ assertNull("getCRSCharacteristic",
AttributeConvention.getCRSCharacteristic(type.newInstance()));
/*
* Creates an attribute associated to an attribute (i.e. a
"characteristic") for storing
* the Coordinate Reference System of the "geometry" attribute. Then
test again.
*/
final DefaultAttributeType<CoordinateReferenceSystem> characteristic =
new DefaultAttributeType<>(
- Collections.singletonMap(DefaultAttributeType.NAME_KEY,
NameConvention.CRS_CHARACTERISTIC),
+ Collections.singletonMap(DefaultAttributeType.NAME_KEY,
AttributeConvention.CRS_CHARACTERISTIC),
CoordinateReferenceSystem.class, 1, 1, HardCodedCRS.WGS84);
type = new DefaultAttributeType<>(properties, Point.class, 1, 1, null,
characteristic);
- assertTrue(NameConvention.characterizedByCRS(type));
- assertEquals(HardCodedCRS.WGS84,
NameConvention.getCRSCharacteristic(type.newInstance()));
+ assertTrue("characterizedByCRS",
AttributeConvention.characterizedByCRS(type));
+ assertEquals(HardCodedCRS.WGS84,
AttributeConvention.getCRSCharacteristic(type.newInstance()));
}
/**
- * Tests {@link
NameConvention#characterizedByMaximalLength(IdentifiedType)} and
- * {@link NameConvention#getMaximalLengthCharacteristic(Property)} methods.
+ * Tests {@link
AttributeConvention#characterizedByMaximalLength(IdentifiedType)} and
+ * {@link AttributeConvention#getMaximalLengthCharacteristic(Property)}
methods.
*/
@Test
public void testGetMaximalLengthCharacteristic() {
final Map<String,?> properties =
Collections.singletonMap(DefaultAttributeType.NAME_KEY, "name");
DefaultAttributeType<String> type = new
DefaultAttributeType<>(properties, String.class, 1, 1, null);
- assertFalse("characterizedByMaximalLength",
NameConvention.characterizedByMaximalLength(type));
- assertNull("getMaximalLengthCharacteristic",
NameConvention.getMaximalLengthCharacteristic(type.newInstance()));
+ assertFalse("characterizedByMaximalLength",
AttributeConvention.characterizedByMaximalLength(type));
+ assertNull("getMaximalLengthCharacteristic",
AttributeConvention.getMaximalLengthCharacteristic(type.newInstance()));
/*
* Creates an attribute associated to an attribute (i.e. a
"characteristic") for storing
* the maximal length of the "name" attribute. Then test again.
*/
final DefaultAttributeType<Integer> characteristic = new
DefaultAttributeType<>(
- Collections.singletonMap(DefaultAttributeType.NAME_KEY,
NameConvention.MAXIMAL_LENGTH_CHARACTERISTIC),
+ Collections.singletonMap(DefaultAttributeType.NAME_KEY,
AttributeConvention.MAXIMAL_LENGTH_CHARACTERISTIC),
Integer.class, 1, 1, 120);
type = new DefaultAttributeType<>(properties, String.class, 1, 1,
null, characteristic);
- assertTrue("characterizedByMaximalLength",
NameConvention.characterizedByMaximalLength(type));
- assertEquals(Integer.valueOf(120),
NameConvention.getMaximalLengthCharacteristic(type.newInstance()));
+ assertTrue("characterizedByMaximalLength",
AttributeConvention.characterizedByMaximalLength(type));
+ assertEquals(Integer.valueOf(120),
AttributeConvention.getMaximalLengthCharacteristic(type.newInstance()));
}
}
Modified:
sis/branches/JDK8/core/sis-feature/src/test/java/org/apache/sis/internal/feature/FeatureTypeBuilderTest.java
URL:
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-feature/src/test/java/org/apache/sis/internal/feature/FeatureTypeBuilderTest.java?rev=1740143&r1=1740142&r2=1740143&view=diff
==============================================================================
---
sis/branches/JDK8/core/sis-feature/src/test/java/org/apache/sis/internal/feature/FeatureTypeBuilderTest.java
[UTF-8] (original)
+++
sis/branches/JDK8/core/sis-feature/src/test/java/org/apache/sis/internal/feature/FeatureTypeBuilderTest.java
[UTF-8] Wed Apr 20 13:21:27 2016
@@ -122,9 +122,9 @@ public final strictfp class FeatureTypeB
assertEquals("defaultValue", "test default value.",
att.getDefaultValue());
assertEquals("minimumOccurs", 10,
att.getMinimumOccurs());
assertEquals("maximumOccurs", 60,
att.getMaximumOccurs());
- assertTrue ("characterizedByMaximalLength",
NameConvention.characterizedByMaximalLength(att));
+ assertTrue ("characterizedByMaximalLength",
AttributeConvention.characterizedByMaximalLength(att));
assertEquals("maximalLengthCharacteristic", Integer.valueOf(80),
-
NameConvention.getMaximalLengthCharacteristic(att.newInstance()));
+
AttributeConvention.getMaximalLengthCharacteristic(att.newInstance()));
}
/**
@@ -189,10 +189,10 @@ public final strictfp class FeatureTypeB
assertEquals("defaultValue", null, a2.getDefaultValue());
assertEquals("defaultValue", 10.0, a3.getDefaultValue());
- assertFalse("characterizedByCRS",
NameConvention.characterizedByCRS(a0));
- assertFalse("characterizedByCRS",
NameConvention.characterizedByCRS(a1));
- assertTrue ("characterizedByCRS",
NameConvention.characterizedByCRS(a2));
- assertFalse("characterizedByCRS",
NameConvention.characterizedByCRS(a3));
+ assertFalse("characterizedByCRS",
AttributeConvention.characterizedByCRS(a0));
+ assertFalse("characterizedByCRS",
AttributeConvention.characterizedByCRS(a1));
+ assertTrue ("characterizedByCRS",
AttributeConvention.characterizedByCRS(a2));
+ assertFalse("characterizedByCRS",
AttributeConvention.characterizedByCRS(a3));
}
/**
@@ -231,10 +231,10 @@ public final strictfp class FeatureTypeB
final PropertyType a4 = it.next();
assertFalse("properties count", it.hasNext());
- assertEquals("name", NameConvention.ID_PROPERTY,
a0.getName());
- assertEquals("name", NameConvention.ENVELOPE_PROPERTY,
a1.getName());
- assertEquals("name", NameConvention.DEFAULT_GEOMETRY_PROPERTY,
a2.getName());
- assertEquals("name", "name",
a3.getName().toString());
- assertEquals("name", "shape",
a4.getName().toString());
+ assertEquals("name", AttributeConvention.ID_PROPERTY,
a0.getName());
+ assertEquals("name", AttributeConvention.ENVELOPE_PROPERTY,
a1.getName());
+ assertEquals("name", AttributeConvention.DEFAULT_GEOMETRY_PROPERTY,
a2.getName());
+ assertEquals("name", "name",
a3.getName().toString());
+ assertEquals("name", "shape",
a4.getName().toString());
}
}
Modified:
sis/branches/JDK8/core/sis-feature/src/test/java/org/apache/sis/test/suite/FeatureTestSuite.java
URL:
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-feature/src/test/java/org/apache/sis/test/suite/FeatureTestSuite.java?rev=1740143&r1=1740142&r2=1740143&view=diff
==============================================================================
---
sis/branches/JDK8/core/sis-feature/src/test/java/org/apache/sis/test/suite/FeatureTestSuite.java
[UTF-8] (original)
+++
sis/branches/JDK8/core/sis-feature/src/test/java/org/apache/sis/test/suite/FeatureTestSuite.java
[UTF-8] Wed Apr 20 13:21:27 2016
@@ -50,7 +50,7 @@ import org.junit.BeforeClass;
org.apache.sis.feature.FeaturesTest.class,
org.apache.sis.filter.DefaultLiteralTest.class,
org.apache.sis.filter.DefaultPropertyNameTest.class,
- org.apache.sis.internal.feature.NameConventionTest.class,
+ org.apache.sis.internal.feature.AttributeConventionTest.class,
org.apache.sis.internal.feature.FeatureTypeBuilderTest.class
})
public final strictfp class FeatureTestSuite extends TestSuite {
Modified:
sis/branches/JDK8/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/gpx/GPXConstants.java
URL:
http://svn.apache.org/viewvc/sis/branches/JDK8/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/gpx/GPXConstants.java?rev=1740143&r1=1740142&r2=1740143&view=diff
==============================================================================
---
sis/branches/JDK8/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/gpx/GPXConstants.java
[UTF-8] (original)
+++
sis/branches/JDK8/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/gpx/GPXConstants.java
[UTF-8] Wed Apr 20 13:21:27 2016
@@ -29,7 +29,7 @@ import org.apache.sis.feature.DefaultAtt
import org.apache.sis.feature.DefaultFeatureType;
import org.apache.sis.feature.DefaultAssociationRole;
import org.apache.sis.internal.feature.FeatureTypeBuilder;
-import org.apache.sis.internal.feature.NameConvention;
+import org.apache.sis.internal.feature.AttributeConvention;
import org.apache.sis.internal.system.DefaultFactories;
import org.apache.sis.referencing.CommonCRS;
import org.apache.sis.util.Static;
@@ -228,7 +228,7 @@ public final class GPXConstants extends
static {
final NameFactory factory =
DefaultFactories.forBuildin(NameFactory.class);
- final LocalName geomName =
NameConvention.DEFAULT_GEOMETRY_PROPERTY;
+ final LocalName geomName =
AttributeConvention.DEFAULT_GEOMETRY_PROPERTY;
final Map<String,?> geomInfo =
Collections.singletonMap(AbstractIdentifiedType.NAME_KEY, geomName);
//-------------------- GENERIC GPX ENTITY
------------------------------
@@ -310,7 +310,7 @@ public final class GPXConstants extends
new GroupPointsAsPolylineOperation(geomInfo,
attWayPoints.getName(), geomName),
null
};
- final Map<String,?> envelopeInfo =
Collections.singletonMap(AbstractIdentifiedType.NAME_KEY,
NameConvention.ENVELOPE_PROPERTY);
+ final Map<String,?> envelopeInfo =
Collections.singletonMap(AbstractIdentifiedType.NAME_KEY,
AttributeConvention.ENVELOPE_PROPERTY);
try {
properties[properties.length - 1] =
FeatureOperations.envelope(envelopeInfo, null, properties);
} catch (FactoryException e) {