conflict_resolution
stringlengths
27
16k
<<<<<<< import org.apache.sis.geometry.AbstractEnvelope; ======= import org.apache.sis.internal.util.CollectionsExt; import org.apache.sis.internal.simple.SimpleDuration; import org.apache.sis.geometry.AbstractEnvelope; >>>>>>> import org.apache.sis.internal.util.CollectionsExt; import org.apache.sis.geometry.AbstractEnvelope; <<<<<<< public final GenericName addFeatureType(final DefaultFeatureType type, final Integer occurrences) { ======= public final GenericName addFeatureType(final FeatureType type, final long occurrences) { >>>>>>> public final GenericName addFeatureType(final DefaultFeatureType type, final long occurrences) {
<<<<<<< import org.apache.http.client.HttpClient; ======= import com.ning.http.client.FluentStringsMap; import com.ning.http.client.filter.FilterContext; import com.ning.http.client.filter.FilterException; import com.ning.http.client.filter.RequestFilter; >>>>>>> import org.apache.http.client.HttpClient; <<<<<<< ======= import org.codehaus.plexus.component.annotations.Requirement; import org.codehaus.plexus.util.StringUtils; >>>>>>> import org.codehaus.plexus.component.annotations.Requirement; <<<<<<< import org.sonatype.nexus.proxy.storage.remote.RemoteStorageContext; import org.sonatype.nexus.proxy.storage.remote.httpclient.HttpClientRemoteStorage; import org.sonatype.nexus.proxy.storage.remote.httpclient.HttpClientUtil; ======= import org.sonatype.nexus.proxy.storage.remote.http.QueryStringBuilder; >>>>>>> import org.sonatype.nexus.proxy.storage.remote.RemoteStorageContext; import org.sonatype.nexus.proxy.storage.remote.http.QueryStringBuilder; <<<<<<< ======= @Requirement private AhcProvider ahcProvider; @Requirement private QueryStringBuilder queryStringBuilder; >>>>>>> @Requirement private QueryStringBuilder queryStringBuilder; <<<<<<< private HttpClient getHttpClient(final ProxyRepository proxyRepository) { RemoteStorageContext ctx = proxyRepository.getRemoteStorageContext(); HttpClient client = HttpClientUtil.getHttpClient(HttpClientRemoteStorage.CTX_KEY, ctx); if (client == null) { client = HttpClientUtil.configure(HttpClientRemoteStorage.CTX_KEY, proxyRepository.getRemoteStorageContext(), logger); } ======= protected AsyncHttpClient getHttpClient( final ProxyRepository proxyRepository ) { final AsyncHttpClientConfig.Builder clientConfigBuilder = ahcProvider.getAsyncHttpClientConfigBuilder( proxyRepository, proxyRepository.getRemoteStorageContext() ); clientConfigBuilder.setFollowRedirects( true ); clientConfigBuilder.setMaximumNumberOfRedirects( 3 ); clientConfigBuilder.setMaxRequestRetry( 2 ); // HACK: In query string parameters (see NXCM-4737) // FIXME: This should probably be handled in the AhcProvider for all users of legacy AHC client String queryString = queryStringBuilder.getQueryString( proxyRepository.getRemoteStorageContext(), proxyRepository ); if ( StringUtils.isNotBlank( queryString ) ) { final Map<String,String> parsed = QueryStrings.parse( queryString ); clientConfigBuilder.addRequestFilter( new RequestFilter() { @Override public FilterContext filter( final FilterContext filterContext ) throws FilterException { FluentStringsMap queryParams = filterContext.getRequest().getQueryParams(); for ( Map.Entry<String,String> entry : parsed.entrySet() ) { queryParams.add( entry.getKey(), entry.getValue() ); } return filterContext; } }); } final AsyncHttpClient client = new AsyncHttpClient( clientConfigBuilder.build() ); >>>>>>> private HttpClient getHttpClient(final ProxyRepository proxyRepository) { // FIXME: Use Hc4Provider... RemoteStorageContext ctx = proxyRepository.getRemoteStorageContext(); HttpClient client = HttpClientUtil.getHttpClient(HttpClientRemoteStorage.CTX_KEY, ctx); if (client == null) { client = HttpClientUtil.configure(HttpClientRemoteStorage.CTX_KEY, proxyRepository.getRemoteStorageContext(), logger); }
<<<<<<< // Related to JDK7 import org.apache.sis.internal.jdk7.Objects; ======= // Branch-dependent imports import java.util.Objects; >>>>>>> // Branch-dependent imports import org.apache.sis.internal.jdk7.Objects;
<<<<<<< ======= // Branch-dependent imports import org.opengis.feature.Attribute; import org.opengis.feature.AttributeType; import org.opengis.feature.Feature; import org.opengis.feature.InvalidPropertyValueException; >>>>>>>
<<<<<<< import static org.opengis.annotation.Obligation.OPTIONAL; import static org.opengis.annotation.Obligation.MANDATORY; import static org.opengis.annotation.Specification.ISO_19115; ======= // Branch-dependent imports import org.apache.sis.internal.jdk8.BiConsumer; >>>>>>> // Branch-dependent imports import org.apache.sis.internal.jdk8.BiConsumer; import static org.opengis.annotation.Obligation.OPTIONAL; import static org.opengis.annotation.Obligation.MANDATORY; import static org.opengis.annotation.Specification.ISO_19115;
<<<<<<< return getTaskRequest( "service/local/schedules?allTasks=true" ); } private static List<ScheduledServiceListResource> getTaskRequest( String uri ) throws IOException { try { String entityText = RequestFacade.doGetForText( uri, isSuccessful() ); XStreamRepresentation representation = new XStreamRepresentation( xstream, entityText, MediaType.APPLICATION_XML ); ScheduledServiceListResourceResponse scheduleResponse = (ScheduledServiceListResourceResponse) representation.getPayload( new ScheduledServiceListResourceResponse() ); return scheduleResponse.getData(); } catch ( AssertionError e ) { // unsuccessful GET LOG.error( e.getMessage(), e ); return Collections.emptyList(); } ======= return nexusTasksRestClient.getAllTasks(); >>>>>>> return nexusTasksRestClient.getAllTasks(); <<<<<<< * * @param taskType task type ======= * * @param taskType task type >>>>>>> * * @param taskType task type <<<<<<< waitForTask( name, maxAttempts, false ); } public static void waitForTask( String name, int maxAttempts, boolean failIfNotFinished ) throws Exception { if ( maxAttempts == 0 ) { return; } String uri = "service/local/taskhelper?attempts=" + maxAttempts; if ( name != null ) { uri += "&name=" + name; } final Status status = RequestFacade.doGetForStatus( uri ); if ( failIfNotFinished ) { if ( Status.SUCCESS_NO_CONTENT.equals( status ) ) { throw new IOException( "The taskhelper REST resource reported that task named '" + name + "' still running after '" + maxAttempts + "' cycles! This may indicate a performance issue." ); } } else { if ( !status.isSuccess() ) { throw new IOException( "The taskhelper REST resource reported an error (" + status.toString() + "), bailing out!" ); } } ======= nexusTasksRestClient.waitForTask( name, maxAttempts ); >>>>>>> nexusTasksRestClient.waitForTask( name, maxAttempts ); } public static void waitForTask( String name, int maxAttempts, boolean failIfNotFinished ) throws Exception { nexusTasksRestClient.waitForTask( name, maxAttempts, failIfNotFinished ); <<<<<<< runTask( taskName, typeId, maxAttempts, false, properties ); } public static void runTask( String taskName, String typeId, int maxAttempts, boolean failIfNotFinished, ScheduledServicePropertyResource... properties ) throws Exception { ScheduledServiceBaseResource scheduledTask = new ScheduledServiceBaseResource(); scheduledTask.setEnabled( true ); scheduledTask.setId( null ); scheduledTask.setName( taskName ); scheduledTask.setTypeId( typeId ); scheduledTask.setSchedule( "manual" ); for ( ScheduledServicePropertyResource property : properties ) { scheduledTask.addProperty( property ); } Status status = TaskScheduleUtil.create( scheduledTask ); Assert.assertTrue( status.isSuccess(), "Unable to create task:" + scheduledTask.getTypeId() ); String taskId = TaskScheduleUtil.getTask( scheduledTask.getName() ).getId(); status = TaskScheduleUtil.run( taskId ); Assert.assertTrue( status.isSuccess(), "Unable to run task:" + scheduledTask.getTypeId() ); waitForTask( taskName, maxAttempts, failIfNotFinished ); ======= nexusTasksRestClient.runTask( taskName, typeId, maxAttempts, properties ); >>>>>>> nexusTasksRestClient.runTask( taskName, typeId, maxAttempts, properties ); } public static void runTask( String taskName, String typeId, int maxAttempts, boolean failIfNotFinished, ScheduledServicePropertyResource... properties ) throws Exception { nexusTasksRestClient.runTask( taskName, typeId, maxAttempts, failIfNotFinished, properties );
<<<<<<< // Branch-dependent imports import org.apache.sis.internal.jdk8.Stream; import org.opengis.feature.Feature; ======= import org.opengis.metadata.Metadata; import org.apache.sis.storage.DataStore; import org.apache.sis.setup.GeometryLibrary; import org.apache.sis.internal.feature.Geometries; import org.apache.sis.internal.storage.AbstractFeatureSet; import org.apache.sis.util.logging.WarningListeners; import org.apache.sis.util.resources.Errors; >>>>>>> // Branch-dependent imports import org.opengis.metadata.Metadata; import org.apache.sis.storage.DataStore; import org.apache.sis.setup.GeometryLibrary; import org.apache.sis.internal.feature.Geometries; import org.apache.sis.internal.storage.AbstractFeatureSet; import org.apache.sis.util.logging.WarningListeners; import org.apache.sis.util.resources.Errors;
<<<<<<< ======= import org.opengis.util.NameFactory; import org.opengis.metadata.Identifier; >>>>>>> import org.opengis.util.NameFactory; <<<<<<< final NameSpace scope = SIS_NAMES.createNameSpace(SIS_NAMES.createLocalName(null, "OGP"), null); final NamedIdentifier identifier = new NamedIdentifier(SIS_NAMES.createGenericName(scope, "EPSG", "4326")); Validators.validate((ReferenceIdentifier) identifier); ======= final NameFactory factory = DefaultFactories.forBuildin(NameFactory.class); final NameSpace scope = factory.createNameSpace(factory.createLocalName(null, "OGP"), null); final NamedIdentifier identifier = new NamedIdentifier(factory.createGenericName(scope, "EPSG", "4326")); Validators.validate((Identifier) identifier); >>>>>>> final NameFactory factory = DefaultFactories.forBuildin(NameFactory.class); final NameSpace scope = factory.createNameSpace(factory.createLocalName(null, "OGP"), null); final NamedIdentifier identifier = new NamedIdentifier(factory.createGenericName(scope, "EPSG", "4326")); Validators.validate((ReferenceIdentifier) identifier);
<<<<<<< import org.opengis.annotation.UML; ======= import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; >>>>>>> import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; <<<<<<< /// @XmlElement(name = "description") @UML(identifier="description", obligation=OPTIONAL, specification=ISO_19115) ======= @Override @XmlElement(name = "description") @XmlJavaTypeAdapter(InternationalStringAdapter.Since2014.class) >>>>>>> @XmlElement(name = "description") @XmlJavaTypeAdapter(InternationalStringAdapter.Since2014.class) @UML(identifier="description", obligation=OPTIONAL, specification=ISO_19115) <<<<<<< /// @XmlElement(name = "name") @UML(identifier="name", obligation=OPTIONAL, specification=ISO_19115) ======= @Override // @XmlElement at the end of this class. >>>>>>> // @XmlElement at the end of this class. @UML(identifier="name", obligation=OPTIONAL, specification=ISO_19115)
<<<<<<< import org.apache.sis.feature.AbstractFeature; ======= import org.apache.sis.storage.DataStoreClosedException; import org.opengis.feature.Feature; >>>>>>> import org.apache.sis.storage.DataStoreClosedException; import org.apache.sis.feature.AbstractFeature; <<<<<<< public AbstractFeature readFeature() throws SQLConnectionClosedException, SQLInvalidStatementException, SQLIllegalParameterException, SQLNoSuchFieldException, SQLUnsupportedParsingFeatureException, SQLNotNumericException, SQLNotDateException, SQLFeatureNotSupportedException, SQLIllegalColumnIndexException, InvalidShapefileFormatException { ======= private Feature internalReadFeature() throws SQLConnectionClosedException, SQLInvalidStatementException, SQLIllegalParameterException, SQLNoSuchFieldException, SQLUnsupportedParsingFeatureException, SQLNotNumericException, SQLNotDateException, SQLFeatureNotSupportedException, InvalidShapefileFormatException { >>>>>>> private AbstractFeature internalReadFeature() throws SQLConnectionClosedException, SQLInvalidStatementException, SQLIllegalParameterException, SQLNoSuchFieldException, SQLUnsupportedParsingFeatureException, SQLNotNumericException, SQLNotDateException, SQLFeatureNotSupportedException, InvalidShapefileFormatException {
<<<<<<< ======= // Branch-dependent imports import org.opengis.coverage.grid.GridEnvelope; import org.opengis.coverage.grid.GridCoordinates; import org.opengis.coverage.CannotEvaluateException; import org.opengis.coverage.PointOutsideCoverageException; >>>>>>>
<<<<<<< * <div class="warning"><b>Upcoming API change — multiplicity</b><br> * As of ISO 19115:2014, this singleton has been replaced by a collection. * This change will tentatively be applied in GeoAPI 4.0. * </div> * * @return Time period when individuals can contact the organization or individual, or {@code null}. ======= * @return time period when individuals can contact the organization or individual. >>>>>>> * <div class="warning"><b>Upcoming API change — multiplicity</b><br> * As of ISO 19115:2014, this singleton has been replaced by a collection. * This change will tentatively be applied in GeoAPI 4.0. * </div> * * @return time period when individuals can contact the organization or individual. <<<<<<< * <div class="warning"><b>Upcoming API change — multiplicity</b><br> * As of ISO 19115:2014, this singleton has been replaced by a collection. * This change will tentatively be applied in GeoAPI 4.0. * </div> * * @param newValue The new hours of service, or {@code null} if none. ======= * @param newValues the new hours of service. >>>>>>> * <div class="warning"><b>Upcoming API change — multiplicity</b><br> * As of ISO 19115:2014, this singleton has been replaced by a collection. * This change will tentatively be applied in GeoAPI 4.0. * </div> * * @param newValue the new hours of service.
<<<<<<< for (int i=0; i<table.length; i++) { for (Entry el=table[i]; el!=null; el=(Entry) el.next) { final Map.Entry<K,V> entry = new SimpleEntry<K,V>(el); ======= for (Entry el : table) { while (el != null) { final Map.Entry<K,V> entry = new SimpleEntry<>(el); >>>>>>> for (Entry el : table) { while (el != null) { final Map.Entry<K,V> entry = new SimpleEntry<K,V>(el);
<<<<<<< final double[] transformedData = new double[expectedData.length]; ======= toleranceModifier = null; final double[] transformedData = new double[StrictMath.max(sourceDim, targetDim) * numPts]; >>>>>>> final double[] transformedData = new double[StrictMath.max(sourceDim, targetDim) * numPts]; <<<<<<< assertCoordinatesEqual("Direct transform.", passthroughDim, expectedData, 0, transformedData, 0, numPts, false); ======= assertCoordinatesEqual("PassThroughTransform results do not match the results computed by this test.", targetDim, expectedData, 0, transformedData, 0, numPts, CalculationType.DIRECT_TRANSFORM); >>>>>>> assertCoordinatesEqual("PassThroughTransform results do not match the results computed by this test.", targetDim, expectedData, 0, transformedData, 0, numPts, false); <<<<<<< tolerance = 1E-8; Arrays.fill(transformedData, Double.NaN); transform.inverse().transform(expectedData, 0, transformedData, 0, numPts); assertCoordinatesEqual("Inverse transform.", passthroughDim, passthroughData, 0, transformedData, 0, numPts, false); ======= if (isInverseTransformSupported) { tolerance = 1E-8; toleranceModifier = ToleranceModifier.RELATIVE; Arrays.fill(transformedData, Double.NaN); transform.inverse().transform(expectedData, 0, transformedData, 0, numPts); assertCoordinatesEqual("Inverse of PassThroughTransform do not give back the original data.", sourceDim, passthroughData, 0, transformedData, 0, numPts, CalculationType.INVERSE_TRANSFORM); } >>>>>>> if (isInverseTransformSupported) { tolerance = 1E-8; Arrays.fill(transformedData, Double.NaN); transform.inverse().transform(expectedData, 0, transformedData, 0, numPts); assertCoordinatesEqual("Inverse of PassThroughTransform do not give back the original data.", sourceDim, passthroughData, 0, transformedData, 0, numPts, false); } <<<<<<< ======= /* * We use a relatively high tolerance threshold because result are * computed using inputs stored as float values. */ if (transform instanceof LinearTransform) { tolerance = 1E-4; toleranceModifier = ToleranceModifier.RELATIVE; assertCoordinatesEqual("PassThroughTransform.transform(…) variants produce inconsistent results.", sourceDim, expectedData, 0, targetAsFloat, 0, numPts, CalculationType.DIRECT_TRANSFORM); } >>>>>>>
<<<<<<< import org.sonatype.nexus.rest.model.NexusNGArtifact; ======= import org.sonatype.nexus.proxy.ResourceStoreRequest; import org.sonatype.nexus.proxy.repository.Repository; >>>>>>> import org.sonatype.nexus.rest.model.NexusNGArtifact; import org.sonatype.nexus.proxy.ResourceStoreRequest; import org.sonatype.nexus.proxy.repository.Repository;
<<<<<<< import org.apache.sis.internal.shapefile.InvalidShapefileFormatException; import org.apache.sis.internal.shapefile.ShapefileNotFoundException; import org.apache.sis.internal.shapefile.jdbc.DbaseFileNotFoundException; import org.apache.sis.internal.shapefile.jdbc.InvalidDbaseFileFormatException; import org.apache.sis.internal.shapefile.jdbc.sql.SQLInvalidStatementException; // Branch-dependent imports import org.apache.sis.internal.jdk7.Objects; ======= >>>>>>> // Branch-dependent imports import org.apache.sis.internal.jdk7.Objects;
<<<<<<< ======= import org.slf4j.Logger; import org.slf4j.LoggerFactory; >>>>>>> import org.slf4j.Logger; import org.slf4j.LoggerFactory; <<<<<<< public class NexusStatusUtil { protected static Logger log = LoggerFactory.getLogger( NexusStatusUtil.class ); ======= public class NexusStatusUtil { protected static Logger log = LoggerFactory.getLogger(NexusStatusUtil.class); >>>>>>> public class NexusStatusUtil { protected static Logger log = LoggerFactory.getLogger(NexusStatusUtil.class);
<<<<<<< // Related to JDK7 import org.apache.sis.internal.jdk7.Objects; ======= // Branch-dependent imports import java.util.Objects; >>>>>>> // Branch-dependent imports import org.apache.sis.internal.jdk7.Objects;
<<<<<<< import org.opengis.annotation.UML; ======= import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; >>>>>>> import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; <<<<<<< import org.opengis.metadata.quality.Scope; import org.apache.sis.metadata.iso.citation.DefaultResponsibility; ======= import org.opengis.metadata.maintenance.Scope; import org.apache.sis.internal.jaxb.FilterByVersion; import org.apache.sis.internal.jaxb.metadata.MD_Releasability; import org.apache.sis.internal.jaxb.metadata.MD_Scope; >>>>>>> import org.opengis.metadata.quality.Scope; import org.apache.sis.metadata.iso.citation.DefaultResponsibility; import org.apache.sis.internal.jaxb.FilterByVersion; import org.apache.sis.internal.jaxb.metadata.MD_Releasability; import org.apache.sis.internal.jaxb.metadata.MD_Scope; <<<<<<< /// @XmlElement(name = "constraintApplicationScope") @UML(identifier="constraintApplicationScope", obligation=OPTIONAL, specification=ISO_19115) ======= @Override @XmlElement(name = "constraintApplicationScope") @XmlJavaTypeAdapter(MD_Scope.Since2014.class) >>>>>>> @XmlElement(name = "constraintApplicationScope") @XmlJavaTypeAdapter(MD_Scope.Since2014.class) @UML(identifier="constraintApplicationScope", obligation=OPTIONAL, specification=ISO_19115) <<<<<<< /// @XmlElement(name = "graphic") @UML(identifier="graphic", obligation=OPTIONAL, specification=ISO_19115) ======= @Override // @XmlElement at the end of this class. >>>>>>> // @XmlElement at the end of this class. @UML(identifier="graphic", obligation=OPTIONAL, specification=ISO_19115) <<<<<<< /// @XmlElement(name = "reference") @UML(identifier="reference", obligation=OPTIONAL, specification=ISO_19115) ======= @Override // @XmlElement at the end of this class. >>>>>>> // @XmlElement at the end of this class. @UML(identifier="reference", obligation=OPTIONAL, specification=ISO_19115) <<<<<<< /// @XmlElement(name = "releasability") @UML(identifier="releasability", obligation=OPTIONAL, specification=ISO_19115) public DefaultReleasability getReleasability() { ======= @Override @XmlElement(name = "releasability") @XmlJavaTypeAdapter(MD_Releasability.Since2014.class) public Releasability getReleasability() { >>>>>>> @XmlElement(name = "releasability") @XmlJavaTypeAdapter(MD_Releasability.Since2014.class) @UML(identifier="releasability", obligation=OPTIONAL, specification=ISO_19115) public DefaultReleasability getReleasability() { <<<<<<< /// @XmlElement(name = "responsibleParty") @UML(identifier="responsibleParty", obligation=OPTIONAL, specification=ISO_19115) public Collection<DefaultResponsibility> getResponsibleParties() { return responsibleParties = nonNullCollection(responsibleParties, DefaultResponsibility.class); ======= @Override // @XmlElement at the end of this class. public Collection<Responsibility> getResponsibleParties() { return responsibleParties = nonNullCollection(responsibleParties, Responsibility.class); >>>>>>> // @XmlElement at the end of this class. @UML(identifier="responsibleParty", obligation=OPTIONAL, specification=ISO_19115) public Collection<DefaultResponsibility> getResponsibleParties() { return responsibleParties = nonNullCollection(responsibleParties, DefaultResponsibility.class);
<<<<<<< import org.apache.sis.internal.jdk7.Objects; import org.apache.sis.io.wkt.Formatter; ======= import java.util.Objects; >>>>>>> import org.apache.sis.internal.jdk7.Objects; <<<<<<< final boolean setAccuracy = (coordinateOperationAccuracy == null); final List<CoordinateOperation> flattened = new ArrayList<CoordinateOperation>(operations.length); initialize(properties, operations, flattened, mtFactory, setAccuracy); ======= final List<CoordinateOperation> flattened = new ArrayList<>(operations.length); initialize(properties, operations, flattened, mtFactory, (coordinateOperationAccuracy == null)); >>>>>>> final List<CoordinateOperation> flattened = new ArrayList<CoordinateOperation>(operations.length); initialize(properties, operations, flattened, mtFactory, (coordinateOperationAccuracy == null)); <<<<<<< if (setAccuracy && op instanceof Transformation) { Collection<PositionalAccuracy> candidates = op.getCoordinateOperationAccuracy(); if (!Containers.isNullOrEmpty(candidates)) { if (coordinateOperationAccuracy == null) { coordinateOperationAccuracy = new LinkedHashSet<PositionalAccuracy>(); ======= if (setAccuracy && (op instanceof Transformation || op instanceof ConcatenatedOperation)) { if (coordinateOperationAccuracy == null) { setAccuracy = (PositionalAccuracyConstant.getLinearAccuracy(op) > 0); if (setAccuracy) { coordinateOperationAccuracy = op.getCoordinateOperationAccuracy(); >>>>>>> if (setAccuracy && (op instanceof Transformation || op instanceof ConcatenatedOperation)) { if (coordinateOperationAccuracy == null) { setAccuracy = (PositionalAccuracyConstant.getLinearAccuracy(op) > 0); if (setAccuracy) { coordinateOperationAccuracy = op.getCoordinateOperationAccuracy(); <<<<<<< final List<CoordinateOperation> flattened = new ArrayList<CoordinateOperation>(steps.length); initialize(null, steps, flattened, DefaultFactories.forBuildin(MathTransformFactory.class), true); ======= final List<CoordinateOperation> flattened = new ArrayList<>(steps.length); initialize(null, steps, flattened, DefaultFactories.forBuildin(MathTransformFactory.class), coordinateOperationAccuracy == null); >>>>>>> final List<CoordinateOperation> flattened = new ArrayList<CoordinateOperation>(steps.length); initialize(null, steps, flattened, DefaultFactories.forBuildin(MathTransformFactory.class), coordinateOperationAccuracy == null);
<<<<<<< import javax.measure.Unit; import javax.measure.quantity.Angle; import javax.measure.quantity.Length; import org.opengis.metadata.extent.Extent; ======= import org.opengis.metadata.Identifier; import org.opengis.util.FactoryException; >>>>>>> import org.opengis.util.FactoryException; <<<<<<< import org.opengis.referencing.ReferenceIdentifier; ======= import org.opengis.metadata.citation.Citation; >>>>>>> import org.opengis.referencing.ReferenceIdentifier; import org.opengis.metadata.citation.Citation; <<<<<<< public PJ(ReferenceIdentifier name, final String definition) throws InvalidGeodeticParameterException { super(name != null ? name : identifier(definition, "+datum=")); ======= public PJ(final String definition) throws InvalidGeodeticParameterException { >>>>>>> public PJ(final String definition) throws InvalidGeodeticParameterException {
<<<<<<< static final DefaultAttributeType<Polyline> RESULT_TYPE = new DefaultAttributeType<>( Collections.singletonMap(NAME_KEY, AttributeConvention.ENVELOPE_PROPERTY), Polyline.class, 1, 1, null); ======= private final String association; >>>>>>> private final String association; <<<<<<< public final DefaultAttributeType<Polyline> getResult() { return RESULT_TYPE; ======= public final AttributeType<?> getResult() { return result; >>>>>>> public final DefaultAttributeType<?> getResult() { return result; <<<<<<< public final Object apply(AbstractFeature feature, ParameterValueGroup parameters) { return new Result(feature); } /** * Invoked for every geometric objects to put in a single polyline. * * @param addTo where to add the geometry object. * @param geometry the point or polyline to add to {@code addTo}. * @param isFirst whether {@code geometry} is the first object added to the given polyline. */ void addGeometry(final Polyline addTo, final Object geometry, final boolean isFirst) { addTo.add((Polyline) geometry, false); ======= @SuppressWarnings({"rawtypes", "unchecked"}) public final Property apply(Feature feature, ParameterValueGroup parameters) { return new Result(feature, association, result); >>>>>>> @SuppressWarnings({"rawtypes", "unchecked"}) public final Object apply(AbstractFeature feature, ParameterValueGroup parameters) { return new Result(feature, association, result); <<<<<<< Result(final AbstractFeature feature) { super(RESULT_TYPE); ======= Result(final Feature feature, final String association, final AttributeType<G> result) { super(result); >>>>>>> Result(final AbstractFeature feature, final String association, final DefaultAttributeType<G> result) { super(result); <<<<<<< boolean isFirst = true; geometry = new Polyline(); for (final Object child : (Collection<?>) feature.getPropertyValue(association)) { addGeometry(geometry, ((AbstractFeature) child).getPropertyValue("sis:geometry"), isFirst); isFirst = false; } ======= final Iterator<?> it = ((Collection<?>) feature.getPropertyValue(association)).iterator(); final Object geom = Geometries.mergePolylines(new Iterator<Object>() { @Override public boolean hasNext() { return it.hasNext(); } @Override public Object next() { return ((Feature) it.next()).getPropertyValue("sis:geometry"); } @Override public void remove() { throw new UnsupportedOperationException(); } }); geometry = getType().getValueClass().cast(geom); >>>>>>> final Iterator<?> it = ((Collection<?>) feature.getPropertyValue(association)).iterator(); final Object geom = Geometries.mergePolylines(new Iterator<Object>() { @Override public boolean hasNext() { return it.hasNext(); } @Override public Object next() { return ((AbstractFeature) it.next()).getPropertyValue("sis:geometry"); } @Override public void remove() { throw new UnsupportedOperationException(); } }); geometry = getType().getValueClass().cast(geom); <<<<<<< public void setValue(Polyline value) { throw new UnsupportedOperationException(Errors.format(Errors.Keys.UnmodifiableObject_1, AbstractAttribute.class)); ======= public void setValue(G value) { throw new UnsupportedOperationException(Errors.format(Errors.Keys.UnmodifiableObject_1, Attribute.class)); >>>>>>> public void setValue(G value) { throw new UnsupportedOperationException(Errors.format(Errors.Keys.UnmodifiableObject_1, AbstractAttribute.class));
<<<<<<< * <div class="warning"><b>Upcoming API change — specialization</b><br> * The return type will be changed to the {@code CouplingType} code list * when GeoAPI will provide it (tentatively in GeoAPI 3.1). * </div> * * @return Type of coupling between service and associated data, or {@code null} if none. ======= * @return type of coupling between service and associated data, or {@code null} if none. >>>>>>> * <div class="warning"><b>Upcoming API change — specialization</b><br> * The return type will be changed to the {@code CouplingType} code list * when GeoAPI will provide it (tentatively in GeoAPI 3.1). * </div> * * @return type of coupling between service and associated data, or {@code null} if none. <<<<<<< * <div class="warning"><b>Upcoming API change — specialization</b><br> * The argument type will be changed to the {@code CouplingType} code list when GeoAPI will provide it * (tentatively in GeoAPI 3.1). In the meantime, users can define their own code list class as below: * * {@preformat java * final class UnsupportedCodeList extends CodeList<UnsupportedCodeList> { * private static final List<UnsupportedCodeList> VALUES = new ArrayList<UnsupportedCodeList>(); * * // Need to declare at least one code list element. * public static final UnsupportedCodeList MY_CODE_LIST = new UnsupportedCodeList("MY_CODE_LIST"); * * private UnsupportedCodeList(String name) { * super(name, VALUES); * } * * public static UnsupportedCodeList valueOf(String code) { * return valueOf(UnsupportedCodeList.class, code); * } * * &#64;Override * public UnsupportedCodeList[] family() { * synchronized (VALUES) { * return VALUES.toArray(new UnsupportedCodeList[VALUES.size()]); * } * } * } * } * </div> * * @param newValue The new type of coupling between service and associated data. ======= * @param newValue the new type of coupling between service and associated data. >>>>>>> * <div class="warning"><b>Upcoming API change — specialization</b><br> * The argument type will be changed to the {@code CouplingType} code list when GeoAPI will provide it * (tentatively in GeoAPI 3.1). In the meantime, users can define their own code list class as below: * * {@preformat java * final class UnsupportedCodeList extends CodeList<UnsupportedCodeList> { * private static final List<UnsupportedCodeList> VALUES = new ArrayList<UnsupportedCodeList>(); * * // Need to declare at least one code list element. * public static final UnsupportedCodeList MY_CODE_LIST = new UnsupportedCodeList("MY_CODE_LIST"); * * private UnsupportedCodeList(String name) { * super(name, VALUES); * } * * public static UnsupportedCodeList valueOf(String code) { * return valueOf(UnsupportedCodeList.class, code); * } * * &#64;Override * public UnsupportedCodeList[] family() { * synchronized (VALUES) { * return VALUES.toArray(new UnsupportedCodeList[VALUES.size()]); * } * } * } * } * </div> * * @param newValue the new type of coupling between service and associated data. <<<<<<< * <div class="warning"><b>Upcoming API change — generalization</b><br> * The element type will be changed to the {@code CoupledResource} interface * when GeoAPI will provide it (tentatively in GeoAPI 3.1). * </div> * * @return Further description(s) of the data coupling in the case of tightly coupled services. ======= * @return further description(s) of the data coupling in the case of tightly coupled services. >>>>>>> * <div class="warning"><b>Upcoming API change — generalization</b><br> * The element type will be changed to the {@code CoupledResource} interface * when GeoAPI will provide it (tentatively in GeoAPI 3.1). * </div> * * @return further description(s) of the data coupling in the case of tightly coupled services. <<<<<<< * <div class="warning"><b>Upcoming API change — generalization</b><br> * The element type will be changed to the {@code CoupledResource} interface * when GeoAPI will provide it (tentatively in GeoAPI 3.1). * </div> * * @param newValues The new further description(s) of the data coupling. ======= * @param newValues the new further description(s) of the data coupling. >>>>>>> * <div class="warning"><b>Upcoming API change — generalization</b><br> * The element type will be changed to the {@code CoupledResource} interface * when GeoAPI will provide it (tentatively in GeoAPI 3.1). * </div> * * @param newValues the new further description(s) of the data coupling. <<<<<<< * <div class="warning"><b>Upcoming API change — generalization</b><br> * The element type will be changed to the {@code OperationMetadata} interface * when GeoAPI will provide it (tentatively in GeoAPI 3.1). * </div> * * @return Information about the operations that comprise the service. ======= * @return information about the operations that comprise the service. >>>>>>> * <div class="warning"><b>Upcoming API change — generalization</b><br> * The element type will be changed to the {@code OperationMetadata} interface * when GeoAPI will provide it (tentatively in GeoAPI 3.1). * </div> * * @return information about the operations that comprise the service. <<<<<<< * <div class="warning"><b>Upcoming API change — generalization</b><br> * The element type will be changed to the {@code OperationMetadata} interface * when GeoAPI will provide it (tentatively in GeoAPI 3.1). * </div> * * @param newValues The new information(s) about the operations that comprise the service. ======= * @param newValues the new information(s) about the operations that comprise the service. >>>>>>> * <div class="warning"><b>Upcoming API change — generalization</b><br> * The element type will be changed to the {@code OperationMetadata} interface * when GeoAPI will provide it (tentatively in GeoAPI 3.1). * </div> * * @param newValues the new information(s) about the operations that comprise the service. <<<<<<< * <div class="warning"><b>Upcoming API change — generalization</b><br> * The element type will be changed to the {@code OperationChainMetadata} interface * when GeoAPI will provide it (tentatively in GeoAPI 3.1). * </div> * * @return Information about the chain applied by the service. ======= * @return information about the chain applied by the service. >>>>>>> * <div class="warning"><b>Upcoming API change — generalization</b><br> * The element type will be changed to the {@code OperationChainMetadata} interface * when GeoAPI will provide it (tentatively in GeoAPI 3.1). * </div> * * @return information about the chain applied by the service. <<<<<<< * <div class="warning"><b>Upcoming API change — generalization</b><br> * The element type will be changed to the {@code OperationChainMetadata} interface * when GeoAPI will provide it (tentatively in GeoAPI 3.1). * </div> * * @param newValues The new information about the chain applied by the service. ======= * @param newValues the new information about the chain applied by the service. >>>>>>> * <div class="warning"><b>Upcoming API change — generalization</b><br> * The element type will be changed to the {@code OperationChainMetadata} interface * when GeoAPI will provide it (tentatively in GeoAPI 3.1). * </div> * * @param newValues the new information about the chain applied by the service.
<<<<<<< if (REGRESSION) { ((DefaultMetadata) metadata).setCharacterSet(CharacterSet.UTF_8); } assertEquals("fileIdentifier", "20090901", metadata.getFileIdentifier()); assertEquals("language", Locale.ENGLISH, metadata.getLanguage()); assertEquals("characterSet", CharacterSet.UTF_8, metadata.getCharacterSet()); assertEquals("dateStamp", xmlDate("2014-01-04 00:00:00"), metadata.getDateStamp()); ======= assertEquals("fileIdentifier", "20090901", metadata.getMetadataIdentifier().getCode()); assertEquals("language", Locale.ENGLISH, getSingleton(metadata.getLocalesAndCharsets().keySet())); assertEquals("characterSet", StandardCharsets.UTF_8, getSingleton(metadata.getLocalesAndCharsets().values())); assertEquals("dateStamp", xmlDate("2014-01-04 00:00:00"), getSingleton(metadata.getDateInfo()).getDate()); >>>>>>> assertEquals("fileIdentifier", "20090901", metadata.getFileIdentifier()); assertEquals("language", Locale.ENGLISH, metadata.getLanguage()); assertEquals("characterSet", CharacterSet.UTF_8, metadata.getCharacterSet()); assertEquals("dateStamp", xmlDate("2014-01-04 00:00:00"), metadata.getDateStamp());
<<<<<<< "  │   └─Authority\n" + "  │       └─Title………………………………………………… ISBN\n" + ======= "  │   ├─Authority\n" + "  │   │   ├─Title………………………………………………… International Standard Book Number\n" + "  │   │   └─Alternate title……………………… ISBN\n" + "  │   └─Code space……………………………………………… ISBN\n"+ >>>>>>> "  │   └─Authority\n" + "  │       ├─Title………………………………………………… International Standard Book Number\n" + "  │       └─Alternate title……………………… ISBN\n" +
<<<<<<< ScalarFactory<Dimensionless> dimensionlessFactory = new ScalarFactory<Dimensionless>() {@Override public Dimensionless create(double value, Unit<Dimensionless> unit) {return new Scalar.Dimensionless(value, unit);}}; final SystemUnit<Length> m = add(Length.class, new ScalarFactory<Length> () {@Override public Length create(double value, Unit<Length> unit) {return new Scalar.Length (value, unit);}}, length, "m", UnitRegistry.SI, Constants.EPSG_METRE); final SystemUnit<Area> m2 = add(Area.class, new ScalarFactory<Area> () {@Override public Area create(double value, Unit<Area> unit) {return new Scalar.Area (value, unit);}}, area, "m²", UnitRegistry.SI, (short) 0); final SystemUnit<Time> s = add(Time.class, new ScalarFactory<Time> () {@Override public Time create(double value, Unit<Time> unit) {return new Scalar.Time (value, unit);}}, time, "s", UnitRegistry.SI, (short) 1040); final SystemUnit<Temperature> K = add(Temperature.class, new ScalarFactory<Temperature> () {@Override public Temperature create(double value, Unit<Temperature> unit) {return new Scalar.Temperature (value, unit);}}, temperature, "K", UnitRegistry.SI, (short) 0); final SystemUnit<Speed> mps = add(Speed.class, new ScalarFactory<Speed> () {@Override public Speed create(double value, Unit<Speed> unit) {return new Scalar.Speed (value, unit);}}, speed, "m∕s", UnitRegistry.SI, (short) 1026); final SystemUnit<Pressure> Pa = add(Pressure.class, new ScalarFactory<Pressure> () {@Override public Pressure create(double value, Unit<Pressure> unit) {return new Scalar.Pressure (value, unit);}}, pressure, "Pa", UnitRegistry.SI, (short) 0); final SystemUnit<Angle> rad = add(Angle.class, new ScalarFactory<Angle> () {@Override public Angle create(double value, Unit<Angle> unit) {return new Scalar.Angle (value, unit);}}, dimensionless, "rad", UnitRegistry.SI, (short) 9101); final SystemUnit<Dimensionless> one = add(Dimensionless.class, dimensionlessFactory, dimensionless, "", UnitRegistry.SI, (short) 9201); ======= final SystemUnit<Length> m = add(Length.class, Scalar.Length::new, length, "m", (byte) (SI | PREFIXABLE), Constants.EPSG_METRE); final SystemUnit<Area> m2 = add(Area.class, Scalar.Area::new, area, "m²", (byte) (SI | PREFIXABLE), (short) 0); final SystemUnit<Volume> m3 = add(Volume.class, Scalar.Volume::new, length.pow(3), "m³", (byte) (SI | PREFIXABLE), (short) 0); final SystemUnit<Time> s = add(Time.class, Scalar.Time::new, time, "s", (byte) (SI | PREFIXABLE), (short) 1040); final SystemUnit<Temperature> K = add(Temperature.class, Scalar.Temperature::new, temperature, "K", (byte) (SI | PREFIXABLE), (short) 0); final SystemUnit<Speed> mps = add(Speed.class, Scalar.Speed::new, speed, "m∕s", (byte) (SI | PREFIXABLE), (short) 1026); final SystemUnit<Pressure> Pa = add(Pressure.class, Scalar.Pressure::new, pressure, "Pa", (byte) (SI | PREFIXABLE), (short) 0); final SystemUnit<Angle> rad = add(Angle.class, Scalar.Angle::new, dimensionless, "rad", (byte) (SI | PREFIXABLE), (short) 9101); final SystemUnit<Dimensionless> one = add(Dimensionless.class, Scalar.Dimensionless::new, dimensionless, "", SI, (short) 9201); final SystemUnit<Mass> kg = add(Mass.class, Scalar.Mass::new, mass, "kg", SI, (short) 0); >>>>>>> ScalarFactory<Dimensionless> dimensionlessFactory = new ScalarFactory<Dimensionless>() {@Override public Dimensionless create(double value, Unit<Dimensionless> unit) {return new Scalar.Dimensionless(value, unit);}}; final SystemUnit<Length> m = add(Length.class, new ScalarFactory<Length> () {@Override public Length create(double value, Unit<Length> unit) {return new Scalar.Length (value, unit);}}, length, "m", (byte) (SI | PREFIXABLE), Constants.EPSG_METRE); final SystemUnit<Area> m2 = add(Area.class, new ScalarFactory<Area> () {@Override public Area create(double value, Unit<Area> unit) {return new Scalar.Area (value, unit);}}, area, "m²", (byte) (SI | PREFIXABLE), (short) 0); final SystemUnit<Volume> m3 = add(Volume.class, new ScalarFactory<Volume> () {@Override public Volume create(double value, Unit<Volume> unit) {return new Scalar.Volume (value, unit);}}, length.pow(3), "m³", (byte) (SI | PREFIXABLE), (short) 0); final SystemUnit<Time> s = add(Time.class, new ScalarFactory<Time> () {@Override public Time create(double value, Unit<Time> unit) {return new Scalar.Time (value, unit);}}, time, "s", (byte) (SI | PREFIXABLE), (short) 1040); final SystemUnit<Temperature> K = add(Temperature.class, new ScalarFactory<Temperature> () {@Override public Temperature create(double value, Unit<Temperature> unit) {return new Scalar.Temperature (value, unit);}}, temperature, "K", (byte) (SI | PREFIXABLE), (short) 0); final SystemUnit<Speed> mps = add(Speed.class, new ScalarFactory<Speed> () {@Override public Speed create(double value, Unit<Speed> unit) {return new Scalar.Speed (value, unit);}}, speed, "m∕s", (byte) (SI | PREFIXABLE), (short) 1026); final SystemUnit<Pressure> Pa = add(Pressure.class, new ScalarFactory<Pressure> () {@Override public Pressure create(double value, Unit<Pressure> unit) {return new Scalar.Pressure (value, unit);}}, pressure, "Pa", (byte) (SI | PREFIXABLE), (short) 0); final SystemUnit<Angle> rad = add(Angle.class, new ScalarFactory<Angle> () {@Override public Angle create(double value, Unit<Angle> unit) {return new Scalar.Angle (value, unit);}}, dimensionless, "rad", (byte) (SI | PREFIXABLE), (short) 9101); final SystemUnit<Mass> kg = add(Mass.class, new ScalarFactory<Mass> () {@Override public Mass create(double value, Unit<Mass> unit) {return new Scalar.Mass (value, unit);}}, mass, "kg", SI, (short) 0); final SystemUnit<Dimensionless> one = add(Dimensionless.class, dimensionlessFactory, dimensionless, "", UnitRegistry.SI, (short) 9201); <<<<<<< HECTARE = add(m2, ten4, "ha", UnitRegistry.ACCEPTED, (short) 0); CUBIC_METRE = add(Volume.class, new ScalarFactory<Volume> () {@Override public Volume create(double value, Unit<Volume> unit) {return new Scalar.Volume (value, unit);}}, length.pow(3), "m³", UnitRegistry.SI, (short) 0); HERTZ = add(Frequency.class, new ScalarFactory<Frequency>() {@Override public Frequency create(double value, Unit<Frequency> unit) {return new Scalar.Frequency(value, unit);}}, time.pow(-1), "Hz", UnitRegistry.SI, (short) 0); KILOGRAM = add(Mass.class, new ScalarFactory<Mass> () {@Override public Mass create(double value, Unit<Mass> unit) {return new Scalar.Mass (value, unit);}}, mass, "kg", UnitRegistry.SI, (short) 0); NEWTON = add(Force.class, new ScalarFactory<Force> () {@Override public Force create(double value, Unit<Force> unit) {return new Scalar.Force (value, unit);}}, force, "N", UnitRegistry.SI, (short) 0); JOULE = add(Energy.class, new ScalarFactory<Energy> () {@Override public Energy create(double value, Unit<Energy> unit) {return new Scalar.Energy (value, unit);}}, energy, "J", UnitRegistry.SI, (short) 0); WATT = add(Power.class, new ScalarFactory<Power> () {@Override public Power create(double value, Unit<Power> unit) {return new Scalar.Power (value, unit);}}, power, "W", UnitRegistry.SI, (short) 0); LUX = add(Illuminance.class, null, luminous.divide(area), "lx", UnitRegistry.SI, (short) 0); LUMEN = add(LuminousFlux.class, null, luminous, "lm", UnitRegistry.SI, (short) 0); CANDELA = add(LuminousIntensity.class, null, luminous, "cd", UnitRegistry.SI, (short) 0); // Must be after Lumen. MOLE = add(AmountOfSubstance.class, null, amount, "mol", UnitRegistry.SI, (short) 0); STERADIAN = add(SolidAngle.class, null, dimensionless, "sr", UnitRegistry.SI, (short) 0); ======= CUBIC_METRE = m3; KILOGRAM = kg; HECTARE = add(m2, ten4, "ha", ACCEPTED, (short) 0); LITRE = add(m3, milli, "L", (byte) (ACCEPTED | PREFIXABLE), (short) 0); GRAM = add(kg, milli, "g", (byte) (ACCEPTED | PREFIXABLE), (short) 0); HERTZ = add(Frequency.class, Scalar.Frequency::new, time.pow(-1), "Hz", (byte) (SI | PREFIXABLE), (short) 0); NEWTON = add(Force.class, Scalar.Force::new, force, "N", (byte) (SI | PREFIXABLE), (short) 0); JOULE = add(Energy.class, Scalar.Energy::new, energy, "J", (byte) (SI | PREFIXABLE), (short) 0); WATT = add(Power.class, Scalar.Power::new, power, "W", (byte) (SI | PREFIXABLE), (short) 0); LUX = add(Illuminance.class, null, luminous.divide(area), "lx", (byte) (SI | PREFIXABLE), (short) 0); LUMEN = add(LuminousFlux.class, null, luminous, "lm", (byte) (SI | PREFIXABLE), (short) 0); CANDELA = add(LuminousIntensity.class, null, luminous, "cd", (byte) (SI | PREFIXABLE), (short) 0); // Must be after Lumen. MOLE = add(AmountOfSubstance.class, null, amount, "mol", (byte) (SI | PREFIXABLE), (short) 0); STERADIAN = add(SolidAngle.class, null, dimensionless, "sr", (byte) (SI | PREFIXABLE), (short) 0); >>>>>>> CUBIC_METRE = m3; KILOGRAM = kg; HECTARE = add(m2, ten4, "ha", ACCEPTED, (short) 0); LITRE = add(m3, milli, "L", (byte) (ACCEPTED | PREFIXABLE), (short) 0); GRAM = add(kg, milli, "g", (byte) (ACCEPTED | PREFIXABLE), (short) 0); HERTZ = add(Frequency.class, new ScalarFactory<Frequency>() {@Override public Frequency create(double value, Unit<Frequency> unit) {return new Scalar.Frequency(value, unit);}}, time.pow(-1), "Hz", (byte) (SI | PREFIXABLE), (short) 0); NEWTON = add(Force.class, new ScalarFactory<Force> () {@Override public Force create(double value, Unit<Force> unit) {return new Scalar.Force (value, unit);}}, force, "N", (byte) (SI | PREFIXABLE), (short) 0); JOULE = add(Energy.class, new ScalarFactory<Energy> () {@Override public Energy create(double value, Unit<Energy> unit) {return new Scalar.Energy (value, unit);}}, energy, "J", (byte) (SI | PREFIXABLE), (short) 0); WATT = add(Power.class, new ScalarFactory<Power> () {@Override public Power create(double value, Unit<Power> unit) {return new Scalar.Power (value, unit);}}, power, "W", (byte) (SI | PREFIXABLE), (short) 0); LUX = add(Illuminance.class, null, luminous.divide(area), "lx", (byte) (SI | PREFIXABLE), (short) 0); LUMEN = add(LuminousFlux.class, null, luminous, "lm", (byte) (SI | PREFIXABLE), (short) 0); CANDELA = add(LuminousIntensity.class, null, luminous, "cd", (byte) (SI | PREFIXABLE), (short) 0); // Must be after Lumen. MOLE = add(AmountOfSubstance.class, null, amount, "mol", (byte) (SI | PREFIXABLE), (short) 0); STERADIAN = add(SolidAngle.class, null, dimensionless, "sr", (byte) (SI | PREFIXABLE), (short) 0); <<<<<<< PERCENT = add(one, centi, "%", UnitRegistry.OTHER, (short) 0); PPM = add(one, micro, "ppm", UnitRegistry.OTHER, (short) 9202); PSU = add(Dimensionless.class, dimensionlessFactory, dimensionless, "psu", UnitRegistry.OTHER, (short) 0); SIGMA = add(Dimensionless.class, dimensionlessFactory, dimensionless, "sigma", UnitRegistry.OTHER, (short) 0); PIXEL = add(Dimensionless.class, dimensionlessFactory, dimensionless, "px", UnitRegistry.OTHER, (short) 0); ======= PERCENT = add(one, centi, "%", OTHER, (short) 0); PPM = add(one, micro, "ppm", OTHER, (short) 9202); PSU = add(Dimensionless.class, Scalar.Dimensionless::new, dimensionless, "psu", OTHER, (short) 0); SIGMA = add(Dimensionless.class, Scalar.Dimensionless::new, dimensionless, "sigma", OTHER, (short) 0); PIXEL = add(Dimensionless.class, Scalar.Dimensionless::new, dimensionless, "px", OTHER, (short) 0); >>>>>>> PERCENT = add(one, centi, "%", OTHER, (short) 0); PPM = add(one, micro, "ppm", OTHER, (short) 9202); PSU = add(Dimensionless.class, dimensionlessFactory, dimensionless, "psu", OTHER, (short) 0); SIGMA = add(Dimensionless.class, dimensionlessFactory, dimensionless, "sigma", OTHER, (short) 0); PIXEL = add(Dimensionless.class, dimensionlessFactory, dimensionless, "px", OTHER, (short) 0);
<<<<<<< try (Stream<AbstractFeature> features = reader.features()) { final Iterator<AbstractFeature> it = features.iterator(); ======= try (Stream<Feature> features = reader.features(false)) { final Iterator<Feature> it = features.iterator(); >>>>>>> try (Stream<AbstractFeature> features = reader.features(false)) { final Iterator<AbstractFeature> it = features.iterator(); <<<<<<< try (Stream<AbstractFeature> features = reader.features()) { final Iterator<AbstractFeature> it = features.iterator(); ======= try (Stream<Feature> features = reader.features(false)) { final Iterator<Feature> it = features.iterator(); >>>>>>> try (Stream<AbstractFeature> features = reader.features(false)) { final Iterator<AbstractFeature> it = features.iterator(); <<<<<<< try (Stream<AbstractFeature> features = reader.features()) { final Iterator<AbstractFeature> it = features.iterator(); ======= try (Stream<Feature> features = reader.features(false)) { final Iterator<Feature> it = features.iterator(); >>>>>>> try (Stream<AbstractFeature> features = reader.features(false)) { final Iterator<AbstractFeature> it = features.iterator(); <<<<<<< try (Stream<AbstractFeature> features = reader.features()) { final Iterator<AbstractFeature> it = features.iterator(); ======= try (Stream<Feature> features = reader.features(false)) { final Iterator<Feature> it = features.iterator(); >>>>>>> try (Stream<AbstractFeature> features = reader.features(false)) { final Iterator<AbstractFeature> it = features.iterator(); <<<<<<< try (Stream<AbstractFeature> features = reader.features()) { final Iterator<AbstractFeature> it = features.iterator(); ======= try (Stream<Feature> features = reader.features(false)) { final Iterator<Feature> it = features.iterator(); >>>>>>> try (Stream<AbstractFeature> features = reader.features(false)) { final Iterator<AbstractFeature> it = features.iterator(); <<<<<<< try (Stream<AbstractFeature> features = reader.features()) { final Iterator<AbstractFeature> it = features.iterator(); ======= try (Stream<Feature> features = reader.features(false)) { final Iterator<Feature> it = features.iterator(); >>>>>>> try (Stream<AbstractFeature> features = reader.features(false)) { final Iterator<AbstractFeature> it = features.iterator(); <<<<<<< final Stream<AbstractFeature> f1 = reader.features(); final Iterator<AbstractFeature> i1 = f1.iterator(); ======= final Stream<Feature> f1 = reader.features(false); final Iterator<Feature> i1 = f1.iterator(); >>>>>>> final Stream<AbstractFeature> f1 = reader.features(false); final Iterator<AbstractFeature> i1 = f1.iterator(); <<<<<<< final Stream<AbstractFeature> f2 = reader.features(); final Iterator<AbstractFeature> i2 = f2.iterator(); ======= final Stream<Feature> f2 = reader.features(false); final Iterator<Feature> i2 = f2.iterator(); >>>>>>> final Stream<AbstractFeature> f2 = reader.features(false); final Iterator<AbstractFeature> i2 = f2.iterator(); <<<<<<< final Stream<AbstractFeature> f3 = reader.features(); final Iterator<AbstractFeature> i3 = f3.iterator(); ======= final Stream<Feature> f3 = reader.features(false); final Iterator<Feature> i3 = f3.iterator(); >>>>>>> final Stream<AbstractFeature> f3 = reader.features(false); final Iterator<AbstractFeature> i3 = f3.iterator();
<<<<<<< import org.opengis.annotation.UML; ======= import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; >>>>>>> import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; <<<<<<< @UML(identifier="offLine", obligation=OPTIONAL, specification=ISO_19115) ======= @Override @XmlElement(name = "offLine") >>>>>>> @XmlElement(name = "offLine") @UML(identifier="offLine", obligation=OPTIONAL, specification=ISO_19115) <<<<<<< @UML(identifier="transferFrequency", obligation=OPTIONAL, specification=ISO_19115) ======= @Override @XmlElement(name = "transferFrequency") @XmlJavaTypeAdapter(TM_PeriodDuration.Since2014.class) >>>>>>> @XmlElement(name = "transferFrequency") @XmlJavaTypeAdapter(TM_PeriodDuration.Since2014.class) @UML(identifier="transferFrequency", obligation=OPTIONAL, specification=ISO_19115) <<<<<<< @UML(identifier="distributionFormat", obligation=OPTIONAL, specification=ISO_19115) ======= @Override // @XmlElement at the end of this class. >>>>>>> // @XmlElement at the end of this class. @UML(identifier="distributionFormat", obligation=OPTIONAL, specification=ISO_19115)
<<<<<<< import java.io.UncheckedIOException; import java.util.function.Consumer; import org.apache.sis.feature.AbstractFeature; ======= import org.opengis.feature.Feature; >>>>>>> import org.apache.sis.feature.AbstractFeature;
<<<<<<< * @deprecated Use {@link #getDirectionReplacement(CoordinateSystemAxis, AxisDirection)} instead. * * @param direction The original axis direction. * @return The new axis direction, or {@code direction} if there is no change. */ @Deprecated AxisDirection getDirectionReplacement(AxisDirection direction); /** ======= >>>>>>> <<<<<<< Unit<?> getUnitReplacement(CoordinateSystemAxis axis, Unit<?> unit); /** * @deprecated Use {@link #getUnitReplacement(CoordinateSystemAxis, Unit)} instead. * * @param unit The original axis unit. * @return The new axis unit, or {@code unit} if there is no change. */ @Deprecated Unit<?> getUnitReplacement(Unit<?> unit); ======= default Unit<?> getUnitReplacement(CoordinateSystemAxis axis, Unit<?> unit) { return unit; } >>>>>>> Unit<?> getUnitReplacement(CoordinateSystemAxis axis, Unit<?> unit);
<<<<<<< import org.apache.sis.internal.netcdf.IOTestCase; ======= >>>>>>> <<<<<<< ======= import org.apache.sis.util.Version; import org.opengis.test.dataset.TestData; >>>>>>> import org.apache.sis.util.Version; import org.apache.sis.internal.netcdf.TestData; <<<<<<< private static NetcdfStore create(final String dataset) throws DataStoreException { return new NetcdfStore(null, new StorageConnector(IOTestCase.getResource(dataset))); ======= private static NetcdfStore create(final TestData dataset) throws DataStoreException { return new NetcdfStore(null, new StorageConnector(dataset.location())); >>>>>>> private static NetcdfStore create(final TestData dataset) throws DataStoreException { return new NetcdfStore(null, new StorageConnector(dataset.location())); <<<<<<< ======= /** * Tests {@link NetcdfStore#getConventionVersion()}. * * @throws DataStoreException if an error occurred while reading the netCDF file. */ @Test public void testGetConventionVersion() throws DataStoreException { final Version version; try (NetcdfStore store = create(TestData.NETCDF_2D_GEOGRAPHIC)) { version = store.getConventionVersion(); } assertEquals("major", 1, version.getMajor()); assertEquals("minor", 4, version.getMinor()); } >>>>>>> /** * Tests {@link NetcdfStore#getConventionVersion()}. * * @throws DataStoreException if an error occurred while reading the netCDF file. */ @Test public void testGetConventionVersion() throws DataStoreException { final Version version; try (NetcdfStore store = create(TestData.NETCDF_2D_GEOGRAPHIC)) { version = store.getConventionVersion(); } assertEquals("major", 1, version.getMajor()); assertEquals("minor", 4, version.getMinor()); }
<<<<<<< ======= import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; import org.opengis.metadata.Identifier; >>>>>>> import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; <<<<<<< import org.opengis.referencing.ReferenceIdentifier; ======= import org.apache.sis.internal.jaxb.metadata.MD_Identifier; import org.apache.sis.internal.jaxb.metadata.RS_Identifier; >>>>>>> import org.opengis.referencing.ReferenceIdentifier; import org.apache.sis.internal.jaxb.metadata.MD_Identifier; import org.apache.sis.internal.jaxb.metadata.RS_Identifier; <<<<<<< public final ReferenceIdentifier getName() { return super.getName(); ======= @XmlJavaTypeAdapter(MD_Identifier.class) public final Identifier getName() { return isLegacyMetadata ? null : super.getName(); >>>>>>> @XmlJavaTypeAdapter(MD_Identifier.class) public ReferenceIdentifier getName() { return isLegacyMetadata ? null : super.getName();
<<<<<<< * Creates a telephone number of the given type. * * @param type Either {@code "VOICE"}, {@code "FACSIMILE"} or {@code "SMS"}. */ private static DefaultTelephone telephone(final String number, final String type) { final DefaultTelephone tel = new DefaultTelephone(); tel.setNumber(number); tel.setNumberType(UnsupportedCodeList.valueOf(type)); return tel; } /** * Programmatically creates the metadata to marshall, or to compare against the unmarshalled metadata. ======= * Programmatically creates the metadata to marshal, or to compare against the unmarshalled metadata. >>>>>>> * Creates a telephone number of the given type. * * @param type Either {@code "VOICE"}, {@code "FACSIMILE"} or {@code "SMS"}. */ private static DefaultTelephone telephone(final String number, final String type) { final DefaultTelephone tel = new DefaultTelephone(); tel.setNumber(number); tel.setNumberType(UnsupportedCodeList.valueOf(type)); return tel; } /** * Programmatically creates the metadata to marshal, or to compare against the unmarshalled metadata. <<<<<<< final DefaultAggregateInformation aggregateInfo = new DefaultAggregateInformation(); final DefaultCitation name = new DefaultCitation("MEDIPROD VI"); name.setAlternateTitles(singleton(new SimpleInternationalString("90008411"))); ======= final DefaultAssociatedResource aggregateInfo = new DefaultAggregateInformation(); final DefaultCitation name = new DefaultCitation("Some oceanographic campaign"); name.setAlternateTitles(singleton(new SimpleInternationalString("Pseudo group of data"))); >>>>>>> final DefaultAggregateInformation aggregateInfo = new DefaultAggregateInformation(); final DefaultCitation name = new DefaultCitation("Some oceanographic campaign"); name.setAlternateTitles(singleton(new SimpleInternationalString("Pseudo group of data"))); <<<<<<< replace(xml, "<gcol:CharacterString>Common Data Index record</gcol:CharacterString>", "<gmx:Anchor xlink:href=\"SDN:L231:3:CDI\">Common Data Index record</gmx:Anchor>"); replace(xml, "<gcol:CharacterString>EPSG:4326</gcol:CharacterString>", "<gmx:Anchor xlink:href=\"SDN:L101:2:4326\">EPSG:4326</gmx:Anchor>"); replace(xml, "License", "Licence"); ======= replace(xml, "<gcol:CharacterString>Pseudo Common Data Index record</gcol:CharacterString>", "<gmx:Anchor xlink:href=\"SDN:L231:3:CDI\">Pseudo Common Data Index record</gmx:Anchor>"); replace(xml, "<gcol:CharacterString>4326</gcol:CharacterString>", "<gmx:Anchor xlink:href=\"SDN:L101:2:4326\">4326</gmx:Anchor>"); >>>>>>> replace(xml, "<gcol:CharacterString>Pseudo Common Data Index record</gcol:CharacterString>", "<gmx:Anchor xlink:href=\"SDN:L231:3:CDI\">Pseudo Common Data Index record</gmx:Anchor>"); replace(xml, "<gcol:CharacterString>4326</gcol:CharacterString>", "<gmx:Anchor xlink:href=\"SDN:L101:2:4326\">4326</gmx:Anchor>"); replace(xml, "License", "Licence"); <<<<<<< loggings.skipNextLogIfContains("sis-temporal"); } /** * Tests the (un)marshalling of a metadata with a vertical CRS. * * @throws JAXBException if the (un)marshalling process fails. */ @Test public void testMetadataWithVerticalCRS() throws JAXBException { final Metadata metadata = unmarshalFile(Metadata.class, VERTICAL_CRS_XML); assertEquals("fileIdentifier", "20090901", metadata.getFileIdentifier()); assertEquals("language", Locale.ENGLISH, metadata.getLanguage()); assertEquals("characterSet", CharacterSet.UTF_8, metadata.getCharacterSet()); assertEquals("dateStamp", xmlDate("2014-01-04 00:00:00"), metadata.getDateStamp()); /* * <gmd:contact> * <gmd:CI_ResponsibleParty> * … * </gmd:CI_ResponsibleParty> * </gmd:contact> */ final ResponsibleParty contact = getSingleton(metadata.getContacts()); final OnlineResource onlineResource = contact.getContactInfo().getOnlineResource(); assertNotNull("onlineResource", onlineResource); assertEquals("organisationName", "Apache SIS", contact.getOrganisationName().toString()); assertEquals("linkage", URI.create("http://sis.apache.org"), onlineResource.getLinkage()); assertEquals("function", OnLineFunction.INFORMATION, onlineResource.getFunction()); assertEquals("role", Role.PRINCIPAL_INVESTIGATOR, contact.getRole()); /* * <gmd:spatialRepresentationInfo> * <gmd:MD_VectorSpatialRepresentation> * … * </gmd:MD_VectorSpatialRepresentation> * </gmd:spatialRepresentationInfo> */ final SpatialRepresentation spatial = getSingleton(metadata.getSpatialRepresentationInfo()); assertInstanceOf("spatialRepresentationInfo", VectorSpatialRepresentation.class, spatial); assertEquals("geometricObjectType", GeometricObjectType.POINT, getSingleton( ((VectorSpatialRepresentation) spatial).getGeometricObjects()).getGeometricObjectType()); /* * <gmd:referenceSystemInfo> * <gmd:MD_ReferenceSystem> * … * </gmd:MD_ReferenceSystem> * </gmd:referenceSystemInfo> */ assertIdentifierEquals("referenceSystemInfo", null, "EPSG", null, "World Geodetic System 84", getSingleton(metadata.getReferenceSystemInfo()).getName()); /* * <gmd:identificationInfo> * <gmd:MD_DataIdentification> * … */ final DataIdentification identification = (DataIdentification) getSingleton(metadata.getIdentificationInfo()); final Citation citation = identification.getCitation(); assertInstanceOf("citation", NilObject.class, citation); assertEquals("nilReason", NilReason.MISSING, ((NilObject) citation).getNilReason()); assertEquals("abstract", "SIS test", identification.getAbstract().toString()); assertEquals("language", Locale.ENGLISH, getSingleton(identification.getLanguages())); /* * <gmd:geographicElement> * <gmd:EX_GeographicBoundingBox> * … * </gmd:EX_GeographicBoundingBox> * </gmd:geographicElement> */ final Extent extent = getSingleton(identification.getExtents()); final GeographicBoundingBox bbox = (GeographicBoundingBox) getSingleton(extent.getGeographicElements()); assertEquals("extentTypeCode", Boolean.TRUE, bbox.getInclusion()); assertEquals("westBoundLongitude", 4.55, bbox.getWestBoundLongitude(), STRICT); assertEquals("eastBoundLongitude", 4.55, bbox.getEastBoundLongitude(), STRICT); assertEquals("southBoundLatitude", 44.22, bbox.getSouthBoundLatitude(), STRICT); assertEquals("northBoundLatitude", 44.22, bbox.getNorthBoundLatitude(), STRICT); /* * <gmd:verticalElement> * <gmd:EX_VerticalExtent> * … * </gmd:EX_VerticalExtent> * </gmd:verticalElement> */ final VerticalExtent ve = getSingleton(extent.getVerticalElements()); assertEquals("minimumValue", 0.1, ve.getMinimumValue(), STRICT); assertEquals("maximumValue", 10000, ve.getMaximumValue(), STRICT); final VerticalCRS crs = ve.getVerticalCRS(); verifyIdentifiers("test1", crs); assertEquals("scope", "World", crs.getScope().toString()); final VerticalDatum datum = crs.getDatum(); verifyIdentifiers("test2", datum); assertEquals("scope", "World", datum.getScope().toString()); assertEquals("vertDatumType", VerticalDatumType.DEPTH, datum.getVerticalDatumType()); // Inferred from the name. final VerticalCS cs = crs.getCoordinateSystem(); verifyIdentifiers("test3", cs); final CoordinateSystemAxis axis = cs.getAxis(0); verifyIdentifiers("test4", axis); assertEquals("axisAbbrev", "d", axis.getAbbreviation()); assertEquals("axisDirection", AxisDirection.DOWN, axis.getDirection()); /* * … * </gmd:MD_DataIdentification> * </gmd:identificationInfo> * * Now marshal the object and compare with the original file. */ assertMarshalEqualsFile(VERTICAL_CRS_XML, metadata, VERSION_2007, "xmlns:*", "xsi:schemaLocation"); } /** * Verifies the name and identifier for the given object. * * @param code the expected identifier code. * @param object the object to verify. */ private static void verifyIdentifiers(final String code, final IdentifiedObject object) { assertIdentifierEquals("identifier", "Apache Spatial Information System", "SIS", null, code, getSingleton(object.getIdentifiers())); assertIdentifierEquals("name", null, null, null, "Depth", object.getName()); ======= >>>>>>>
<<<<<<< private InternationalString getName(final Class<? extends AbstractParty> type, final boolean position) { final Collection<AbstractParty> parties = getParties(); ======= private InternationalString getIndividual(final boolean position) { final Collection<Party> parties = getParties(); InternationalString name = getName(parties, Individual.class, position); if (name == null && parties != null) { for (final Party party : parties) { if (party instanceof Organisation) { name = getName(((Organisation) party).getIndividual(), Individual.class, position); if (name != null) { break; } } } } return name; } /** * Returns the name of the first party of the given type, or {@code null} if none. * * @param position {@code true} for returning the position name instead than individual name. * @return The name or position of the first individual, or {@code null}. * * @see #getOrganisationName() * @see #getIndividualName() * @see #getPositionName() */ private static InternationalString getName(final Collection<? extends Party> parties, final Class<? extends Party> type, final boolean position) { InternationalString name = null; >>>>>>> private InternationalString getIndividual(final boolean position) { final Collection<AbstractParty> parties = getParties(); InternationalString name = getName(parties, DefaultIndividual.class, position); if (name == null && parties != null) { for (final AbstractParty party : parties) { if (party instanceof DefaultOrganisation) { name = getName(((DefaultOrganisation) party).getIndividual(), DefaultIndividual.class, position); if (name != null) { break; } } } } return name; } /** * Returns the name of the first party of the given type, or {@code null} if none. * * @param position {@code true} for returning the position name instead than individual name. * @return The name or position of the first individual, or {@code null}. * * @see #getOrganisationName() * @see #getIndividualName() * @see #getPositionName() */ private static InternationalString getName(final Collection<? extends AbstractParty> parties, final Class<? extends AbstractParty> type, final boolean position) { InternationalString name = null; <<<<<<< final InternationalString name; if (position) { name = ((DefaultIndividual) party).getPositionName(); } else { name = party.getName(); } ======= >>>>>>> <<<<<<< final InternationalString name = getName(DefaultIndividual.class, false); ======= final InternationalString name = getIndividual(false); >>>>>>> final InternationalString name = getIndividual(false); <<<<<<< return getName(DefaultOrganisation.class, false); ======= return getName(getParties(), Organisation.class, false); >>>>>>> return getName(getParties(), DefaultOrganisation.class, false);
<<<<<<< // Branch-dependent imports import java.util.Objects; import org.apache.sis.internal.jdk8.JDK8; ======= >>>>>>> import org.apache.sis.internal.jdk8.JDK8;
<<<<<<< public Collection<CharacterSet> getCharacterSets() { return Collections.emptySet(); ======= public Collection<Charset> getCharacterSets() { return Collections.emptySet(); // We use 'Set' because we handle 'Charset' like a CodeList. >>>>>>> public Collection<CharacterSet> getCharacterSets() { return Collections.emptySet(); // We use 'Set' because we handle 'Charset' like a CodeList. <<<<<<< public Collection<ResponsibleParty> getContacts() { return Collections.emptySet(); ======= public Collection<Responsibility> getContacts() { return Collections.emptyList(); >>>>>>> public Collection<ResponsibleParty> getContacts() { return Collections.emptyList(); <<<<<<< ======= public Collection<CitationDate> getDateInfo() { return Collections.emptyList(); } /** * @deprecated As of ISO 19115:2014, replaced by {@link #getDateInfo()}. */ @Override @Deprecated >>>>>>> <<<<<<< ======= * Citation(s) for the standard(s) to which the metadata conform. */ @Override public Collection<Citation> getMetadataStandards() { return Collections.emptyList(); } /** * Citation(s) for the profile(s) of the metadata standard to which the metadata conform. */ @Override public Collection<Citation> getMetadataProfiles() { return Collections.emptyList(); } /** * Reference(s) to alternative metadata or metadata in a non-ISO standard for the same resource. */ @Override public Collection<Citation> getAlternativeMetadataReferences() { return Collections.emptyList(); } /** >>>>>>> <<<<<<< ======= public Collection<OnlineResource> getMetadataLinkages() { return Collections.emptyList(); } /** * @deprecated As of ISO 19115:2014, replaced by {@link #getIdentificationInfo()} followed by * {@link Identification#getCitation()} followed by {@link Citation#getOnlineResources()}. */ @Override @Deprecated >>>>>>> <<<<<<< public Distribution getDistributionInfo() { return null; ======= public Collection<Distribution> getDistributionInfo() { return Collections.emptyList(); >>>>>>> public Distribution getDistributionInfo() { return null; <<<<<<< ======= /** * Information about the provenance, sources and/or the production processes applied to the resource. */ @Override public Collection<Lineage> getResourceLineages() { return Collections.emptyList(); } >>>>>>> <<<<<<< public Collection<String> getCredits() { return Collections.emptySet(); ======= public Collection<InternationalString> getCredits() { return Collections.emptyList(); >>>>>>> public Collection<String> getCredits() { return Collections.emptyList(); <<<<<<< public Collection<ResponsibleParty> getPointOfContacts() { return Collections.emptySet(); ======= public Collection<Responsibility> getPointOfContacts() { return Collections.emptyList(); >>>>>>> public Collection<ResponsibleParty> getPointOfContacts() { return Collections.emptyList(); <<<<<<< ======= * Smallest resolvable temporal period in a resource. * This is part of the information returned by {@link #getIdentificationInfo()}. */ @Override public Collection<Duration> getTemporalResolutions() { return Collections.emptyList(); } /** >>>>>>> <<<<<<< ======= * Other documentation associated with the resource. * This is part of the information returned by {@link #getIdentificationInfo()}. */ @Override public Collection<Citation> getAdditionalDocumentations() { return Collections.emptyList(); } /** * Code that identifies the level of processing in the producers coding system of a resource. * This is part of the information returned by {@link #getIdentificationInfo()}. */ @Override public Identifier getProcessingLevel() { return null; } /** >>>>>>> <<<<<<< ======= * Associated resource information. * This is part of the information returned by {@link #getIdentificationInfo()}. */ @Override public Collection<AssociatedResource> getAssociatedResources() { return Collections.emptyList(); } /** >>>>>>> <<<<<<< public Collection<ResponsibleParty> getCitedResponsibleParties() { return Collections.emptySet(); ======= public Collection<Responsibility> getCitedResponsibleParties() { return Collections.emptyList(); >>>>>>> public Collection<ResponsibleParty> getCitedResponsibleParties() { return Collections.emptyList(); <<<<<<< public InternationalString getOtherCitationDetails() { return null; ======= public Collection<InternationalString> getOtherCitationDetails() { return Collections.emptyList(); >>>>>>> public InternationalString getOtherCitationDetails() { return null; <<<<<<< ======= /** * Online references to the cited resource. * This is part of the information returned by {@link #getCitation()}. */ @Override public Collection<OnlineResource> getOnlineResources() { return Collections.emptyList(); } /** * Citation graphics or logo for cited party. * This is part of the information returned by {@link #getCitation()}. */ @Override public Collection<BrowseGraphic> getGraphics() { return Collections.emptyList(); } >>>>>>>
<<<<<<< } catch (Exception e) { // (SecurityException | JMException) on the JDK7 branch. Logging.unexpectedException(Logging.getLogger("org.apache.sis"), Supervisor.class, "register", e); ======= } catch (SecurityException | JMException e) { Logging.unexpectedException(Logging.getLogger(Loggers.SYSTEM), Supervisor.class, "register", e); >>>>>>> } catch (Exception e) { // (SecurityException | JMException) on the JDK7 branch. Logging.unexpectedException(Logging.getLogger(Loggers.SYSTEM), Supervisor.class, "register", e);
<<<<<<< public Map<String,AbstractAttribute<?>> characteristics() { ======= @Override @SuppressWarnings("ReturnOfCollectionOrArrayField") public Map<String,Attribute<?>> characteristics() { >>>>>>> @SuppressWarnings("ReturnOfCollectionOrArrayField") public Map<String,AbstractAttribute<?>> characteristics() {
<<<<<<< @XmlJavaTypeAdapter(CI_ResponsibleParty.class), @XmlJavaTypeAdapter(DS_AssociationTypeCode.class), @XmlJavaTypeAdapter(DS_InitiativeTypeCode.class), ======= @XmlJavaTypeAdapter(CI_Responsibility.class), @XmlJavaTypeAdapter(DCPList.class), >>>>>>> @XmlJavaTypeAdapter(CI_ResponsibleParty.class), <<<<<<< ======= @XmlJavaTypeAdapter(TM_Duration.class), >>>>>>> @XmlJavaTypeAdapter(TM_Duration.class),
<<<<<<< ======= // Branch-dependent imports import org.opengis.feature.Property; import org.opengis.feature.Attribute; import org.opengis.feature.FeatureAssociation; import org.opengis.feature.PropertyNotFoundException; >>>>>>> <<<<<<< public Object getProperty(final String name) throws IllegalArgumentException { ======= public Property getProperty(final String name) throws PropertyNotFoundException { >>>>>>> public Object getProperty(final String name) throws IllegalArgumentException {
<<<<<<< public final class MD_KeywordClass extends PropertyType<MD_KeywordClass, DefaultKeywordClass> { ======= public class MD_KeywordClass extends PropertyType<MD_KeywordClass, KeywordClass> { >>>>>>> public class MD_KeywordClass extends PropertyType<MD_KeywordClass, DefaultKeywordClass> { <<<<<<< protected Class<DefaultKeywordClass> getBoundType() { return DefaultKeywordClass.class; ======= protected final Class<KeywordClass> getBoundType() { return KeywordClass.class; >>>>>>> protected final Class<DefaultKeywordClass> getBoundType() { return DefaultKeywordClass.class; <<<<<<< public DefaultKeywordClass getElement() { return metadata; ======= public final DefaultKeywordClass getElement() { return DefaultKeywordClass.castOrCopy(metadata); >>>>>>> public final DefaultKeywordClass getElement() { return metadata;
<<<<<<< final Short CONFLICT = (short) 0; // Sentinal value for conflicts (paranoiac safety). final Map<Short,Short> map = new TreeMap<Short,Short>(); ======= final Short CONFLICT = 0; // Sentinal value for conflicts (paranoiac safety). final Map<Short,Short> map = new TreeMap<>(); >>>>>>> final Short CONFLICT = 0; // Sentinal value for conflicts (paranoiac safety). final Map<Short,Short> map = new TreeMap<Short,Short>(); <<<<<<< @Deprecated // Make this method private for simplifiying the API. public static Locale[] getLanguages(final Locale... locales) { final Set<String> codes = new LinkedHashSet<String>(hashMapCapacity(locales.length)); ======= private static Locale[] getLanguages(final Locale... locales) { final Set<String> codes = new LinkedHashSet<>(hashMapCapacity(locales.length)); >>>>>>> private static Locale[] getLanguages(final Locale... locales) { final Set<String> codes = new LinkedHashSet<String>(hashMapCapacity(locales.length)); <<<<<<< * Parses the language encoded in the suffix of a property key. This convenience method * is used when a property in a {@link java.util.Map} may have many localized variants. * For example the {@code "remarks"} property may be defined by values associated to the * {@code "remarks_en"} and {@code "remarks_fr"} keys, for English and French locales * respectively. * * <p>This method infers the {@code Locale} from the property {@code key} with the following steps:</p> * * <ul> * <li>If the given {@code key} is exactly equals to {@code prefix}, * then this method returns {@link Locale#ROOT}.</li> * <li>Otherwise if the given {@code key} does not start with the specified {@code prefix} * followed by the {@code '_'} character, then this method returns {@code null}.</li> * <li>Otherwise, the characters after the {@code '_'} are parsed as an ISO language * and country code by the {@link #parse(String, int)} method.</li> * </ul> * * @param prefix The prefix to skip at the beginning of the {@code key}. * @param key The property key from which to extract the locale, or {@code null}. * @return The locale encoded in the given key name, or {@code null} if the key has not been recognized. * @throws RuntimeException If the given code is not valid ({@code IllformedLocaleException} on the JDK7 branch). * * @see org.apache.sis.util.iso.Types#toInternationalString(Map, String) * * @deprecated Users can easily perform this operation themselves, thus avoiding this class initialization. */ @Deprecated public static Locale parseSuffix(final String prefix, final String key) { ArgumentChecks.ensureNonNull("prefix", prefix); if (key != null) { // Tolerance for Map that accept null keys. if (key.startsWith(prefix)) { final int offset = prefix.length(); if (key.length() == offset) { return Locale.ROOT; } if (key.charAt(offset) == '_') { return parse(key, offset + 1); } } } return null; } /** ======= >>>>>>>
<<<<<<< import static org.hamcrest.MatcherAssert.*; import static org.hamcrest.Matchers.*; import static org.sonatype.nexus.test.utils.ResponseMatchers.*; import static org.sonatype.nexus.test.utils.StatusMatchers.*; ======= import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.notNullValue; >>>>>>> import static org.hamcrest.MatcherAssert.*; import static org.hamcrest.Matchers.*; import static org.sonatype.nexus.test.utils.ResponseMatchers.*; import static org.sonatype.nexus.test.utils.StatusMatchers.*; <<<<<<< import org.sonatype.nexus.test.utils.ResponseMatchers; ======= import org.sonatype.nexus.test.utils.XStreamFactory; >>>>>>> import org.sonatype.nexus.test.utils.ResponseMatchers; <<<<<<< import com.google.common.base.Preconditions; ======= import com.google.common.base.Preconditions; import com.thoughtworks.xstream.XStream; >>>>>>> import com.google.common.base.Preconditions; <<<<<<< * <b>NOTE</b>: The do${HTTP_METHOD}* methods without a {@link Matcher} parameter will automatically assert that the * received response is successful. * <p> * <b>IMPORTANT</b>: Any {@link Response} instances returned from methods here should have their * {@link Response#release()} method called in a finally block when you are done with it. ======= * <b>IMPORTANT</b>: Any {@link Response} instances returned from methods here should have their * {@link Response#release()} method called in a finally block when you are done with it. >>>>>>> * <b>NOTE</b>: The do${HTTP_METHOD}* methods without a {@link Matcher} parameter will automatically assert that the * received response is successful. * <p> * <b>IMPORTANT</b>: Any {@link Response} instances returned from methods here should have their * {@link Response#release()} method called in a finally block when you are done with it. <<<<<<< public static String doGetForText( final String serviceURIpart ) throws IOException { return doGetForText( serviceURIpart, isSuccessful() ); ======= public static String doGetForText( final String serviceURIpart ) throws IOException { return doGetForText( serviceURIpart, null ); >>>>>>> public static String doGetForText( final String serviceURIpart ) throws IOException { return doGetForText( serviceURIpart, isSuccessful() ); <<<<<<< ======= } finally { releaseResponse( response ); >>>>>>> <<<<<<< public static Status doGetForStatus( final String serviceURIpart, Matcher<Status> matcher ) throws IOException { Preconditions.checkNotNull( serviceURIpart ); ======= public static Status doGetForStatus( final String serviceURIpart ) throws IOException { Preconditions.checkNotNull( serviceURIpart ); >>>>>>> public static Status doGetForStatus( final String serviceURIpart, Matcher<Status> matcher ) throws IOException { Preconditions.checkNotNull( serviceURIpart ); <<<<<<< public static String doPutForText( final String serviceURIpart, final Representation representation ) throws IOException { return doPutForText( serviceURIpart, representation, isSuccessful() ); } public static String doPutForText( final String serviceURIpart, final Representation representation, Matcher<Response> responseMatcher ) throws IOException { ======= public static String doPutForText( final String serviceURIpart, final Representation representation, Matcher<Response> responseMatcher ) throws IOException { >>>>>>> public static String doPutForText( final String serviceURIpart, final Representation representation ) throws IOException { return doPutForText( serviceURIpart, representation, isSuccessful() ); } public static String doPutForText( final String serviceURIpart, final Representation representation, Matcher<Response> responseMatcher ) throws IOException { <<<<<<< public static String doPostForText( final String serviceURIpart, final Representation representation ) throws IOException { return doPostForText( serviceURIpart, representation, isSuccessful() ); } public static String doPostForText( final String serviceURIpart, final Representation representation, Matcher<Response> responseMatcher ) throws IOException { ======= public static String doPostForText( final String serviceURIpart, final Representation representation, Matcher<Response> responseMatcher ) throws IOException { >>>>>>> public static String doPostForText( final String serviceURIpart, final Representation representation ) throws IOException { return doPostForText( serviceURIpart, representation, isSuccessful() ); } public static String doPostForText( final String serviceURIpart, final Representation representation, Matcher<Response> responseMatcher ) throws IOException { <<<<<<< public static Status doPostForStatus( final String serviceURIpart, final Representation representation ) throws IOException { return doPostForStatus( serviceURIpart, representation, isSuccessful() ); } ======= public static Status doPostForStatus( final String serviceURIpart, final Representation representation ) throws IOException { return doPostForStatus( serviceURIpart, representation, null ); } >>>>>>> public static Status doPostForStatus( final String serviceURIpart, final Representation representation ) throws IOException { return doPostForStatus( serviceURIpart, representation, isSuccessful() ); } <<<<<<< ======= } finally { releaseResponse( response ); >>>>>>> <<<<<<< client.getHttpConnectionManager().getParams().setConnectionTimeout( 5000 ); ======= client.getHttpConnectionManager().getParams().setConnectionTimeout( 5000 ); client.getHttpConnectionManager().getParams().setSoTimeout( 5000 ); >>>>>>> client.getHttpConnectionManager().getParams().setConnectionTimeout( 5000 ); client.getHttpConnectionManager().getParams().setSoTimeout( 5000 );
<<<<<<< return toString((GenericName) value); } else if (value instanceof AbstractIdentifiedType) { return toString(((AbstractIdentifiedType) value).getName()); ======= text = toString((GenericName) value); } else if (value instanceof IdentifiedType) { text = toString(((IdentifiedType) value).getName()); >>>>>>> text = toString((GenericName) value); } else if (value instanceof AbstractIdentifiedType) { text = toString(((AbstractIdentifiedType) value).getName());
<<<<<<< * <div class="warning"><b>Warning:</b> in a future SIS version, the parameter types may be changed to * {@code org.opengis.referencing.datum.ParametricDatum} and {@code org.opengis.referencing.cs.ParametricCS}, * and the return type may be changed to {@code org.opengis.referencing.crs.ParametricCRS}. * Those change are pending GeoAPI revision.</div> * * @param properties Name and other properties to give to the new object. * @param datum The parametric datum to use in created CRS. * @param cs The parametric coordinate system for the created CRS. ======= * @param properties name and other properties to give to the new object. * @param datum the parametric datum to use in created CRS. * @param cs the parametric coordinate system for the created CRS. >>>>>>> * <div class="warning"><b>Warning:</b> in a future SIS version, the parameter types may be changed to * {@code org.opengis.referencing.datum.ParametricDatum} and {@code org.opengis.referencing.cs.ParametricCS}, * and the return type may be changed to {@code org.opengis.referencing.crs.ParametricCRS}. * Those change are pending GeoAPI revision.</div> * * @param properties name and other properties to give to the new object. * @param datum the parametric datum to use in created CRS. * @param cs the parametric coordinate system for the created CRS. <<<<<<< * <div class="warning"><b>Warning:</b> in a future SIS version, the return type may be changed * to {@code org.opengis.referencing.datum.ParametricDatum}. This change is pending GeoAPI revision.</div> * * @param properties Name and other properties to give to the new object. ======= * @param properties name and other properties to give to the new object. >>>>>>> * <div class="warning"><b>Warning:</b> in a future SIS version, the return type may be changed * to {@code org.opengis.referencing.datum.ParametricDatum}. This change is pending GeoAPI revision.</div> * * @param properties name and other properties to give to the new object. <<<<<<< * <div class="warning"><b>Warning:</b> in a future SIS version, the return type may be changed * to {@code org.opengis.referencing.cs.ParametricCS}. This change is pending GeoAPI revision.</div> * * @param properties Name and other properties to give to the new object. * @param axis The single axis. ======= * @param properties name and other properties to give to the new object. * @param axis the single axis. >>>>>>> * <div class="warning"><b>Warning:</b> in a future SIS version, the return type may be changed * to {@code org.opengis.referencing.cs.ParametricCS}. This change is pending GeoAPI revision.</div> * * @param properties name and other properties to give to the new object. * @param axis the single axis.
<<<<<<< @UML(identifier="rationale", obligation=OPTIONAL, specification=ISO_19115) ======= @Override @XmlElement(name = "rationale") >>>>>>> @XmlElement(name = "rationale") @UML(identifier="rationale", obligation=OPTIONAL, specification=ISO_19115)
<<<<<<< /// @XmlElement(name = "name") @UML(identifier="name", obligation=CONDITIONAL, specification=ISO_19115) ======= @Override @XmlElement(name = "name") @XmlJavaTypeAdapter(CI_Citation.Since2014.class) >>>>>>> @XmlElement(name = "name") @XmlJavaTypeAdapter(CI_Citation.Since2014.class) @UML(identifier="name", obligation=CONDITIONAL, specification=ISO_19115) <<<<<<< /// @XmlElement(name = "associationType", required = true) @UML(identifier="associationType", obligation=MANDATORY, specification=ISO_19115) ======= @Override @XmlElement(name = "associationType", required = true) @XmlJavaTypeAdapter(DS_AssociationTypeCode.Since2014.class) >>>>>>> @XmlElement(name = "associationType", required = true) @XmlJavaTypeAdapter(DS_AssociationTypeCode.Since2014.class) @UML(identifier="associationType", obligation=MANDATORY, specification=ISO_19115) <<<<<<< /// @XmlElement(name = "initiativeType") @UML(identifier="initiativeType", obligation=OPTIONAL, specification=ISO_19115) ======= @Override @XmlElement(name = "initiativeType") @XmlJavaTypeAdapter(DS_InitiativeTypeCode.Since2014.class) >>>>>>> @XmlElement(name = "initiativeType") @XmlJavaTypeAdapter(DS_InitiativeTypeCode.Since2014.class) @UML(identifier="initiativeType", obligation=OPTIONAL, specification=ISO_19115) <<<<<<< /// @XmlElement(name = "metadataReference") @UML(identifier="metadataReference", obligation=CONDITIONAL, specification=ISO_19115) ======= @Override @XmlElement(name = "metadataReference") @XmlJavaTypeAdapter(CI_Citation.Since2014.class) >>>>>>> @XmlElement(name = "metadataReference") @XmlJavaTypeAdapter(CI_Citation.Since2014.class) @UML(identifier="metadataReference", obligation=CONDITIONAL, specification=ISO_19115)
<<<<<<< if (((DefaultAttributeType<?>) attributeType).getMaximumOccurs() > 1) { ======= if (maximumOccurs > 1) { >>>>>>> if (maximumOccurs > 1) { <<<<<<< converters[i] = ObjectConverters.find(String.class, ((DefaultAttributeType<?>) attributeType).getValueClass()); ======= ObjectConverter<? super String, ?> converter = ObjectConverters.find( String.class, ((AttributeType<?>) propertyType).getValueClass()); if (isAssociation) { converter = new ForFeature(converter); } converters[i] = converter; >>>>>>> ObjectConverter<? super String, ?> converter = ObjectConverters.find( String.class, ((DefaultAttributeType<?>) propertyType).getValueClass()); if (isAssociation) { converter = new ForFeature(converter); } converters[i] = converter; <<<<<<< if (!element.isEmpty() && count < values.length) try { values[count] = converters[count].apply(element); } catch (UnconvertibleObjectException e) { throw new IllegalArgumentException(Errors.format( Errors.Keys.CanNotAssign_2, attributeNames[count], element), e); ======= if (!element.isEmpty() && count < values.length) { ObjectConverter<? super String, ?> converter = converters[count]; if (converter instanceof ForFeature) { converter = ((ForFeature) converter).converter; } try { values[count] = converter.apply(element); } catch (UnconvertibleObjectException e) { throw new InvalidPropertyValueException(Errors.format( Errors.Keys.CanNotAssign_2, attributeNames[count], element), e); } >>>>>>> if (!element.isEmpty() && count < values.length) { ObjectConverter<? super String, ?> converter = converters[count]; if (converter instanceof ForFeature) { converter = ((ForFeature) converter).converter; } try { values[count] = converter.apply(element); } catch (UnconvertibleObjectException e) { throw new IllegalArgumentException(Errors.format( Errors.Keys.CanNotAssign_2, attributeNames[count], element), e); }
<<<<<<< else if (name.equals(XML.STRING_SUBSTITUTES)) { int mask = initialBitMasks(); ======= case XML.STRING_SUBSTITUTES: { bitMasks &= ~(Context.SUBSTITUTE_LANGUAGE | Context.SUBSTITUTE_COUNTRY | Context.SUBSTITUTE_FILENAME | Context.SUBSTITUTE_MIMETYPE); >>>>>>> if (name.equals(XML.STRING_SUBSTITUTES)) { bitMasks &= ~(Context.SUBSTITUTE_LANGUAGE | Context.SUBSTITUTE_COUNTRY | Context.SUBSTITUTE_FILENAME | Context.SUBSTITUTE_MIMETYPE);
<<<<<<< /// @XmlElement(name = "imageConstraints") @UML(identifier="imageContraints", obligation=OPTIONAL, specification=ISO_19115) ======= @Override // @XmlElement at the end of this class. >>>>>>> // @XmlElement at the end of this class. @UML(identifier="imageContraints", obligation=OPTIONAL, specification=ISO_19115) <<<<<<< /// @XmlElement(name = "linkage") @UML(identifier="linkage", obligation=OPTIONAL, specification=ISO_19115) ======= @Override // @XmlElement at the end of this class. >>>>>>> // @XmlElement at the end of this class. @UML(identifier="linkage", obligation=OPTIONAL, specification=ISO_19115)
<<<<<<< MatcherAssert.assertThat( content, StringContains.containsString( "test-capability" ) ); MatcherAssert.assertThat( content, StringContains.containsString( "repo_nexus-test-harness-repo" ) ); ======= assertThat( content, StringContains.containsString( "capabilities test!" ) ); assertThat( content, StringContains.containsString( "repo_nexus-test-harness-repo" ) ); >>>>>>> MatcherAssert.assertThat( content, StringContains.containsString( "capabilities test!" ) ); MatcherAssert.assertThat( content, StringContains.containsString( "repo_nexus-test-harness-repo" ) );
<<<<<<< * <div class="warning"><b>Warning:</b> * This class is expected to implement a GeoAPI {@code AttributeType} interface in a future version. * When such interface will be available, most references to {@code DefaultAttributeType} in current * API will be replaced by references to the {@code AttributeType} interface.</div> * * {@section Value type} ======= * <div class="section">Value type</div> >>>>>>> * <div class="warning"><b>Warning:</b> * This class is expected to implement a GeoAPI {@code AttributeType} interface in a future version. * When such interface will be available, most references to {@code DefaultAttributeType} in current * API will be replaced by references to the {@code AttributeType} interface.</div> * * <div class="section">Value type</div>
<<<<<<< import org.apache.sis.feature.AbstractFeature; ======= import org.apache.sis.internal.jdk7.Objects; import org.opengis.feature.Feature; >>>>>>> import org.apache.sis.internal.jdk7.Objects; import org.apache.sis.feature.AbstractFeature; <<<<<<< public ArrayList<FieldDescriptor> FDArray = new ArrayList<FieldDescriptor>(); public Map<Integer, AbstractFeature> FeatureMap = new HashMap<Integer, AbstractFeature>(); ======= /** Features existing in the shapefile. */ public Map<Integer, Feature> FeatureMap = new HashMap<Integer, Feature>(); >>>>>>> /** Features existing in the shapefile. */ public Map<Integer, AbstractFeature> FeatureMap = new HashMap<Integer, AbstractFeature>(); <<<<<<< int ShapeType = rf.getInt(); final AbstractFeature f = featureType.newInstance(); ======= int iShapeType = rf.getInt(); final Feature f = featureType.newInstance(); >>>>>>> int iShapeType = rf.getInt(); final AbstractFeature f = featureType.newInstance();
<<<<<<< import org.apache.sis.internal.jdk7.AutoCloseable; ======= import org.apache.sis.internal.util.StandardDateFormat; >>>>>>> import org.apache.sis.internal.jdk7.AutoCloseable; import org.apache.sis.internal.util.StandardDateFormat; <<<<<<< final Set<Integer> added = new HashSet<Integer>(); for (BursaWolfInfo candidate : codes) { if (added.add(candidate.target)) { bwInfos.add(candidate); } } ======= BursaWolfInfo.filter(owner, codes, bwInfos); >>>>>>> BursaWolfInfo.filter(owner, codes, bwInfos); <<<<<<< final BursaWolfParameters bwp = new BursaWolfParameters(datum, null); result = executeQuery("BursaWolfParameters", ======= /* * Accept only Bursa-Wolf parameters between datum that use the same prime meridian. * This is for avoiding ambiguity about whether longitude rotation should be applied * before or after the datum change. This check is useless for EPSG dataset 8.9 since * all datum seen by this method use Greenwich. But we nevertheless perform this check * as a safety for future evolution or customized EPSG dataset. */ if (!equalsIgnoreMetadata(meridian, datum.getPrimeMeridian())) { continue; } final BursaWolfParameters bwp = new BursaWolfParameters(datum, info.getDomainOfValidity(owner)); try (ResultSet result = executeQuery("BursaWolfParameters", >>>>>>> /* * Accept only Bursa-Wolf parameters between datum that use the same prime meridian. * This is for avoiding ambiguity about whether longitude rotation should be applied * before or after the datum change. This check is useless for EPSG dataset 8.9 since * all datum seen by this method use Greenwich. But we nevertheless perform this check * as a safety for future evolution or customized EPSG dataset. */ if (!equalsIgnoreMetadata(meridian, datum.getPrimeMeridian())) { continue; } final BursaWolfParameters bwp = new BursaWolfParameters(datum, info.getDomainOfValidity(owner)); result = executeQuery("BursaWolfParameters", <<<<<<< opProperties = new HashMap<String,Object>(opProperties); // Because this class uses a shared map. final List<String> codes = new ArrayList<String>(); final ResultSet cr = executeQuery("Coordinate_Operation Path", ======= opProperties = new HashMap<>(opProperties); // Because this class uses a shared map. final List<String> codes = new ArrayList<>(); try (ResultSet cr = executeQuery("Coordinate_Operation Path", >>>>>>> opProperties = new HashMap<String,Object>(opProperties); // Because this class uses a shared map. final List<String> codes = new ArrayList<String>(); final ResultSet cr = executeQuery("Coordinate_Operation Path",
<<<<<<< import static org.opengis.referencing.IdentifiedObject.NAME_KEY; import static org.apache.sis.parameter.TensorParameters.WKT1; import static org.apache.sis.test.Assert.*; ======= import static org.opengis.test.Validators.validate; import static org.apache.sis.test.ReferencingAssert.*; import static org.apache.sis.internal.util.Constants.NUM_ROW; import static org.apache.sis.internal.util.Constants.NUM_COL; >>>>>>> import static org.apache.sis.test.ReferencingAssert.*; import static org.apache.sis.internal.util.Constants.NUM_ROW; import static org.apache.sis.internal.util.Constants.NUM_COL; <<<<<<< final ParameterValueGroup group = WKT1.createValueGroup(singletonMap(NAME_KEY, "Test"), matrix); assertEquals("num_row", numRow, group.parameter("num_row").intValue()); assertEquals("num_col", numCol, group.parameter("num_col").intValue()); assertEquals("elements", matrix, WKT1.toMatrix(group)); assertEquals("elements", matrix, WKT1.toMatrix(new ParameterValueGroupWrapper(group))); ======= final ParameterValueGroup group = param.createValueGroup( singletonMap(ParameterDescriptor.NAME_KEY, "Test"), matrix); validate(group); assertEquals(NUM_ROW, numRow, group.parameter(NUM_ROW).intValue()); assertEquals(NUM_COL, numCol, group.parameter(NUM_COL).intValue()); assertEquals("elements", matrix, param.toMatrix(group)); assertEquals("elements", matrix, param.toMatrix(new ParameterValueGroupWrapper(group))); >>>>>>> final ParameterValueGroup group = param.createValueGroup( singletonMap(ParameterDescriptor.NAME_KEY, "Test"), matrix); assertEquals(NUM_ROW, numRow, group.parameter(NUM_ROW).intValue()); assertEquals(NUM_COL, numCol, group.parameter(NUM_COL).intValue()); assertEquals("elements", matrix, param.toMatrix(group)); assertEquals("elements", matrix, param.toMatrix(new ParameterValueGroupWrapper(group)));
<<<<<<< import org.sonatype.nexus.web.MdcUserContextFilter; ======= import org.sonatype.nexus.guice.FilterChainModule; >>>>>>> import org.sonatype.nexus.web.MdcUserContextFilter; import org.sonatype.nexus.guice.FilterChainModule;
<<<<<<< " ParameterFile[“Geocentric translations file”, “\\E.*\\W\\Q" + FranceGeocentricInterpolationTest.TEST_FILE + "”, Id[“EPSG”, 8727],\n" + " Remark[“\\E.*\\Q”]]],\n" + ======= " ParameterFile[“Geocentric translation file”, “\\E.*\\W\\Q" + FranceGeocentricInterpolationTest.TEST_FILE + "”, Id[“EPSG”, 8727]]],\n" + >>>>>>> " ParameterFile[“Geocentric translation file”, “\\E.*\\W\\Q" + FranceGeocentricInterpolationTest.TEST_FILE + "”, Id[“EPSG”, 8727],\n" + " Remark[“\\E.*\\Q”]]],\n" +
<<<<<<< ======= * Constructs a new operation metadata initialized to the specified values. * * @param operationName an unique identifier for this interface. * @param platform distributed computing platforms on which the operation has been implemented. * @param connectPoint handle for accessing the service interface. */ public DefaultOperationMetadata(final String operationName, final DistributedComputingPlatform platform, final OnlineResource connectPoint) { this.operationName = operationName; this.distributedComputingPlatforms = singleton(platform, DistributedComputingPlatform.class); this.connectPoints = singleton(connectPoint, OnlineResource.class); } /** >>>>>>> <<<<<<< ======= * Returns a SIS metadata implementation with the values of the given arbitrary implementation. * This method performs the first applicable action in the following choices: * * <ul> * <li>If the given object is {@code null}, then this method returns {@code null}.</li> * <li>Otherwise if the given object is already an instance of * {@code DefaultOperationMetadata}, then it is returned unchanged.</li> * <li>Otherwise a new {@code DefaultOperationMetadata} instance is created using the * {@linkplain #DefaultOperationMetadata(OperationMetadata) copy constructor} * and returned. Note that this is a <cite>shallow</cite> copy operation, since the other * metadata contained in the given object are not recursively copied.</li> * </ul> * * @param object the object to get as a SIS implementation, or {@code null} if none. * @return a SIS implementation containing the values of the given object (may be the * given object itself), or {@code null} if the argument was null. */ public static DefaultOperationMetadata castOrCopy(final OperationMetadata object) { if (object == null || object instanceof DefaultOperationMetadata) { return (DefaultOperationMetadata) object; } return new DefaultOperationMetadata(object); } /** >>>>>>> <<<<<<< * <div class="warning"><b>Upcoming API change — specialization</b><br> * The element type will be changed to the {@code DistributedComputingPlatform} code list * when GeoAPI will provide it (tentatively in GeoAPI 3.1). * </div> * * @return Distributed computing platforms on which the operation has been implemented. ======= * @return distributed computing platforms on which the operation has been implemented. >>>>>>> * <div class="warning"><b>Upcoming API change — specialization</b><br> * The element type will be changed to the {@code DistributedComputingPlatform} code list * when GeoAPI will provide it (tentatively in GeoAPI 3.1). * </div> * * @return distributed computing platforms on which the operation has been implemented. <<<<<<< * <div class="warning"><b>Upcoming API change — specialization</b><br> * The element type will be changed to the {@code DistributedComputingPlatform} code list when GeoAPI will provide * it (tentatively in GeoAPI 3.1). In the meantime, users can define their own code list class as below: * * {@preformat java * final class UnsupportedCodeList extends CodeList<UnsupportedCodeList> { * private static final List<UnsupportedCodeList> VALUES = new ArrayList<UnsupportedCodeList>(); * * // Need to declare at least one code list element. * public static final UnsupportedCodeList MY_CODE_LIST = new UnsupportedCodeList("MY_CODE_LIST"); * * private UnsupportedCodeList(String name) { * super(name, VALUES); * } * * public static UnsupportedCodeList valueOf(String code) { * return valueOf(UnsupportedCodeList.class, code); * } * * &#64;Override * public UnsupportedCodeList[] family() { * synchronized (VALUES) { * return VALUES.toArray(new UnsupportedCodeList[VALUES.size()]); * } * } * } * } * </div> * * @param newValues The new distributed computing platforms on which the operation has been implemented. ======= * @param newValues the new distributed computing platforms on which the operation has been implemented. >>>>>>> * <div class="warning"><b>Upcoming API change — specialization</b><br> * The element type will be changed to the {@code DistributedComputingPlatform} code list when GeoAPI will provide * it (tentatively in GeoAPI 3.1). In the meantime, users can define their own code list class as below: * * {@preformat java * final class UnsupportedCodeList extends CodeList<UnsupportedCodeList> { * private static final List<UnsupportedCodeList> VALUES = new ArrayList<UnsupportedCodeList>(); * * // Need to declare at least one code list element. * public static final UnsupportedCodeList MY_CODE_LIST = new UnsupportedCodeList("MY_CODE_LIST"); * * private UnsupportedCodeList(String name) { * super(name, VALUES); * } * * public static UnsupportedCodeList valueOf(String code) { * return valueOf(UnsupportedCodeList.class, code); * } * * &#64;Override * public UnsupportedCodeList[] family() { * synchronized (VALUES) { * return VALUES.toArray(new UnsupportedCodeList[VALUES.size()]); * } * } * } * } * </div> * * @param newValues the new distributed computing platforms on which the operation has been implemented. <<<<<<< * <div class="warning"><b>Upcoming API change — generalization</b><br> * The element type will be changed to the {@code OperationMetadata} interface * when GeoAPI will provide it (tentatively in GeoAPI 3.1). * </div> * * @return List of operation that must be completed immediately, or an empty list if none. ======= * @return list of operation that must be completed immediately, or an empty list if none. >>>>>>> * <div class="warning"><b>Upcoming API change — generalization</b><br> * The element type will be changed to the {@code OperationMetadata} interface * when GeoAPI will provide it (tentatively in GeoAPI 3.1). * </div> * * @return list of operation that must be completed immediately, or an empty list if none. <<<<<<< * <div class="warning"><b>Upcoming API change — generalization</b><br> * The element type will be changed to the {@code OperationMetadata} interface * when GeoAPI will provide it (tentatively in GeoAPI 3.1). * </div> * * @param newValues The new list of operation. ======= * @param newValues the new list of operation. >>>>>>> * <div class="warning"><b>Upcoming API change — generalization</b><br> * The element type will be changed to the {@code OperationMetadata} interface * when GeoAPI will provide it (tentatively in GeoAPI 3.1). * </div> * * @param newValues the new list of operation.
<<<<<<< import org.apache.sis.internal.metadata.LegacyPropertyAdapter; ======= import org.opengis.metadata.MetadataScope; import org.apache.sis.internal.metadata.legacy.LegacyPropertyAdapter; >>>>>>> import org.apache.sis.internal.metadata.legacy.LegacyPropertyAdapter;
<<<<<<< * Tests the {@link Code#Code(ReferenceIdentifier)} constructor with {@code "EPSG:4326"} identifier. ======= * Tests the {@link Code#Code(Identifier)} constructor with {@code "EPSG:4326"} identifier. * This test intentionally uses an identifier with the {@code IOGP} authority instead than * EPSG in order to make sure that the {@code codeSpace} attribute is set from * {@link Identifier#getCodeSpace()}, not from {@link Identifier#getAuthority()}. >>>>>>> * Tests the {@link Code#Code(ReferenceIdentifier)} constructor with {@code "EPSG:4326"} identifier. * This test intentionally uses an identifier with the {@code IOGP} authority instead than * EPSG in order to make sure that the {@code codeSpace} attribute is set from * {@link Identifier#getCodeSpace()}, not from {@link Identifier#getAuthority()}. <<<<<<< final ReferenceIdentifier id = new ImmutableIdentifier(HardCodedCitations.IOGP, "EPSG", "4326"); ======= final SimpleCitation IOGP = new SimpleCitation("IOGP"); final Identifier id = new ImmutableIdentifier(IOGP, "EPSG", "4326"); // See above javadoc. >>>>>>> final SimpleCitation IOGP = new SimpleCitation("IOGP"); final ReferenceIdentifier id = new ImmutableIdentifier(IOGP, "EPSG", "4326"); // See above javadoc. <<<<<<< * Tests the {@link Code#Code(ReferenceIdentifier)} constructor with {@code "EPSG:8.3:4326"} identifier. ======= * Tests the {@link Code#Code(Identifier)} constructor with {@code "EPSG:8.3:4326"} identifier. * This test intentionally uses an identifier with the {@code IOGP} authority instead than EPSG * for the same reason than {@link #testSimple()}. >>>>>>> * Tests the {@link Code#Code(ReferenceIdentifier)} constructor with {@code "EPSG:8.3:4326"} identifier. * This test intentionally uses an identifier with the {@code IOGP} authority instead than EPSG * for the same reason than {@link #testSimple()}. <<<<<<< final ReferenceIdentifier id = new ImmutableIdentifier(HardCodedCitations.IOGP, "EPSG", "4326", "8.2", null); ======= final SimpleCitation IOGP = new SimpleCitation("IOGP"); final Identifier id = new ImmutableIdentifier(IOGP, "EPSG", "4326", "8.2", null); // See above javadoc. >>>>>>> final SimpleCitation IOGP = new SimpleCitation("IOGP"); final ReferenceIdentifier id = new ImmutableIdentifier(IOGP, "EPSG", "4326", "8.2", null); // See above javadoc. <<<<<<< final ReferenceIdentifier id = new ImmutableIdentifier(HardCodedCitations.IOGP, "EPSG", "4326", "8.2", null); ======= final Identifier id = new ImmutableIdentifier(Citations.EPSG, "EPSG", "4326", "8.2", null); >>>>>>> final ReferenceIdentifier id = new ImmutableIdentifier(Citations.EPSG, "EPSG", "4326", "8.2", null); <<<<<<< final ReferenceIdentifier actual = value.getIdentifier(); assertSame ("authority", Citations.OGP, actual.getAuthority()); ======= final Identifier actual = value.getIdentifier(); assertSame ("authority", Citations.EPSG, actual.getAuthority()); >>>>>>> final ReferenceIdentifier actual = value.getIdentifier(); assertSame ("authority", Citations.EPSG, actual.getAuthority());
<<<<<<< ======= import java.util.Collections; import java.io.Serializable; import org.opengis.metadata.citation.OnlineResource; import org.opengis.metadata.identification.CoupledResource; import org.opengis.metadata.identification.DistributedComputingPlatform; import org.opengis.metadata.identification.OperationMetadata; import org.opengis.parameter.ParameterDescriptor; import org.opengis.util.InternationalString; import org.apache.sis.internal.util.Strings; >>>>>>> import org.apache.sis.internal.util.Strings; <<<<<<< return "OperationMetadata[“" + getOperationName() + "”]"; ======= return Strings.bracket("OperationMetadata", operationName); >>>>>>> return Strings.bracket("OperationMetadata", getOperationName());
<<<<<<< import org.apache.sis.internal.jdk8.Temporal; import org.apache.sis.util.iso.ResourceInternationalString; ======= import java.time.temporal.Temporal; >>>>>>> import org.apache.sis.internal.jdk8.Temporal;
<<<<<<< ======= import org.opengis.feature.Property; import org.opengis.feature.PropertyType; import org.opengis.feature.PropertyNotFoundException; import org.opengis.feature.InvalidPropertyValueException; import org.opengis.feature.Attribute; import org.opengis.feature.AttributeType; import org.opengis.feature.Feature; import org.opengis.feature.FeatureType; import org.opengis.feature.FeatureAssociation; import org.opengis.feature.FeatureAssociationRole; import org.opengis.feature.IdentifiedType; import org.opengis.feature.Operation; >>>>>>> <<<<<<< final String name = ((Property) property).getName().toString(); verifyPropertyType(name, (Property) property); if (property instanceof AbstractAttribute<?> && !Containers.isNullOrEmpty(((AbstractAttribute<?>) property).characteristics())) { throw new IllegalArgumentException(Errors.format(Errors.Keys.CanNotAssignCharacteristics_1, name)); ======= final String name = property.getName().toString(); verifyPropertyType(name, property); if (property instanceof Attribute<?> && !Containers.isNullOrEmpty(((Attribute<?>) property).characteristics())) { throw new IllegalArgumentException(Resources.format(Resources.Keys.CanNotAssignCharacteristics_1, name)); >>>>>>> final String name = ((Property) property).getName().toString(); verifyPropertyType(name, (Property) property); if (property instanceof AbstractAttribute<?> && !Containers.isNullOrEmpty(((AbstractAttribute<?>) property).characteristics())) { throw new IllegalArgumentException(Resources.format(Resources.Keys.CanNotAssignCharacteristics_1, name)); <<<<<<< association.setValues((Collection<? extends AbstractFeature>) value); return; // Skip the setter at the end of this method. ======= association.setValues((Collection<? extends Feature>) value); return; // Skip the setter at the end of this method. >>>>>>> association.setValues((Collection<? extends AbstractFeature>) value); return; // Skip the setter at the end of this method. <<<<<<< if (!(value instanceof AbstractFeature)) { throw illegalValueClass(role.getName(), value); ======= if (!(value instanceof Feature)) { throw illegalValueClass(role, Feature.class, value); >>>>>>> if (!(value instanceof AbstractFeature)) { throw illegalValueClass(role, AbstractFeature.class, value); <<<<<<< private static IllegalArgumentException illegalPropertyType(final GenericName name, final Object value) { return new IllegalArgumentException(Errors.format(Errors.Keys.IllegalPropertyValueClass_2, name, value)); ======= private static InvalidPropertyValueException illegalFeatureType( final FeatureAssociationRole association, final FeatureType expected, final FeatureType actual) { return new InvalidPropertyValueException(Resources.format(Resources.Keys.IllegalFeatureType_3, association.getName(), expected.getName(), actual.getName())); >>>>>>> private static IllegalArgumentException illegalFeatureType( final DefaultAssociationRole association, final FeatureType expected, final FeatureType actual) { return new IllegalArgumentException(Resources.format(Resources.Keys.IllegalFeatureType_3, association.getName(), expected.getName(), actual.getName()));
<<<<<<< * @param object The metadata to copy values from, or {@code null} if none. ======= * @param object the metadata to copy values from, or {@code null} if none. * * @see #castOrCopy(Party) >>>>>>> * @param object the metadata to copy values from, or {@code null} if none. <<<<<<< ======= * Returns a SIS metadata implementation with the values of the given arbitrary implementation. * This method performs the first applicable action in the following choices: * * <ul> * <li>If the given object is {@code null}, then this method returns {@code null}.</li> * <li>Otherwise if the given object is an instance of {@link Individual} or {@link Organisation}, * then this method delegates to the {@code castOrCopy(…)} method of the corresponding SIS subclass. * Note that if the given object implements more than one of the above-cited interfaces, * then the {@code castOrCopy(…)} method to be used is unspecified.</li> * <li>Otherwise if the given object is already an instance of * {@code AbstractParty}, then it is returned unchanged.</li> * <li>Otherwise a new {@code AbstractParty} instance is created using the * {@linkplain #AbstractParty(Party) copy constructor} and returned. * Note that this is a <cite>shallow</cite> copy operation, since the other * metadata contained in the given object are not recursively copied.</li> * </ul> * * @param object the object to get as a SIS implementation, or {@code null} if none. * @return a SIS implementation containing the values of the given object (may be the * given object itself), or {@code null} if the argument was null. */ public static AbstractParty castOrCopy(final Party object) { if (object instanceof Individual) { return DefaultIndividual.castOrCopy((Individual) object); } if (object instanceof Organisation) { return DefaultOrganisation.castOrCopy((Organisation) object); } if (object == null || object instanceof AbstractParty) { return (AbstractParty) object; } return new AbstractParty(object); } /** >>>>>>>
<<<<<<< final DefaultLegalConstraints constraints = (DefaultLegalConstraints) getSingleton(getSingleton( builder.result().getIdentificationInfo()).getResourceConstraints()); ======= final LegalConstraints constraints = (LegalConstraints) getSingleton(getSingleton( builder.build(false).getIdentificationInfo()).getResourceConstraints()); >>>>>>> final DefaultLegalConstraints constraints = (DefaultLegalConstraints) getSingleton(getSingleton( builder.build(false).getIdentificationInfo()).getResourceConstraints());
<<<<<<< } catch (Exception e) { // (SecurityException | JMException) on the JDK7 branch. Logging.unexpectedException(Logger.getLogger("org.apache.sis"), Supervisor.class, "register", e); ======= } catch (InstanceAlreadyExistsException e) { final LogRecord record = Messages.getResources(null) .getLogRecord(Level.CONFIG, Messages.Keys.AlreadyRegistered_2, "MBean", NAME); record.setLoggerName("org.apache.sis"); Logging.log(Supervisor.class, "register", record); } catch (SecurityException | JMException e) { Logging.unexpectedException(Logging.getLogger("org.apache.sis"), Supervisor.class, "register", e); >>>>>>> } catch (InstanceAlreadyExistsException e) { final LogRecord record = Messages.getResources(null) .getLogRecord(Level.CONFIG, Messages.Keys.AlreadyRegistered_2, "MBean", NAME); record.setLoggerName("org.apache.sis"); Logging.log(Supervisor.class, "register", record); } catch (Exception e) { // (SecurityException | JMException) on the JDK7 branch. Logging.unexpectedException(Logging.getLogger("org.apache.sis"), Supervisor.class, "register", e);
<<<<<<< * <div class="warning"><b>Upcoming API change — generalization</b><br> * The element type will be changed to the {@code AttributeGroup} interface * when GeoAPI will provide it (tentatively in GeoAPI 3.1). * </div> * * @return Information on attribute groups of the resource. ======= * @return information on attribute groups of the resource. >>>>>>> * <div class="warning"><b>Upcoming API change — generalization</b><br> * The element type will be changed to the {@code AttributeGroup} interface * when GeoAPI will provide it (tentatively in GeoAPI 3.1). * </div> * * @return information on attribute groups of the resource. <<<<<<< * <div class="warning"><b>Upcoming API change — generalization</b><br> * The element type will be changed to the {@code AttributeGroup} interface * when GeoAPI will provide it (tentatively in GeoAPI 3.1). * </div> * * @param newValues The new information on attribute groups of the resource. ======= * @param newValues the new information on attribute groups of the resource. >>>>>>> * <div class="warning"><b>Upcoming API change — generalization</b><br> * The element type will be changed to the {@code AttributeGroup} interface * when GeoAPI will provide it (tentatively in GeoAPI 3.1). * </div> * * @param newValues the new information on attribute groups of the resource.
<<<<<<< // Branch-dependent imports import java.nio.file.Files; import java.nio.file.Path; import java.nio.charset.StandardCharsets; import org.apache.sis.internal.jdk8.JDK8; ======= >>>>>>> import org.apache.sis.internal.jdk8.JDK8;
<<<<<<< String cs = null; if (identifier instanceof ReferenceIdentifier) { cs = ((ReferenceIdentifier) identifier).getCodeSpace(); } if (cs == null) { cs = org.apache.sis.internal.util.Citations.getIdentifier(identifier.getAuthority()); ======= String cs = identifier.getCodeSpace(); if (cs == null || cs.isEmpty()) { cs = org.apache.sis.internal.util.Citations.getIdentifier(identifier.getAuthority(), true); >>>>>>> String cs = null; if (identifier instanceof ReferenceIdentifier) { cs = ((ReferenceIdentifier) identifier).getCodeSpace(); } if (cs == null || cs.isEmpty()) { cs = org.apache.sis.internal.util.Citations.getIdentifier(identifier.getAuthority(), true);
<<<<<<< // Related to JDK8 import org.apache.sis.internal.jdk8.Function; ======= // Branch-dependent imports import java.util.function.Function; >>>>>>> // Branch-dependent imports import org.apache.sis.internal.jdk8.Function;
<<<<<<< import org.opengis.referencing.ReferenceIdentifier; import org.apache.sis.util.Debug; ======= >>>>>>> import org.opengis.referencing.ReferenceIdentifier;
<<<<<<< * @since 0.3 * @version 0.8 ======= * @version 0.3 * @since 0.3 >>>>>>> * @version 0.8 * @since 0.3
<<<<<<< assertEquals("version", Store.V1_0, reader.getVersion()); try (final Stream<AbstractFeature> features = reader.getFeatures()) { final Iterator<AbstractFeature> it = features.iterator(); ======= assertEquals("version", StoreProvider.V1_0, reader.getVersion()); try (final Stream<Feature> features = reader.features()) { final Iterator<Feature> it = features.iterator(); >>>>>>> assertEquals("version", StoreProvider.V1_0, reader.getVersion()); try (final Stream<AbstractFeature> features = reader.features()) { final Iterator<AbstractFeature> it = features.iterator(); <<<<<<< assertEquals("version", Store.V1_1, reader.getVersion()); try (final Stream<AbstractFeature> features = reader.getFeatures()) { final Iterator<AbstractFeature> it = features.iterator(); ======= assertEquals("version", StoreProvider.V1_1, reader.getVersion()); try (final Stream<Feature> features = reader.features()) { final Iterator<Feature> it = features.iterator(); >>>>>>> assertEquals("version", StoreProvider.V1_1, reader.getVersion()); try (final Stream<AbstractFeature> features = reader.features()) { final Iterator<AbstractFeature> it = features.iterator(); <<<<<<< assertEquals("version", Store.V1_0, reader.getVersion()); try (final Stream<AbstractFeature> features = reader.getFeatures()) { final Iterator<AbstractFeature> it = features.iterator(); ======= assertEquals("version", StoreProvider.V1_0, reader.getVersion()); try (final Stream<Feature> features = reader.features()) { final Iterator<Feature> it = features.iterator(); >>>>>>> assertEquals("version", StoreProvider.V1_0, reader.getVersion()); try (final Stream<AbstractFeature> features = reader.features()) { final Iterator<AbstractFeature> it = features.iterator(); <<<<<<< try (final Stream<AbstractFeature> features = reader.getFeatures()) { final Iterator<AbstractFeature> it = features.iterator(); ======= try (final Stream<Feature> features = reader.features()) { final Iterator<Feature> it = features.iterator(); >>>>>>> try (final Stream<AbstractFeature> features = reader.features()) { final Iterator<AbstractFeature> it = features.iterator(); <<<<<<< assertEquals("version", Store.V1_0, reader.getVersion()); try (final Stream<AbstractFeature> features = reader.getFeatures()) { final Iterator<AbstractFeature> it = features.iterator(); ======= assertEquals("version", StoreProvider.V1_0, reader.getVersion()); try (final Stream<Feature> features = reader.features()) { final Iterator<Feature> it = features.iterator(); >>>>>>> assertEquals("version", StoreProvider.V1_0, reader.getVersion()); try (final Stream<AbstractFeature> features = reader.features()) { final Iterator<AbstractFeature> it = features.iterator(); <<<<<<< assertEquals("version", Store.V1_1, reader.getVersion()); try (final Stream<AbstractFeature> features = reader.getFeatures()) { final Iterator<AbstractFeature> it = features.iterator(); ======= assertEquals("version", StoreProvider.V1_1, reader.getVersion()); try (final Stream<Feature> features = reader.features()) { final Iterator<Feature> it = features.iterator(); >>>>>>> assertEquals("version", StoreProvider.V1_1, reader.getVersion()); try (final Stream<AbstractFeature> features = reader.features()) { final Iterator<AbstractFeature> it = features.iterator(); <<<<<<< final Stream<AbstractFeature> f1 = reader.getFeatures(); final Iterator<AbstractFeature> i1 = f1.iterator(); ======= final Stream<Feature> f1 = reader.features(); final Iterator<Feature> i1 = f1.iterator(); >>>>>>> final Stream<AbstractFeature> f1 = reader.features(); final Iterator<AbstractFeature> i1 = f1.iterator(); <<<<<<< final Stream<AbstractFeature> f2 = reader.getFeatures(); final Iterator<AbstractFeature> i2 = f2.iterator(); ======= final Stream<Feature> f2 = reader.features(); final Iterator<Feature> i2 = f2.iterator(); >>>>>>> final Stream<AbstractFeature> f2 = reader.features(); final Iterator<AbstractFeature> i2 = f2.iterator(); <<<<<<< final Stream<AbstractFeature> f3 = reader.getFeatures(); final Iterator<AbstractFeature> i3 = f3.iterator(); ======= final Stream<Feature> f3 = reader.features(); final Iterator<Feature> i3 = f3.iterator(); >>>>>>> final Stream<AbstractFeature> f3 = reader.features(); final Iterator<AbstractFeature> i3 = f3.iterator();
<<<<<<< * <li>{@code Set<AttributeType>} for the {@code attributes} property</li> * <li>{@code Set<FeatureType>} for the {@code features} property</li> * <li>{@code Set<FeatureType>} for the {@code featureInstances} property</li> * <li>{@code Set<AttributeType>} for the {@code attributeInstances} property</li> ======= * <li>{@code Set<CharSequence>} for the {@code features} property</li> * <li>{@code Set<CharSequence>} for the {@code attributes} property</li> * <li>{@code Set<CharSequence>} for the {@code featureInstances} property</li> * <li>{@code Set<CharSequence>} for the {@code attributeInstances} property</li> >>>>>>> * <li>{@code Set<FeatureType>} for the {@code features} property</li> * <li>{@code Set<AttributeType>} for the {@code attributes} property</li> * <li>{@code Set<FeatureType>} for the {@code featureInstances} property</li> * <li>{@code Set<AttributeType>} for the {@code attributeInstances} property</li> <<<<<<< * <div class="warning"><b>Upcoming API change:</b> * The type of this property may be changed to {@code Set<CharSequence>} for ISO 19115:2014 conformance. * See <a href="http://jira.codehaus.org/browse/GEO-238">GEO-238</a> for more information.</div> * * @return Attributes to which the information applies. ======= * <div class="note"><b>Example:</b> * If a geographic data provider is generating vector mapping for thee administrative areas * and if the data were processed in the same way, then the provider could record the bulk * of initial data at {@link ScopeCode#DATASET} level with a * “<cite>Administrative area A, B &amp; C</cite>” description. * </div> >>>>>>> * <div class="note"><b>Example:</b> * If a geographic data provider is generating vector mapping for thee administrative areas * and if the data were processed in the same way, then the provider could record the bulk * of initial data at {@link ScopeCode#DATASET} level with a * “<cite>Administrative area A, B &amp; C</cite>” description. * </div> <<<<<<< public Set<AttributeType> getAttributes() { return getProperty(AttributeType.class, ATTRIBUTES); ======= @XmlElement(name = "dataset") public String getDataset() { return (property == DATASET) ? (String) value : null; >>>>>>> @XmlElement(name = "dataset") public String getDataset() { return (property == DATASET) ? (String) value : null; <<<<<<< * <div class="warning"><b>Upcoming API change:</b> * The type of this property may be changed to {@code Set<CharSequence>} for ISO 19115:2014 conformance. * See <a href="http://jira.codehaus.org/browse/GEO-238">GEO-238</a> for more information.</div> * * @param newValues The new features. ======= * @param newValues The new feature types. >>>>>>> * <div class="warning"><b>Upcoming API change:</b> * The type of this property may be changed to {@code Set<CharSequence>} for ISO 19115:2014 conformance. * See <a href="http://jira.codehaus.org/browse/GEO-238">GEO-238</a> for more information.</div> * * @param newValues The new feature types. <<<<<<< * <div class="warning"><b>Upcoming API change:</b> * The type of this property may be changed to {@code Set<CharSequence>} for ISO 19115:2014 conformance. * See <a href="http://jira.codehaus.org/browse/GEO-238">GEO-238</a> for more information.</div> * ======= * <div class="note"><b>Example:</b> * If a new bridge is constructed in a road network, * the change can be recorded at {@link ScopeCode#FEATURE} level with a * “<cite>Administrative area A — New bridge</cite>” description. * </div> * >>>>>>> * <div class="note"><b>Example:</b> * If a new bridge is constructed in a road network, * the change can be recorded at {@link ScopeCode#FEATURE} level with a * “<cite>Administrative area A — New bridge</cite>” description. * </div> * * {@section Conditions} * This method returns a modifiable collection only if no other property is set. * Otherwise, this method returns an unmodifiable empty collection. * * <div class="warning"><b>Upcoming API change:</b> * The type of this property may be changed to {@code Set<CharSequence>} for ISO 19115:2014 conformance. * See <a href="http://jira.codehaus.org/browse/GEO-238">GEO-238</a> for more information.</div> * <<<<<<< * <div class="warning"><b>Upcoming API change:</b> * The type of this property may be changed to {@code Set<CharSequence>} for ISO 19115:2014 conformance. * See <a href="http://jira.codehaus.org/browse/GEO-238">GEO-238</a> for more information.</div> * ======= * <div class="note"><b>Example:</b> * If the overhead clearance of a new bridge was wrongly recorded, * the correction can be recorded at {@link ScopeCode#ATTRIBUTE} level with a * “<cite>Administrative area A — New bridge — Overhead clearance</cite>” description. * </div> * >>>>>>> * <div class="note"><b>Example:</b> * If the overhead clearance of a new bridge was wrongly recorded, * the correction can be recorded at {@link ScopeCode#ATTRIBUTE} level with a * “<cite>Administrative area A — New bridge — Overhead clearance</cite>” description. * </div> * * {@section Conditions} * This method returns a modifiable collection only if no other property is set. * Otherwise, this method returns an unmodifiable empty collection. * * <div class="warning"><b>Upcoming API change:</b> * The type of this property may be changed to {@code Set<CharSequence>} for ISO 19115:2014 conformance. * See <a href="http://jira.codehaus.org/browse/GEO-238">GEO-238</a> for more information.</div> * <<<<<<< * Returns the dataset to which the information applies. * * <div class="warning"><b>Upcoming API change:</b> * The type of this property may be changed to {@code Set<CharSequence>} for ISO 19115:2014 conformance. * See <a href="http://jira.codehaus.org/browse/GEO-238">GEO-238</a> for more information.</div> * * @return Dataset to which the information applies, or {@code null}. */ @Override @XmlElement(name = "dataset") public String getDataset() { return (property == DATASET) ? (String) value : null; } /** * Sets the dataset to which the information applies. * * {@section Effect on other properties} * If and only if the {@code newValue} is non-null, then this method automatically * discards all other properties. * * <div class="warning"><b>Upcoming API change:</b> * The type of this property may be changed to {@code Set<CharSequence>} for ISO 19115:2014 conformance. * See <a href="http://jira.codehaus.org/browse/GEO-238">GEO-238</a> for more information.</div> * * @param newValue The new dataset. */ public void setDataset(final String newValue) { checkWritePermission(); if (newValue != null || property == DATASET) { warningOnOverwrite(DATASET); property = DATASET; value = newValue; } } /** ======= >>>>>>>
<<<<<<< String TYPE_PROCEDURE = "type " + PROCEDURE; String AGGREGATED_PROCEDURE = "aggregated " + PROCEDURE; String PROCEDURE_INSTANCE = PROCEDURE + " instance"; ======= String PUBLISHED_PROCEDURE = "published procedure"; String PUBLISHED_PROCEDURES = "published procedures"; >>>>>>> String PUBLISHED_PROCEDURE = "published procedure"; String PUBLISHED_PROCEDURES = "published procedures"; String TYPE_PROCEDURE = "type " + PROCEDURE; String AGGREGATED_PROCEDURE = "aggregated " + PROCEDURE; String PROCEDURE_INSTANCE = PROCEDURE + " instance";
<<<<<<< 2, 2, parameters.getDescriptor()), parameters, Collections.<ParameterRole, ParameterDescriptor<Double>>emptyMap(), (byte) 0)); ======= 2, 2, parameters.getDescriptor()), parameters, Collections.emptyMap(), (byte) 0)); super.computeCoefficients(); >>>>>>> 2, 2, parameters.getDescriptor()), parameters, Collections.<ParameterRole, ParameterDescriptor<Double>>emptyMap(), (byte) 0)); super.computeCoefficients();
<<<<<<< import org.apache.sis.util.iso.DefaultNameSpace; import org.apache.sis.util.iso.DefaultNameFactory; ======= >>>>>>> import org.apache.sis.util.iso.DefaultNameFactory;
<<<<<<< public void setIssueIdentification(final String newValue) { checkWritePermission(); ======= public void setIssueIdentification(final InternationalString newValue) { checkWritePermission(issueIdentification); >>>>>>> public void setIssueIdentification(final String newValue) { checkWritePermission(issueIdentification); <<<<<<< public void setPage(final String newValue) { checkWritePermission(); ======= public void setPage(final InternationalString newValue) { checkWritePermission(page); >>>>>>> public void setPage(final String newValue) { checkWritePermission(page);
<<<<<<< public MemoryFeatureSet(final WarningListeners<DataStore> listeners, final DefaultFeatureType type, final Collection<AbstractFeature> features) { super(listeners); ======= public MemoryFeatureSet(final StoreListeners parent, final FeatureType type, final Collection<Feature> features) { super(parent); >>>>>>> public MemoryFeatureSet(final StoreListeners parent, final DefaultFeatureType type, final Collection<AbstractFeature> features) { super(parent);
<<<<<<< assertEquals(Locale.ENGLISH, metadata.getLanguage()); assertEquals(CharacterSet.UTF_8, metadata.getCharacterSet()); ======= assertInstanceOf("party", Organisation.class, party); assertEquals(Locale.ENGLISH, getSingleton(metadata.getLanguages())); if (!REGRESSION) assertEquals(StandardCharsets.UTF_8, getSingleton(metadata.getCharacterSets())); >>>>>>> assertEquals(Locale.ENGLISH, metadata.getLanguage()); if (!REGRESSION) assertEquals(CharacterSet.UTF_8, metadata.getCharacterSet());
<<<<<<< ======= // Branch-dependent imports import org.apache.sis.internal.jdk7.Objects; import org.opengis.feature.PropertyType; import org.opengis.feature.AttributeType; import org.opengis.feature.FeatureType; import org.opengis.feature.FeatureAssociationRole; >>>>>>> <<<<<<< final DefaultFeatureType[] superTypes, final AbstractIdentifiedType... properties) ======= final FeatureType[] superTypes, final PropertyType... properties) >>>>>>> final DefaultFeatureType[] superTypes, final AbstractIdentifiedType... properties) <<<<<<< /* * Note: other SIS branches use AttributeType and FeatureAssociationRole * instead than DefaultAttributeType and DefaultAssociationRole. */ if (base instanceof DefaultAttributeType<?>) { if (!(other instanceof DefaultAttributeType<?>)) { ======= if (base instanceof AttributeType<?>) { if (!(other instanceof AttributeType<?>)) { >>>>>>> /* * Note: other SIS branches use AttributeType and FeatureAssociationRole * instead than DefaultAttributeType and DefaultAssociationRole. */ if (base instanceof DefaultAttributeType<?>) { if (!(other instanceof DefaultAttributeType<?>)) { <<<<<<< @SuppressWarnings("unchecked") public Collection<AbstractIdentifiedType> getPropertyTypes(final boolean includeSuperTypes) { /* * Cast is a workaround for "Apache SIS on GeoAPI 3.0" branch only (other branches do not need cast). * This is because GeoAPI 3.0 does not provide the 'org.opengis.feature.PropertyType' interface, and * we do not want to put our internal PropertyType class in public API. Our closest public class is * AbstractIdentifiedType. Because of the way Java parameterized types are implemented (type erasure), * this cast is okay if the collections are read-only. */ return (Collection) (includeSuperTypes ? allProperties : properties); ======= @Override public Collection<PropertyType> getProperties(final boolean includeSuperTypes) { return includeSuperTypes ? allProperties : properties; >>>>>>> public Collection<AbstractIdentifiedType> getProperties(final boolean includeSuperTypes) { return includeSuperTypes ? allProperties : properties;
<<<<<<< ======= // Branch-dependent imports import org.opengis.feature.Feature; import org.opengis.feature.FeatureType; import org.opengis.feature.PropertyType; import org.opengis.feature.InvalidPropertyValueException; >>>>>>>
<<<<<<< import org.apache.sis.internal.jdk7.Objects; ======= import java.util.Objects; import org.opengis.feature.Attribute; >>>>>>> import org.apache.sis.internal.jdk7.Objects; import org.opengis.feature.Attribute;
<<<<<<< } catch (IllegalArgumentException e) { /* * Parameter not found, or is not numeric, or unit of measurement is not linear. * Those exceptions should never occur with map projections, but may happen for * some other operations like Molodenski¹. * * Do not touch to the parameters. We will see if createParameterizedTransform(…) * can do something about that. If it can not, createParameterizedTransform(…) is * the right place to throw the exception. * * ¹ The actual Molodenski parameter names are "src_semi_major" and "src_semi_minor". * But we do not try to set them because we have no way to set the corresponding * "tgt_semi_major" and "tgt_semi_minor" parameters anyway. */ failure = e; } catch (IllegalStateException e) { failure = e; ======= method = getOperationMethod(methodName); Logging.recoverableException(Logging.getLogger(Loggers.COORDINATE_OPERATION), DefaultMathTransformFactory.class, "createParameterizedTransform", exception); >>>>>>> method = getOperationMethod(methodName); Logging.recoverableException(Logging.getLogger(Loggers.COORDINATE_OPERATION), DefaultMathTransformFactory.class, "createParameterizedTransform", exception); } catch (IllegalStateException e) { failure = e; <<<<<<< swap1 = CoordinateSystems.swapAndScaleAxes(baseCS, CoordinateSystems.replaceAxes(baseCS, AxesConvention.NORMALIZED)); swap3 = CoordinateSystems.swapAndScaleAxes(CoordinateSystems.replaceAxes(derivedCS, AxesConvention.NORMALIZED), derivedCS); } catch (IllegalArgumentException cause) { throw new FactoryException(cause); } catch (ConversionException cause) { throw new FactoryException(cause); ======= swap1 = (sourceCS != null) ? CoordinateSystems.swapAndScaleAxes(sourceCS, CoordinateSystems.replaceAxes(sourceCS, AxesConvention.NORMALIZED)) : null; swap3 = (targetCS != null) ? CoordinateSystems.swapAndScaleAxes(CoordinateSystems.replaceAxes(targetCS, AxesConvention.NORMALIZED), targetCS) : null; } catch (IllegalArgumentException | ConversionException cause) { throw new InvalidGeodeticParameterException(cause.getLocalizedMessage(), cause); >>>>>>> swap1 = (sourceCS != null) ? CoordinateSystems.swapAndScaleAxes(sourceCS, CoordinateSystems.replaceAxes(sourceCS, AxesConvention.NORMALIZED)) : null; swap3 = (targetCS != null) ? CoordinateSystems.swapAndScaleAxes(CoordinateSystems.replaceAxes(targetCS, AxesConvention.NORMALIZED), targetCS) : null; } catch (IllegalArgumentException cause) { throw new InvalidGeodeticParameterException(cause.getLocalizedMessage(), cause); } catch (ConversionException cause) { throw new FactoryException(cause); <<<<<<< final String methodName = parameters.getDescriptor().getName().getCode(); OperationMethod method = null; try { method = getOperationMethod(methodName); if (!(method instanceof MathTransformProvider)) { throw new NoSuchIdentifierException(Errors.format( // For now, handle like an unknown operation. Errors.Keys.UnsupportedImplementation_1, Classes.getClass(method)), methodName); } MathTransform transform; try { transform = ((MathTransformProvider) method).createMathTransform(this, parameters); } catch (IllegalArgumentException exception) { /* * Catch only exceptions which may be the result of improper parameter * usage (e.g. a value out of range). Do not catch exception caused by * programming errors (e.g. null pointer exception). */ throw new FactoryException(exception); } catch (IllegalStateException exception) { throw new FactoryException(exception); } transform = unique(transform); method = DefaultOperationMethod.redimension(method, transform.getSourceDimensions(), transform.getTargetDimensions()); return transform; } finally { lastMethod.set(method); // May be null in case of failure, which is intended. } ======= ArgumentChecks.ensureNonNull("derivedCS", derivedCS); final Context context = new Context(); context.setSource(baseCRS); context.setTarget(derivedCS); return createParameterizedTransform(parameters, context); } /** * Creates a transform from a base to a derived CS using an existing parameterized transform. * The given {@code parameterized} transform shall expect * {@linkplain org.apache.sis.referencing.cs.AxesConvention#NORMALIZED normalized} input coordinates and * produce normalized output coordinates. * * @param baseCS The source coordinate system. * @param parameterized A <cite>base to derived</cite> transform for normalized input and output coordinates. * @param derivedCS The target coordinate system. * @return The transform from {@code baseCS} to {@code derivedCS}, including unit conversions and axis swapping. * @throws FactoryException if the object creation failed. This exception is thrown * if some required parameter has not been supplied, or has illegal value. * * @deprecated Replaced by {@link #swapAndScaleAxes(MathTransform, Context)}. */ @Deprecated public MathTransform createBaseToDerived(final CoordinateSystem baseCS, final MathTransform parameterized, final CoordinateSystem derivedCS) throws FactoryException { ArgumentChecks.ensureNonNull("baseCS", baseCS); ArgumentChecks.ensureNonNull("parameterized", parameterized); ArgumentChecks.ensureNonNull("derivedCS", derivedCS); final Context context = new Context(); context.setSource(baseCS); context.setTarget(derivedCS); return swapAndScaleAxes(parameterized, context); >>>>>>> ArgumentChecks.ensureNonNull("derivedCS", derivedCS); final Context context = new Context(); context.setSource(baseCRS); context.setTarget(derivedCS); return createParameterizedTransform(parameters, context); } /** * Creates a transform from a base to a derived CS using an existing parameterized transform. * The given {@code parameterized} transform shall expect * {@linkplain org.apache.sis.referencing.cs.AxesConvention#NORMALIZED normalized} input coordinates and * produce normalized output coordinates. * * @param baseCS The source coordinate system. * @param parameterized A <cite>base to derived</cite> transform for normalized input and output coordinates. * @param derivedCS The target coordinate system. * @return The transform from {@code baseCS} to {@code derivedCS}, including unit conversions and axis swapping. * @throws FactoryException if the object creation failed. This exception is thrown * if some required parameter has not been supplied, or has illegal value. * * @deprecated Replaced by {@link #swapAndScaleAxes(MathTransform, Context)}. */ @Deprecated public MathTransform createBaseToDerived(final CoordinateSystem baseCS, final MathTransform parameterized, final CoordinateSystem derivedCS) throws FactoryException { ArgumentChecks.ensureNonNull("baseCS", baseCS); ArgumentChecks.ensureNonNull("parameterized", parameterized); ArgumentChecks.ensureNonNull("derivedCS", derivedCS); final Context context = new Context(); context.setSource(baseCS); context.setTarget(derivedCS); return swapAndScaleAxes(parameterized, context);
<<<<<<< // Related to JDK7 import org.apache.sis.internal.jdk7.Objects; ======= // Branch-dependent imports import java.util.Objects; >>>>>>> // Branch-dependent imports import org.apache.sis.internal.jdk7.Objects;
<<<<<<< import org.opengis.annotation.UML; import org.opengis.util.CodeList; ======= import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; >>>>>>> import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; <<<<<<< @UML(identifier="phone", obligation=OPTIONAL, specification=ISO_19115) ======= @Override // @XmlElement at the end of this class. >>>>>>> // @XmlElement at the end of this class. @UML(identifier="phone", obligation=OPTIONAL, specification=ISO_19115) <<<<<<< final Collection<Telephone> phones = getPhones(); if (phones != null) { // May be null on marshalling. CodeList<?> ignored = null; for (final Telephone c : phones) { if (c instanceof DefaultTelephone) { String name; final CodeList<?> type = ((DefaultTelephone) c).numberType; if (type != null && ("VOICE".equals(name = type.name()) || "FACSIMILE".equals(name))) { if (phone == null) { phone = c; } } else if (ignored == null) { ignored = type; ======= if (FilterByVersion.LEGACY_METADATA.accept()) { final Collection<Telephone> phones = getPhones(); if (phones != null) { // May be null on marshalling. TelephoneType ignored = null; for (final Telephone c : phones) { final TelephoneType type = c.getNumberType(); if (TelephoneType.VOICE.equals(type) || TelephoneType.FACSIMILE.equals(type)) { if (phone == null) { phone = c; } } else if (ignored == null) { ignored = type; >>>>>>> if (FilterByVersion.LEGACY_METADATA.accept()) { final Collection<Telephone> phones = getPhones(); if (phones != null) { // May be null on marshalling. CodeList<?> ignored = null; for (final Telephone c : phones) { if (c instanceof DefaultTelephone) { String name; final CodeList<?> type = ((DefaultTelephone) c).numberType; if (type != null && ("VOICE".equals(name = type.name()) || "FACSIMILE".equals(name))) { if (phone == null) { phone = c; } } else if (ignored == null) { ignored = type; } <<<<<<< } if (ignored != null) { Context.warningOccured(Context.current(), DefaultContact.class, "getPhone", Messages.class, Messages.Keys.IgnoredPropertyAssociatedTo_1, ignored); ======= if (ignored != null) { Context.warningOccured(Context.current(), DefaultContact.class, "getPhone", Messages.class, Messages.Keys.IgnoredPropertyAssociatedTo_1, ignored.toString()); } >>>>>>> if (ignored != null) { Context.warningOccured(Context.current(), DefaultContact.class, "getPhone", Messages.class, Messages.Keys.IgnoredPropertyAssociatedTo_1, ignored); } <<<<<<< @UML(identifier="address", obligation=OPTIONAL, specification=ISO_19115) ======= @Override // @XmlElement at the end of this class. >>>>>>> // @XmlElement at the end of this class. @UML(identifier="address", obligation=OPTIONAL, specification=ISO_19115) <<<<<<< @UML(identifier="onlineResource", obligation=OPTIONAL, specification=ISO_19115) ======= @Override // @XmlElement at the end of this class. >>>>>>> // @XmlElement at the end of this class. @UML(identifier="onlineResource", obligation=OPTIONAL, specification=ISO_19115) <<<<<<< /// @XmlElement(name = "contactType") @UML(identifier="contactType", obligation=OPTIONAL, specification=ISO_19115) ======= @Override @XmlElement(name = "contactType") @XmlJavaTypeAdapter(InternationalStringAdapter.Since2014.class) >>>>>>> @XmlElement(name = "contactType") @XmlJavaTypeAdapter(InternationalStringAdapter.Since2014.class) @UML(identifier="contactType", obligation=OPTIONAL, specification=ISO_19115)
<<<<<<< ======= import org.opengis.geometry.TransfiniteSet; import org.opengis.geometry.complex.Complex; import org.opengis.referencing.crs.CoordinateReferenceSystem; import org.opengis.referencing.operation.MathTransform; >>>>>>>
<<<<<<< final SingleOperation operation, final int firstAffectedOrdinate, final int numTrailingOrdinates) ======= final CoordinateOperation operation, final int firstAffectedCoordinate, final int numTrailingCoordinates) >>>>>>> final SingleOperation operation, final int firstAffectedCoordinate, final int numTrailingCoordinates)
<<<<<<< ======= import org.apache.sis.internal.system.Modules; import org.apache.sis.math.DecimalFunctions; >>>>>>> import org.apache.sis.math.DecimalFunctions;
<<<<<<< return (PropertyAccessor) JDK8.compute(accessors, key, new BiFunction<CacheKey, Object, Object>() { @Override public Object apply(final CacheKey k, final Object v) { if (v instanceof PropertyAccessor) { return v; } final PropertyAccessor accessor; if (SpecialCases.isSpecialCase(type)) { accessor = new SpecialCases(citation, type, key.type); } else { accessor = new PropertyAccessor(citation, type, key.type); } return accessor; ======= return (PropertyAccessor) accessors.compute(key, (k, v) -> { if (v instanceof PropertyAccessor) { return v; } final Class<?> standardImpl = getImplementation(type); final PropertyAccessor accessor; if (SpecialCases.isSpecialCase(type)) { accessor = new SpecialCases(citation, type, k.type, standardImpl); } else { accessor = new PropertyAccessor(citation, type, k.type, standardImpl); >>>>>>> return (PropertyAccessor) JDK8.compute(accessors, key, new BiFunction<CacheKey, Object, Object>() { @Override public Object apply(final CacheKey k, final Object v) { if (v instanceof PropertyAccessor) { return v; } final Class<?> standardImpl = getImplementation(type); final PropertyAccessor accessor; if (SpecialCases.isSpecialCase(type)) { accessor = new SpecialCases(citation, type, k.type, standardImpl); } else { accessor = new PropertyAccessor(citation, type, k.type, standardImpl); } return accessor;
<<<<<<< import org.apache.sis.internal.jaxb.code.SV_CouplingType; ======= import org.opengis.metadata.identification.CoupledResource; import org.opengis.metadata.identification.CouplingType; import org.opengis.metadata.identification.OperationChainMetadata; import org.opengis.metadata.identification.OperationMetadata; import org.apache.sis.internal.jaxb.FilterByVersion; >>>>>>> import org.apache.sis.internal.jaxb.code.SV_CouplingType; import org.apache.sis.internal.jaxb.FilterByVersion; <<<<<<< @XmlElement(name = "serviceType", namespace = Namespaces.SRV, required = true) @UML(identifier="serviceType", obligation=MANDATORY, specification=ISO_19115) ======= @Override @XmlElement(name = "serviceType", required = true) >>>>>>> @XmlElement(name = "serviceType", required = true) @UML(identifier="serviceType", obligation=MANDATORY, specification=ISO_19115) <<<<<<< @XmlElement(name = "serviceTypeVersion", namespace = Namespaces.SRV) @UML(identifier="serviceTypeVersion", obligation=OPTIONAL, specification=ISO_19115) ======= @Override @XmlElement(name = "serviceTypeVersion") >>>>>>> @XmlElement(name = "serviceTypeVersion") @UML(identifier="serviceTypeVersion", obligation=OPTIONAL, specification=ISO_19115) <<<<<<< /// @XmlElement(name = "accessProperties", namespace = Namespaces.SRV) @UML(identifier="accessProperties", obligation=OPTIONAL, specification=ISO_19115) ======= @Override @XmlElement(name = "accessProperties") >>>>>>> @XmlElement(name = "accessProperties") @UML(identifier="accessProperties", obligation=OPTIONAL, specification=ISO_19115) <<<<<<< @XmlJavaTypeAdapter(SV_CouplingType.class) @XmlElement(name = "couplingType", namespace = Namespaces.SRV) @UML(identifier="couplingType", obligation=CONDITIONAL, specification=ISO_19115) public CodeList<?> getCouplingType() { ======= @Override @XmlElement(name = "couplingType") public CouplingType getCouplingType() { >>>>>>> @XmlJavaTypeAdapter(SV_CouplingType.class) @XmlElement(name = "couplingType") @UML(identifier="couplingType", obligation=CONDITIONAL, specification=ISO_19115) public CodeList<?> getCouplingType() { <<<<<<< @XmlElement(name = "coupledResource", namespace = Namespaces.SRV) @UML(identifier="coupledResource", obligation=CONDITIONAL, specification=ISO_19115) public Collection<DefaultCoupledResource> getCoupledResources() { return coupledResources = nonNullCollection(coupledResources, DefaultCoupledResource.class); ======= @Override @XmlElement(name = "coupledResource") public Collection<CoupledResource> getCoupledResources() { return coupledResources = nonNullCollection(coupledResources, CoupledResource.class); >>>>>>> @XmlElement(name = "coupledResource") @UML(identifier="coupledResource", obligation=CONDITIONAL, specification=ISO_19115) public Collection<DefaultCoupledResource> getCoupledResources() { return coupledResources = nonNullCollection(coupledResources, DefaultCoupledResource.class); <<<<<<< /// @XmlElement(name = "operatedDataset", namespace = Namespaces.SRV) @UML(identifier="operatedDataset", obligation=OPTIONAL, specification=ISO_19115) ======= @Override // @XmlElement at the end of this class. >>>>>>> // @XmlElement at the end of this class. @UML(identifier="operatedDataset", obligation=OPTIONAL, specification=ISO_19115) <<<<<<< /// @XmlElement(name = "profile", namespace = Namespaces.SRV) @UML(identifier="profile", obligation=OPTIONAL, specification=ISO_19115) ======= @Override // @XmlElement at the end of this class. >>>>>>> // @XmlElement at the end of this class. @UML(identifier="profile", obligation=OPTIONAL, specification=ISO_19115) <<<<<<< /// @XmlElement(name = "serviceStandard", namespace = Namespaces.SRV) @UML(identifier="serviceStandard", obligation=OPTIONAL, specification=ISO_19115) ======= @Override // @XmlElement at the end of this class. >>>>>>> // @XmlElement at the end of this class. @UML(identifier="serviceStandard", obligation=OPTIONAL, specification=ISO_19115) <<<<<<< @XmlElement(name = "containsOperations", namespace = Namespaces.SRV) @UML(identifier="containsOperations", obligation=OPTIONAL, specification=ISO_19115) public Collection<DefaultOperationMetadata> getContainsOperations() { return containsOperations = nonNullCollection(containsOperations, DefaultOperationMetadata.class); ======= @Override @XmlElement(name = "containsOperations") public Collection<OperationMetadata> getContainsOperations() { return containsOperations = nonNullCollection(containsOperations, OperationMetadata.class); >>>>>>> @XmlElement(name = "containsOperations") @UML(identifier="containsOperations", obligation=OPTIONAL, specification=ISO_19115) public Collection<DefaultOperationMetadata> getContainsOperations() { return containsOperations = nonNullCollection(containsOperations, DefaultOperationMetadata.class); <<<<<<< @XmlElement(name = "operatesOn", namespace = Namespaces.SRV) @UML(identifier="operatesOn", obligation=OPTIONAL, specification=ISO_19115) ======= @Override @XmlElement(name = "operatesOn") >>>>>>> @XmlElement(name = "operatesOn") @UML(identifier="operatesOn", obligation=OPTIONAL, specification=ISO_19115) <<<<<<< /// @XmlElement(name = "containsChain", namespace = Namespaces.SRV) @UML(identifier="containsChain", obligation=OPTIONAL, specification=ISO_19115) public Collection<DefaultOperationChainMetadata> getContainsChain() { return containsChain = nonNullCollection(containsChain, DefaultOperationChainMetadata.class); ======= @Override // @XmlElement at the end of this class. public Collection<OperationChainMetadata> getContainsChain() { return containsChain = nonNullCollection(containsChain, OperationChainMetadata.class); >>>>>>> // @XmlElement at the end of this class. @UML(identifier="containsChain", obligation=OPTIONAL, specification=ISO_19115) public Collection<DefaultOperationChainMetadata> getContainsChain() { return containsChain = nonNullCollection(containsChain, DefaultOperationChainMetadata.class);
<<<<<<< import java.time.Instant; import org.apache.sis.feature.AbstractFeature; import org.apache.sis.feature.AbstractIdentifiedType; import org.apache.sis.feature.DefaultAttributeType; import org.apache.sis.feature.DefaultFeatureType; import org.apache.sis.metadata.iso.identification.AbstractIdentification; ======= import org.opengis.feature.Feature; import org.opengis.feature.FeatureType; import org.opengis.feature.PropertyType; import org.opengis.feature.AttributeType; >>>>>>> import org.apache.sis.feature.AbstractFeature; import org.apache.sis.feature.AbstractIdentifiedType; import org.apache.sis.feature.DefaultAttributeType; import org.apache.sis.feature.DefaultFeatureType; import org.apache.sis.metadata.iso.identification.AbstractIdentification;
<<<<<<< new ImmutableIdentifier(HardCodedCitations.OGP, Constants.EPSG, Short.toString(code)))); return new DefaultParameterDescriptor<Double>(properties, 0, 1, Double.class, null, null, null); ======= new ImmutableIdentifier(HardCodedCitations.IOGP, Constants.EPSG, Short.toString(code)))); return new DefaultParameterDescriptor<>(properties, 0, 1, Double.class, null, null, null); >>>>>>> new ImmutableIdentifier(HardCodedCitations.IOGP, Constants.EPSG, Short.toString(code)))); return new DefaultParameterDescriptor<Double>(properties, 0, 1, Double.class, null, null, null);
<<<<<<< final DefaultLegalConstraints c = new DefaultLegalConstraints(); c.setUseConstraints(singleton(Restriction.LICENSE)); assertXmlEquals(xml, marshal(c), "xmlns:*"); /* * Unmarshall and ensure that we got back the original LICENCE code, not a new "LICENSE" code. */ final DefaultLegalConstraints actual = unmarshal(xml); assertSame(Restriction.LICENSE, getSingleton(actual.getUseConstraints())); ======= assertXmlEquals(xml, marshal(c, VERSION_2007), "xmlns:*"); actual = unmarshal(xml); assertSame(Restriction.LICENCE, getSingleton(actual.getUseConstraints())); >>>>>>> assertXmlEquals(xml, marshal(c, VERSION_2007), "xmlns:*"); actual = unmarshal(xml); assertSame(Restriction.LICENSE, getSingleton(actual.getUseConstraints()));
<<<<<<< ======= // Branch-dependent imports import org.opengis.feature.Property; import org.opengis.feature.PropertyType; import org.opengis.feature.PropertyNotFoundException; import org.opengis.feature.InvalidPropertyValueException; import org.opengis.feature.Attribute; import org.opengis.feature.AttributeType; import org.opengis.feature.Feature; import org.opengis.feature.FeatureType; import org.opengis.feature.FeatureAssociation; import org.opengis.feature.FeatureAssociationRole; import org.opengis.feature.Operation; >>>>>>> <<<<<<< public abstract Object getProperty(final String name) throws IllegalArgumentException; ======= @Override public abstract Property getProperty(final String name) throws PropertyNotFoundException; >>>>>>> public abstract Object getProperty(final String name) throws IllegalArgumentException; <<<<<<< @SuppressWarnings({"unchecked","rawtypes"}) final Property createProperty(final String name) throws IllegalArgumentException { final AbstractIdentifiedType pt = type.getProperty(name); if (pt instanceof DefaultAttributeType<?>) { return ((DefaultAttributeType<?>) pt).newInstance(); } else if (pt instanceof DefaultAssociationRole) { return ((DefaultAssociationRole) pt).newInstance(); ======= final Property createProperty(final String name) throws PropertyNotFoundException { final PropertyType pt = type.getProperty(name); if (pt instanceof AttributeType<?>) { return ((AttributeType<?>) pt).newInstance(); } else if (pt instanceof FeatureAssociationRole) { return ((FeatureAssociationRole) pt).newInstance(); >>>>>>> final Property createProperty(final String name) throws IllegalArgumentException { final AbstractIdentifiedType pt = type.getProperty(name); if (pt instanceof DefaultAttributeType<?>) { return ((DefaultAttributeType<?>) pt).newInstance(); } else if (pt instanceof DefaultAssociationRole) { return ((DefaultAssociationRole) pt).newInstance(); <<<<<<< final Object getDefaultValue(final String name) throws IllegalArgumentException { final AbstractIdentifiedType pt = type.getProperty(name); if (pt instanceof DefaultAttributeType<?>) { return getDefaultValue((DefaultAttributeType<?>) pt); } else if (pt instanceof DefaultAssociationRole) { ======= final Object getDefaultValue(final String name) throws PropertyNotFoundException { final PropertyType pt = type.getProperty(name); if (pt instanceof AttributeType<?>) { return getDefaultValue((AttributeType<?>) pt); } else if (pt instanceof FeatureAssociationRole) { >>>>>>> final Object getDefaultValue(final String name) throws IllegalArgumentException { final AbstractIdentifiedType pt = type.getProperty(name); if (pt instanceof DefaultAttributeType<?>) { return getDefaultValue((DefaultAttributeType<?>) pt); } else if (pt instanceof DefaultAssociationRole) { <<<<<<< public abstract Object getPropertyValue(final String name) throws IllegalArgumentException; ======= @Override public abstract Object getPropertyValue(final String name) throws PropertyNotFoundException; >>>>>>> public abstract Object getPropertyValue(final String name) throws IllegalArgumentException;
<<<<<<< DefaultCitation.class, "getGraphics", "graphics", "graphic", "Graphics", BrowseGraphic[].class, DefaultCitation.class, "getOnlineResources", "onlineResources", "onlineResource", "Online resources", OnlineResource[].class); ======= Citation.class, "getOnlineResources", "onlineResources", "onlineResource", "Online resources", OnlineResource[].class, Citation.class, "getGraphics", "graphics", "graphic", "Graphics", BrowseGraphic[].class); >>>>>>> DefaultCitation.class, "getOnlineResources", "onlineResources", "onlineResource", "Online resources", OnlineResource[].class, DefaultCitation.class, "getGraphics", "graphics", "graphic", "Graphics", BrowseGraphic[].class); <<<<<<< Identification.class, "getPointOfContacts", "pointOfContacts", "pointOfContact", "Point of contacts", ResponsibleParty[].class, ======= Identification.class, "getPointOfContacts", "pointOfContacts", "pointOfContact", "Point of contacts", Responsibility[].class, Identification.class, "getSpatialRepresentationTypes", "spatialRepresentationTypes", "spatialRepresentationType", "Spatial representation types", SpatialRepresentationType[].class, Identification.class, "getSpatialResolutions", "spatialResolutions", "spatialResolution", "Spatial resolutions", Resolution[].class, Identification.class, "getTemporalResolutions", "temporalResolutions", "temporalResolution", "Temporal resolutions", Duration[].class, Identification.class, "getTopicCategories", "topicCategories", "topicCategory", "Topic categories", TopicCategory[].class, Identification.class, "getExtents", "extents", "extent", "Extents", Extent[].class, Identification.class, "getAdditionalDocumentations", "additionalDocumentations", "additionalDocumentation", "Additional documentations", Citation[].class, Identification.class, "getProcessingLevel", "processingLevel", "processingLevel", "Processing level", Identifier.class, >>>>>>> Identification.class, "getPointOfContacts", "pointOfContacts", "pointOfContact", "Point of contacts", ResponsibleParty[].class, DataIdentification.class, "getSpatialRepresentationTypes", "spatialRepresentationTypes", "spatialRepresentationType", "Spatial representation types", SpatialRepresentationType[].class, DataIdentification.class, "getSpatialResolutions", "spatialResolutions", "spatialResolution", "Spatial resolutions", Resolution[].class, // Identification.class, "getTemporalResolutions", "temporalResolutions", "temporalResolution", "Temporal resolutions", Duration[].class, DataIdentification.class, "getTopicCategories", "topicCategories", "topicCategory", "Topic categories", TopicCategory[].class, DataIdentification.class, "getExtents", "extents", "extent", "Extents", Extent[].class, AbstractIdentification.class, "getAdditionalDocumentations", "additionalDocumentations", "additionalDocumentation", "Additional documentations", Citation[].class, AbstractIdentification.class, "getProcessingLevel", "processingLevel", "processingLevel", "Processing level", Identifier.class, <<<<<<< DataIdentification.class, "getSpatialRepresentationTypes", "spatialRepresentationTypes", "spatialRepresentationType", "Spatial representation types", SpatialRepresentationType[].class, DataIdentification.class, "getSpatialResolutions", "spatialResolutions", "spatialResolution", "Spatial resolutions", Resolution[].class, ======= Identification.class, "getAssociatedResources", "associatedResources", "associatedResource", "Associated resources", AssociatedResource[].class, >>>>>>> AbstractIdentification.class, "getAssociatedResources", "associatedResources", "associatedResource", "Associated resources", DefaultAssociatedResource[].class, <<<<<<< DataIdentification.class, "getCharacterSets", "characterSets", "characterSet", "Character sets", CharacterSet[].class, DataIdentification.class, "getTopicCategories", "topicCategories", "topicCategory", "Topic categories", TopicCategory[].class, ======= DataIdentification.class, "getCharacterSets", "characterSets", "characterSet", "Character sets", Charset[].class, >>>>>>> DataIdentification.class, "getCharacterSets", "characterSets", "characterSet", "Character sets", CharacterSet[].class, <<<<<<< DataIdentification.class, "getExtents", "extents", "extent", "Extents", Extent[].class, DataIdentification.class, "getSupplementalInformation", "supplementalInformation", "supplementalInformation", "Supplemental information", InternationalString.class, AbstractIdentification.class, "getAdditionalDocumentations", "additionalDocumentations", "additionalDocumentation", "Additional documentations", Citation[].class, AbstractIdentification.class, "getAssociatedResources", "associatedResources", "associatedResource", "Associated resources", DefaultAssociatedResource[].class, AbstractIdentification.class, "getProcessingLevel", "processingLevel", "processingLevel", "Processing level", Identifier.class); ======= DataIdentification.class, "getSupplementalInformation", "supplementalInformation", "supplementalInformation", "Supplemental information", InternationalString.class); >>>>>>> DataIdentification.class, "getSupplementalInformation", "supplementalInformation", "supplementalInformation", "Supplemental information", InternationalString.class);
<<<<<<< final AbstractFeature feature = types.wayPoint.newInstance(); feature.setPropertyValue("sis:identifier", index); feature.setPropertyValue("sis:geometry", types.geometries.createPoint(parseDouble(lon), parseDouble(lat))); ======= final Feature feature = types.wayPoint.newInstance(); feature.setPropertyValue(AttributeConvention.IDENTIFIER, index); feature.setPropertyValue(AttributeConvention.GEOMETRY, types.geometries.createPoint(parseDouble(lon), parseDouble(lat))); >>>>>>> final AbstractFeature feature = types.wayPoint.newInstance(); feature.setPropertyValue(AttributeConvention.IDENTIFIER, index); feature.setPropertyValue(AttributeConvention.GEOMETRY, types.geometries.createPoint(parseDouble(lon), parseDouble(lat))); <<<<<<< final AbstractFeature feature = ((Store) owner).types.route.newInstance(); feature.setPropertyValue("sis:identifier", index); List<AbstractFeature> wayPoints = null; ======= final Feature feature = ((Store) owner).types.route.newInstance(); feature.setPropertyValue(AttributeConvention.IDENTIFIER, index); List<Feature> wayPoints = null; >>>>>>> final AbstractFeature feature = ((Store) owner).types.route.newInstance(); feature.setPropertyValue(AttributeConvention.IDENTIFIER, index); List<AbstractFeature> wayPoints = null; <<<<<<< final AbstractFeature feature = ((Store) owner).types.trackSegment.newInstance(); feature.setPropertyValue("sis:identifier", index); List<AbstractFeature> wayPoints = null; ======= final Feature feature = ((Store) owner).types.trackSegment.newInstance(); feature.setPropertyValue(AttributeConvention.IDENTIFIER, index); List<Feature> wayPoints = null; >>>>>>> final AbstractFeature feature = ((Store) owner).types.trackSegment.newInstance(); feature.setPropertyValue(AttributeConvention.IDENTIFIER, index); List<AbstractFeature> wayPoints = null; <<<<<<< final AbstractFeature feature = ((Store) owner).types.track.newInstance(); feature.setPropertyValue("sis:identifier", index); List<AbstractFeature> segments = null; ======= final Feature feature = ((Store) owner).types.track.newInstance(); feature.setPropertyValue(AttributeConvention.IDENTIFIER, index); List<Feature> segments = null; >>>>>>> final AbstractFeature feature = ((Store) owner).types.track.newInstance(); feature.setPropertyValue(AttributeConvention.IDENTIFIER, index); List<AbstractFeature> segments = null;
<<<<<<< * Executes the parameterless operation of the given name and returns the value of its result. */ final Object getOperationValue(final String name) { final AbstractOperation operation = (AbstractOperation) type.getProperty(name); if (operation instanceof LinkOperation) { return getPropertyValue(((LinkOperation) operation).referentName); } final Object result = operation.apply(this, null); if (result instanceof AbstractAttribute<?>) { return getAttributeValue((AbstractAttribute<?>) result); } else if (result instanceof AbstractAssociation) { return getAssociationValue((AbstractAssociation) result); } else { return null; } } /** * Executes the parameterless operation of the given name and sets the value of its result. */ final void setOperationValue(final String name, final Object value) { final AbstractOperation operation = (AbstractOperation) type.getProperty(name); if (operation instanceof LinkOperation) { setPropertyValue(((LinkOperation) operation).referentName, value); } else { final Object result = operation.apply(this, null); if (result instanceof Property) { setPropertyValue((Property) result, value); } else { throw new IllegalStateException(Resources.format(Resources.Keys.CanNotSetPropertyValue_1, name)); } } } /** ======= >>>>>>>
<<<<<<< JSONObject visibilityJson = GraphUtil.updateVisibilityJson(null, visibilitySource, workspaceId); Visibility visibility = visibilityTranslator.toVisibility(visibilityJson); ======= LumifyVisibility lumifyVisibility = visibilityTranslator.toVisibility(visibilitySource); >>>>>>> JSONObject visibilityJson = GraphUtil.updateVisibilityJson(null, visibilitySource, workspaceId); LumifyVisibility lumifyVisibility = visibilityTranslator.toVisibility(visibilityJson);
<<<<<<< import org.apache.sis.internal.jdk8.Temporal; import org.apache.sis.storage.IllegalNameException; ======= import java.time.temporal.Temporal; >>>>>>> import org.apache.sis.internal.jdk8.Temporal;