public enum License extends Enum<License>
Enum Constant and Description |
---|
CC_BY_4_0
Creative Commons Attribution version 4.0.
|
CC_BY_NC_4_0
Creative Commons Attribution-NonCommercial version 4.0.
|
CC0_1_0
Creative Commons Zero / Public Domain version 1.0.
|
UNSPECIFIED
No license has been specified.
|
UNSUPPORTED
A license not supported by GBIF.
|
Modifier and Type | Method and Description |
---|---|
static Optional<License> |
fromLicenseUrl(String licenseUrl)
Lookup a License by either its a) legal code URL or b) human readable summary URL, with HTTP or HTTPS.
|
static Optional<License> |
fromString(String license)
Get an
License from its name as String. |
String |
getLicenseTitle() |
String |
getLicenseUrl() |
static License |
getMostRestrictive(License license1,
License license2,
License fallback)
Get the most restrictive license between the 2 provided licenses.
|
boolean |
isConcrete()
Indicates if a license is a concrete license (true) or an abstracted license (false) like
UNSPECIFIED or UNSUPPORTED.
|
static License |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static License[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final License CC0_1_0
public static final License CC_BY_4_0
public static final License CC_BY_NC_4_0
public static final License UNSPECIFIED
public static final License UNSUPPORTED
public static License[] values()
for (License c : License.values()) System.out.println(c);
public static License valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic static Optional<License> fromString(String license)
License
from its name as String.public static Optional<License> fromLicenseUrl(String licenseUrl)
licenseUrl
- the case insensitive URL for the license.public static License getMostRestrictive(License license1, License license2, License fallback)
fallback
- License to return if one or the two licenses are null or not concretepublic String getLicenseUrl()
public String getLicenseTitle()
public boolean isConcrete()
Copyright © 2024 Global Biodiversity Information Facility (GBIF). All rights reserved.