| Modifier and Type | Class and Description |
|---|---|
| private static record | DOI.
Result of locating a DOI inside a text: the parsed DOI string plus the
matched region (which may include a URL or |
| Modifier and Type | Field and Description |
|---|---|
| public static final URI | |
| private static final String | |
| private final String | |
| private static final String | |
| private static final String | |
| private static final Pattern | |
| private static final Pattern | |
| private static final Pattern | |
| private static final String | |
| private static final Pattern | |
| private static final String | |
| private static final Pattern | |
| private static final Pattern | |
| private static final String | |
| private static final String | |
| private boolean | |
| private static final Logger | |
| public static final URI | |
| private static final String | |
| private static final String | |
| private static final String | |
| private static final String |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public String | Returns: the plain DOI/Short DOI value.Implements org. Return the plain DOI/Short DOI |
| public boolean | |
| public static Optional | Returns: an Optional containing the DOI or an empty Optionalthe text which might contain a DOI/Short DOI text)Tries to find a DOI/Short DOI inside the given text. |
| private static Optional | findInTextInternal(String
text that has already been passed through text)removeReplacementCharacters
|
| private static Optional | |
| public Field | |
| public Optional | Returns: an encoded URI representation of the DOI/Short DOIImplements org. Return a URI presentation for the DOI/Short DOI Todo Bad design, because Optional is used for Exception handling. |
| public Optional | |
| public Optional | |
| public String | Returns: an encoded URL representation of the DOI/Short DOI. Empty string in the case of an error.Return an ASCII URL presentation for the DOI/Short DOI |
| public int | |
| public boolean | Returns: true if DOI is short DOI, false otherwiseDetermines whether DOI is short DOI or not |
| public static boolean | |
| public static Optional | |
| private static String | |
| public static String | Returns: the text with the first DOI occurrence replacedthe text which might contain a DOI/Short DOI text, String the string to put in place of the matched DOI replacement)Replaces the first DOI/Short DOI found in the text with the given replacement. |
| public String |
| AGENCY_RESOLVER | back to summary |
|---|---|
| public static final URI AGENCY_RESOLVER | |
| CHARS_TO_REMOVE | back to summary |
|---|---|
| private static final String CHARS_TO_REMOVE | |
| doi | back to summary |
|---|---|
| private final String doi | |
| DOI_EXP | back to summary |
|---|---|
| private static final String DOI_EXP | |
| DOI_GROUP | back to summary |
|---|---|
| private static final String DOI_GROUP | |
| EXACT_DOI_PATT | back to summary |
|---|---|
| private static final Pattern EXACT_DOI_PATT | |
| EXACT_SHORT_DOI_PATT | back to summary |
|---|---|
| private static final Pattern EXACT_SHORT_DOI_PATT | |
| EXACT_SHORT_DOI_SHORTCUT | back to summary |
|---|---|
| private static final Pattern EXACT_SHORT_DOI_SHORTCUT | |
| FIND_DOI_EXP | back to summary |
|---|---|
| private static final String FIND_DOI_EXP | |
| FIND_DOI_PATT | back to summary |
|---|---|
| private static final Pattern FIND_DOI_PATT | |
| FIND_SHORT_DOI_EXP | back to summary |
|---|---|
| private static final String FIND_SHORT_DOI_EXP | |
| FIND_SHORT_DOI_PATT | back to summary |
|---|---|
| private static final Pattern FIND_SHORT_DOI_PATT | |
| FIND_SHORT_DOI_SHORTCUT | back to summary |
|---|---|
| private static final Pattern FIND_SHORT_DOI_SHORTCUT | |
| HTTP_EXP | back to summary |
|---|---|
| private static final String HTTP_EXP | |
| IN_TEXT_SHORT_DOI_SHORTCUT | back to summary |
|---|---|
| private static final String IN_TEXT_SHORT_DOI_SHORTCUT | |
| isShortDoi | back to summary |
|---|---|
| private boolean isShortDoi | |
| LOGGER | back to summary |
|---|---|
| private static final Logger LOGGER | |
| RESOLVER | back to summary |
|---|---|
| public static final URI RESOLVER | |
| SHORT_DOI_EXP | back to summary |
|---|---|
| private static final String SHORT_DOI_EXP | |
| SHORT_DOI_EXP_PREFIX | back to summary |
|---|---|
| private static final String SHORT_DOI_EXP_PREFIX | |
| SHORT_DOI_HTTP_EXP | back to summary |
|---|---|
| private static final String SHORT_DOI_HTTP_EXP | |
| SHORT_DOI_SHORTCUT | back to summary |
|---|---|
| private static final String SHORT_DOI_SHORTCUT | |
| DOI | back to summary |
|---|---|
| public DOI(String doi) Creates a DOI from various schemes including URL, URN, and plain DOIs/Short DOIs.
| |
| asString | back to summary |
|---|---|
| public String asString() Implements org. Return the plain DOI/Short DOI | |
| equals | back to summary |
|---|---|
| public boolean equals(@Nullable Object o) Overrides java. DOIs are case-insensitive. Thus, 10.1109/cloud.2017.89 equals 10.1109/CLOUD.2017.89
| |
| findInText | back to summary |
|---|---|
| public static Optional Tries to find a DOI/Short DOI inside the given text. | |
| findInTextInternal | back to summary |
|---|---|
private static Optional
| |
| firstMatch | back to summary |
|---|---|
| private static Optional | |
| getDefaultField | back to summary |
|---|---|
| public Field getDefaultField() Implements org.
| |
| getExternalURI | back to summary |
|---|---|
| public Optional Implements org. Return a URI presentation for the DOI/Short DOI Todo Bad design, because Optional is used for Exception handling. Should be rewritten to throw a malformed URL exception. | |
| getExternalURIFromBase | back to summary |
|---|---|
| public Optional | |
| getExternalURIWithCustomBase | back to summary |
|---|---|
| public Optional | |
| getURIAsASCIIString | back to summary |
|---|---|
| public String getURIAsASCIIString() Return an ASCII URL presentation for the DOI/Short DOI
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| isShortDoi | back to summary |
|---|---|
| public boolean isShortDoi() Determines whether DOI is short DOI or not
| |
| isValid | back to summary |
|---|---|
| public static boolean isValid(String doi) Determines whether a DOI/Short DOI is valid or not
| |
| parse | back to summary |
|---|---|
| public static Optional Creates an Useful for suppressing the IllegalArgumentException
of the constructor and checking for | |
| removeReplacementCharacters | back to summary |
|---|---|
| private static String removeReplacementCharacters(String text) | |
| replaceInText | back to summary |
|---|---|
| public static String replaceInText(String text, String replacement) Replaces the first DOI/Short DOI found in the text with the given
replacement. The replaced region includes any URL or This reuses the same matching as | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non-
| |
doi: prefix).
| Modifier and Type | Field and Description |
|---|---|
| private final String | |
| private final int | |
| private final int |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public String | |
| public int | |
| public final boolean | equals(Object o)
Implements abstract java. Indicates whether some other object is "equal to" this one. |
| public final int | |
| public int | |
| public final String | toString()
Implements abstract java. Returns a string representation of the record. |
| doi | back to summary |
|---|---|
| private final String doi Record Component accessed by doi(). | |
| end | back to summary |
|---|---|
| private final int end Record Component accessed by end(). | |
| start | back to summary |
|---|---|
| private final int start Record Component accessed by start(). | |
| DoiTextMatch | back to summary |
|---|---|
| private DoiTextMatch(String doi, int start, int end) | |
| doi | back to summary |
|---|---|
| public String doi() Record Component getter of doi. | |
| end | back to summary |
|---|---|
| public int end() Record Component getter of end. | |
| equals | back to summary |
|---|---|
| public final boolean equals(Object o) Implements abstract java. Doc from java. Indicates whether some other object is "equal to" this one. In addition
to the general contract of
R copy = new R(r.c1(), r.c2(), ..., r.cn());
then it must be the case that r.equals(copy).
| |
| hashCode | back to summary |
|---|---|
| public final int hashCode() Implements abstract java. Doc from java. Returns a hash code value for the record.
Obeys the general contract of | |
| start | back to summary |
|---|---|
| public int start() Record Component getter of start. | |
| toString | back to summary |
|---|---|
| public final String toString() Implements abstract java. Doc from java. Returns a string representation of the record.
In accordance with the general contract of In addition to this general contract, record classes must further participate in the invariant that any two records which are equal must produce equal strings. This invariant is necessarily relaxed in the rare case where corresponding equal component values might fail to produce equal strings for themselves. | |