org.opengis.cite.ogcapitiles10.conformance.RequirementClass Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ets-ogcapi-tiles10 Show documentation
Show all versions of ets-ogcapi-tiles10 Show documentation
Describe purpose of test suite.
package org.opengis.cite.ogcapitiles10.conformance;
/**
* Updated at the OGC API - Tiles Sprint 2020 by ghobona
*
* Encapsulates all known requirement classes.
*
* @author Lyn Goltz
*/
public enum RequirementClass {
CORE("http://www.opengis.net/spec/ogcapi-tiles-1/1.0/conf/core"),
DATASET_TILES("http://www.opengis.net/spec/ogcapi-tiles-1/1.0/conf/dataset-tilesets"),
GEODATA_TILESETS("http://www.opengis.net/spec/ogcapi-tiles-1/1.0/conf/geodata-tilesets"),
TILESETS_LIST("http://www.opengis.net/spec/ogcapi-tiles-1/1.0/conf/tilesets-list");
private final String conformanceClass;
private final String mediaTypeFeaturesAndCollections;
private final String mediaTypeOtherResources;
RequirementClass(String conformanceClass) {
this(conformanceClass, null, null);
}
RequirementClass(String conformanceClass, String mediaTypeFeaturesAndCollections, String mediaTypeOtherResources) {
this.conformanceClass = conformanceClass;
this.mediaTypeFeaturesAndCollections = mediaTypeFeaturesAndCollections;
this.mediaTypeOtherResources = mediaTypeOtherResources;
}
/**
* @return true
if the RequirementClass has a media type for features and
* collections, true
otherwise
*/
public boolean hasMediaTypeForFeaturesAndCollections() {
return mediaTypeFeaturesAndCollections != null;
}
/**
* @return media type for features and collections, null
if not available
*/
public String getMediaTypeFeaturesAndCollections() {
return mediaTypeFeaturesAndCollections;
}
/**
* @return true
if the RequirementClass has a media type for other
* resources, true
otherwise
*/
public boolean hasMediaTypeForOtherResources() {
return mediaTypeOtherResources != null;
}
/**
* @return media type of other resources, null
if not available
*/
public String getMediaTypeOtherResources() {
return mediaTypeOtherResources;
}
/**
* @param conformanceClass the conformance class of the RequirementClass to return.
* @return the RequirementClass with the passed conformance class, null
* if RequirementClass exists
*/
public static RequirementClass byConformanceClass(String conformanceClass) {
for (RequirementClass requirementClass : values()) {
if (requirementClass.conformanceClass.equals(conformanceClass))
return requirementClass;
}
return null;
}
public String getConformanceClass() {
return this.conformanceClass;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy