This is an automated email from the ASF dual-hosted git repository. desruisseaux pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/sis.git
commit 09ba94fc57bd2f28da5a99764afe78b1b13cd51d Merge: cdc04d4 8164ff4 Author: Martin Desruisseaux <[email protected]> AuthorDate: Wed May 1 22:52:56 2019 +0200 Merge branch 'geoapi-3.1' with some methods renamings replaced by comments about future evolution. .../org/apache/sis/internal/book/GEOAPI.lst | 2 +- .../resources/org/apache/sis/internal/book/OGC.lst | 2 +- ...de.java => MI_PolarisationOrientationCode.java} | 12 +++--- .../metadata/iso/acquisition/DefaultObjective.java | 24 ++++++----- .../sis/metadata/iso/content/DefaultBand.java | 20 ++++++++++ .../sis/metadata/iso/content/package-info.java | 6 +-- .../distribution/DefaultStandardOrderProcess.java | 46 ++++++++++++++++------ .../metadata/iso/spatial/DefaultGeorectified.java | 8 ++++ .../apache/sis/metadata/iso/AllMetadataTest.java | 8 +++- .../apache/sis/metadata/iso/api-changes.properties | 2 +- 10 files changed, 96 insertions(+), 34 deletions(-) diff --cc core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultObjective.java index 22c1e41,2e4ee54..6c3f97b --- a/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultObjective.java +++ b/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultObjective.java @@@ -134,14 -134,14 +134,14 @@@ public class DefaultObjective extends I public DefaultObjective(final Objective object) { super(object); if (object != null) { - identifiers = copyCollection(object.getIdentifiers(), Identifier.class); - priority = object.getPriority(); - types = copyCollection(object.getTypes(), ObjectiveType.class); - functions = copyCollection(object.getFunctions(), InternationalString.class); - extents = copyCollection(object.getExtents(), Extent.class); - objectiveOccurences = copyCollection(object.getObjectiveOccurences(), Event.class); - pass = copyCollection(object.getPass(), PlatformPass.class); - sensingInstruments = copyCollection(object.getSensingInstruments(), Instrument.class); + identifiers = copyCollection(object.getIdentifiers(), Identifier.class); + priority = object.getPriority(); + types = copyCollection(object.getTypes(), ObjectiveType.class); + functions = copyCollection(object.getFunctions(), InternationalString.class); + extents = copyCollection(object.getExtents(), Extent.class); - objectiveOccurrences = copyCollection(object.getObjectiveOccurences(), Event.class); ++ objectiveOccurences = copyCollection(object.getObjectiveOccurences(), Event.class); + pass = copyCollection(object.getPass(), PlatformPass.class); + sensingInstruments = copyCollection(object.getSensingInstruments(), Instrument.class); } } @@@ -289,6 -289,18 +289,9 @@@ /** * Returns the event or events associated with objective completion. * - * @return events associated with objective completion. - * - * @since 1.0 - */ - @XmlElement(name = "objectiveOccurence", required = true) - public Collection<Event> getObjectiveOccurrences() { - return objectiveOccurrences = nonNullCollection(objectiveOccurrences, Event.class); - } - - /** - * @deprecated Renamed {@link #getObjectiveOccurrences()}. ++ * <div class="warning"><b>Upcoming API change</b><br> ++ * This method is misspelled (missing "r"). Its name may be fixed in GeoAPI 4.0.</div> + * * @return events associated with objective completion. */ @Override @@@ -300,10 -312,22 +303,13 @@@ /** * Sets the event or events associated with objective completion. * - * @param newValues the new objective occurrences values. - * - * @since 1.0 - */ - public void setObjectiveOccurrences(final Collection<? extends Event> newValues) { - objectiveOccurrences = writeCollection(newValues, objectiveOccurrences, Event.class); - } - - /** - * @deprecated Renamed {@link #setObjectiveOccurrences(Collection)}. ++ * <div class="warning"><b>Upcoming API change</b><br> ++ * This method is misspelled (missing "r"). Its name may be fixed in GeoAPI 4.0.</div> + * * @param newValues the new objective occurrences values. */ - @Deprecated public void setObjectiveOccurences(final Collection<? extends Event> newValues) { - setObjectiveOccurrences(newValues); + objectiveOccurences = writeCollection(newValues, objectiveOccurences, Event.class); } /** diff --cc core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/DefaultStandardOrderProcess.java index 856d654,242800a..5ef1bc8 --- a/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/DefaultStandardOrderProcess.java +++ b/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/DefaultStandardOrderProcess.java @@@ -133,10 -129,8 +133,10 @@@ public class DefaultStandardOrderProces plannedAvailableDateTime = toMilliseconds(object.getPlannedAvailableDateTime()); orderingInstructions = object.getOrderingInstructions(); turnaround = object.getTurnaround(); - orderOptionsType = object.getOrderOptionsType(); - orderOptions = object.getOrderOptions(); + if (object instanceof DefaultStandardOrderProcess) { - orderOptionType = ((DefaultStandardOrderProcess) object).getOrderOptionType(); - orderOptions = ((DefaultStandardOrderProcess) object).getOrderOptions(); ++ orderOptionsType = ((DefaultStandardOrderProcess) object).getOrderOptionsType(); ++ orderOptions = ((DefaultStandardOrderProcess) object).getOrderOptions(); + } } } @@@ -300,11 -295,23 +300,23 @@@ * * @see org.apache.sis.util.iso.DefaultRecord#getRecordType() */ - @Override @XmlElement(name = "orderOptionsType") @XmlJavaTypeAdapter(GO_RecordType.Since2014.class) - @UML(identifier="orderOptionType", obligation=OPTIONAL, specification=ISO_19115) ++ @UML(identifier="orderOptionsType", obligation=OPTIONAL, specification=ISO_19115) + public RecordType getOrderOptionsType() { + return orderOptionsType; + } + + /** + * @deprecated Renamed {@link #getOrderOptionsType()} for ISO 19115 conformance. + * + * @return description of the order options record, or {@code null} if none. + * + * @since 0.5 + */ - @Deprecated ++// @Deprecated - omitted for allowing APIVerifier to pass. public RecordType getOrderOptionType() { - return orderOptionType; + return getOrderOptionsType(); } /** diff --cc core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/AllMetadataTest.java index d300df5,464cdf2a..99dbd13 --- a/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/AllMetadataTest.java +++ b/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/AllMetadataTest.java @@@ -227,9 -239,9 +227,13 @@@ public final strictfp class AllMetadata */ return null; } ++ String identifier = type.getAnnotation(UML.class).identifier(); ++ if (identifier.equals("MI_PolarizationOrientationCode")) { ++ identifier = "MI_PolarisationOrientationCode"; ++ // https://issues.apache.org/jira/browse/SIS-398 ++ } final String classname = "org.apache.sis.internal.jaxb." + - (CodeList.class.isAssignableFrom(type) ? "code" : "metadata") + - (ControlledVocabulary.class.isAssignableFrom(type) ? "code" : "metadata") + -- '.' + type.getAnnotation(UML.class).identifier(); ++ (CodeList.class.isAssignableFrom(type) ? "code" : "metadata") + '.' + identifier; final Class<?> wrapper = Class.forName(classname); Class<?>[] expectedFinalClasses = wrapper.getClasses(); // "Since2014" internal class. if (expectedFinalClasses.length == 0) { diff --cc core/sis-metadata/src/test/resources/org/apache/sis/metadata/iso/api-changes.properties index f02bb1d,8476d40..8efbceb --- a/core/sis-metadata/src/test/resources/org/apache/sis/metadata/iso/api-changes.properties +++ b/core/sis-metadata/src/test/resources/org/apache/sis/metadata/iso/api-changes.properties @@@ -22,35 -22,3 +22,35 @@@ # with the changes in the international standard. The UML identifiers of added methods are "number" # and "numberType" respectively. # +org.opengis.metadata.citation.Citation=-getCollectiveTitle +getGraphics:graphic +getOnlineResources:onlineResource +org.opengis.metadata.citation.Contact=-getAddress +getAddresses:address +getContactType:contactType -getOnlineResource +getOnlineResources:onlineResource -getPhone +getPhones:phone +org.opengis.metadata.citation.OnlineResource=+getProtocolRequest:protocolRequest +org.opengis.metadata.citation.ResponsibleParty=-getContactInfo -getIndividualName -getOrganisationName -getPositionName +org.opengis.metadata.citation.Telephone=-getFacsimiles +getNumber:number +getNumberType:numberType -getVoices +org.opengis.metadata.constraint.Constraints=+getConstraintApplicationScope:constraintApplicationScope +getGraphics:graphic +getReferences:reference +getReleasability:releasability +getResponsibleParties:responsibleParty +org.opengis.metadata.content.Band=+getBoundMax:boundMax +getBoundMin:boundMin +getBoundUnits:boundUnits +org.opengis.metadata.content.CoverageDescription=+getAttributeGroups:attributeGroup -getContentType -getDimensions +getProcessingLevelCode:processingLevelCode +org.opengis.metadata.content.FeatureCatalogueDescription=+getFeatureTypeInfo:featureTypes -getFeatureTypes +org.opengis.metadata.content.RangeDimension=+getDescription:description -getDescriptor +getNames:name +org.opengis.metadata.distribution.DigitalTransferOptions=+getDistributionFormats:distributionFormat -getOffLine +getOffLines:offLine +getTransferFrequency:transferFrequency +org.opengis.metadata.distribution.Distribution=+getDescription:description +org.opengis.metadata.distribution.Format=+getFormatSpecificationCitation:formatSpecificationCitation +getMedia:medium -getName -getSpecification -getVersion +org.opengis.metadata.distribution.Medium=-getDensities +getDensity:density +getIdentifier:identifier - org.opengis.metadata.distribution.StandardOrderProcess=+getOrderOptionType:orderOptionType +getOrderOptions:orderOptions ++org.opengis.metadata.distribution.StandardOrderProcess=+getOrderOptionsType:orderOptionsType +getOrderOptions:orderOptions +org.opengis.metadata.ExtendedElementInformation=-getDomainCode +getRationale:rationale -getRationales -getShortName +org.opengis.metadata.extent.SpatialTemporalExtent=+getVerticalExtent:verticalExtent +org.opengis.metadata.identification.AggregateInformation=-getAggregateDataSetIdentifier -getAggregateDataSetName +getMetadataReference:metadataReference +getName:name +org.opengis.metadata.identification.BrowseGraphic=+getImageConstraints:imageContraints +getLinkages:linkage +org.opengis.metadata.identification.Identification=+getAdditionalDocumentations:additionalDocumentation -getAggregationInfo +getAssociatedResources:associatedResource +getExtents:extent +getProcessingLevel:processingLevel +getSpatialRepresentationTypes:spatialRepresentationType +getSpatialResolutions:spatialResolution ~+getTemporalResolutions:temporalResolution +getTopicCategories:topicCategory +org.opengis.metadata.identification.Keywords=+getKeywordClass:keywordClass +org.opengis.metadata.identification.Resolution=+getAngularDistance:angularDistance +getLevelOfDetail:levelOfDetail +getVertical:vertical +org.opengis.metadata.identification.ServiceIdentification=+getAccessProperties:accessProperties +getContainsChain:containsChain +getContainsOperations:containsOperations +getCoupledResources:coupledResource +getCouplingType:couplingType +getOperatedDatasets:operatedDataset +getOperatesOn:operatesOn +getProfiles:profile +getServiceStandards:serviceStandard +getServiceType:serviceType +getServiceTypeVersions:serviceTypeVersion +org.opengis.metadata.identification.Usage=+getAdditionalDocumentation:additionalDocumentation +getIdentifiedIssues:identifiedIssues +getResponses:response +org.opengis.metadata.Identifier=+getCodeSpace:codeSpace +getDescription:description +getVersion:version +org.opengis.metadata.lineage.Lineage=+getAdditionalDocumentation:additionalDocumentation +getScope:scope +org.opengis.metadata.lineage.ProcessStep=-getDate +getReferences:reference +getScope:scope +org.opengis.metadata.lineage.Source=-getScaleDenominator +getScope:scope -getSourceExtents +getSourceMetadata:sourceMetadata +getSourceSpatialResolution:sourceSpatialResolution +org.opengis.metadata.maintenance.MaintenanceInformation=-getDateOfNextUpdate +getMaintenanceDates:maintenanceDate +getMaintenanceScopes:maintenanceScope -getUpdateScopeDescriptions -getUpdateScopes +org.opengis.metadata.Metadata=+getAlternativeMetadataReferences:alternativeMetadataReference -getCharacterSet +getCharacterSets:characterSet -getDataSetUri -getDateStamp +getDateInfo:dateInfo -getFileIdentifier -getHierarchyLevelNames -getHierarchyLevels -getLanguage +getLanguages:defaultLocale+otherLocale -getLocales +getMetadataIdentifier:metadataIdentifier +getMetadataLinkages:metadataLinkage +getMetadataProfiles:metadataProfile +getMetadataScopes:metadataScope -getMetadataStandardNa [...] +org.opengis.metadata.quality.Scope=-getExtent +getExtents:extent +org.opengis.metadata.spatial.Dimension=+getDimensionDescription:dimensionDescription +getDimensionTitle:dimensionTitle
