public interface HasAnnotationValue
Modifier and Type | Method and Description |
---|---|
OWLAnnotationValue |
annotationValue() |
default Optional<OWLAnonymousIndividual> |
anonymousIndividualValue() |
default void |
ifAnonymousIndividual(Consumer<OWLAnonymousIndividual> anonConsumer) |
default void |
ifAnonymousIndividualOrElse(Consumer<OWLAnonymousIndividual> anonConsumer,
Runnable elseAction) |
default void |
ifIri(Consumer<IRI> iriConsumer) |
default void |
ifIriOrElse(Consumer<IRI> iriConsumer,
Runnable elseAction) |
default void |
ifLiteral(Consumer<OWLLiteral> literalConsumer) |
default void |
ifLiteralOrElse(Consumer<OWLLiteral> literalConsumer,
Runnable elseAction) |
default void |
ifValue(Consumer<OWLLiteral> literalConsumer,
Consumer<IRI> iriConsumer,
Consumer<OWLAnonymousIndividual> anonConsumer) |
default Optional<IRI> |
iriValue() |
default Optional<OWLLiteral> |
literalValue() |
default <T extends OWLAnnotationValue,O> |
map(Class<T> witness,
Predicate<T> p,
Function<T,O> f,
O defaultValue)
Apply the function if and only if the annotation value is of the specified type and the
predicate evaluates to true; the default value is returned if the predicate does not match or
the type does not match.
|
default <T extends OWLAnnotationValue,O> |
map(Class<T> witness,
Predicate<T> p,
Function<T,O> f,
Supplier<O> s)
Apply the function if and only if the annotation value is of the specified type and the
predicate evaluates to true; the alternative supplier is executed if the predicate does not
match or the type does not match (only once if both conditions do not match).
|
default <T> Optional<T> |
mapAnonymousIndividual(Function<OWLAnonymousIndividual,T> function) |
default <T> T |
mapAnonymousIndividualOrElse(Function<OWLAnonymousIndividual,T> function,
T defaultValue) |
default <T> T |
mapAnonymousIndividualOrElseGet(Function<OWLAnonymousIndividual,T> function,
Supplier<T> defaultValue) |
default <T> Optional<T> |
mapIri(Function<IRI,T> function) |
default <T> T |
mapIriOrElse(Function<IRI,T> function,
T defaultValue) |
default <T> T |
mapIriOrElseGet(Function<IRI,T> function,
Supplier<T> defaultValue) |
default <T> Optional<T> |
mapLiteral(Function<OWLLiteral,T> function) |
default <T> T |
mapLiteralOrElse(Function<OWLLiteral,T> function,
T defaultValue) |
default <T> T |
mapLiteralOrElseGet(Function<OWLLiteral,T> function,
Supplier<T> defaultValue) |
default <T> Optional<T> |
mapValue(Function<OWLLiteral,T> literalFunction,
Function<IRI,T> iriFunction,
Function<OWLAnonymousIndividual,T> anonFunction) |
default <T extends OWLAnnotationValue> |
when(Class<T> witness,
Predicate<T> p,
Consumer<T> c,
Runnable r)
Execute the consumer if and only if the annotation value is of the specified type and the
predicate evaluates to true; the alternative runnable is executed if the predicate does not
match or the type does not match (only once if both conditions do not match).
|
default Optional<OWLLiteral> literalValue()
default Optional<OWLAnonymousIndividual> anonymousIndividualValue()
OWLAnnotationValue annotationValue()
default <T extends OWLAnnotationValue> void when(Class<T> witness, Predicate<T> p, Consumer<T> c, Runnable r)
T
- type of inputwitness
- class for which predicate and consumer should be executedp
- predicate to testc
- consumer to applyr
- runnable to execute if the predicate does not match or the annotation type does not
matchdefault <T extends OWLAnnotationValue,O> O map(Class<T> witness, Predicate<T> p, Function<T,O> f, Supplier<O> s)
T
- type to matchO
- return typewitness
- class for which predicate and function should be executedp
- predicate to testf
- function to applys
- supplier to execute if the predicate does not match or the annotation type does not
matchdefault <T extends OWLAnnotationValue,O> O map(Class<T> witness, Predicate<T> p, Function<T,O> f, O defaultValue)
T
- type to matchO
- return typewitness
- class for which predicate and function should be executedp
- predicate to testf
- function to applydefaultValue
- default value to return if the predicate does not match or the annotation
type does not matchdefault void ifLiteral(Consumer<OWLLiteral> literalConsumer)
literalConsumer
- consumer to run if the value is a literaldefault void ifLiteralOrElse(Consumer<OWLLiteral> literalConsumer, Runnable elseAction)
literalConsumer
- consumer to run if the value is a literalelseAction
- runnable to run if the value iS not a literaldefault void ifIri(Consumer<IRI> iriConsumer)
iriConsumer
- consumer to run if the value is an IRIdefault void ifIriOrElse(Consumer<IRI> iriConsumer, Runnable elseAction)
iriConsumer
- consumer to run if the value is an IRIelseAction
- runnable to run if the value is not an IRIdefault void ifAnonymousIndividual(Consumer<OWLAnonymousIndividual> anonConsumer)
anonConsumer
- consumer to run if the value is an anonymous individualdefault void ifAnonymousIndividualOrElse(Consumer<OWLAnonymousIndividual> anonConsumer, Runnable elseAction)
anonConsumer
- consumer to run if the value is an anonymous individualelseAction
- runnable to run if the value is not an anonymous individualdefault <T> Optional<T> mapLiteral(Function<OWLLiteral,T> function)
T
- returned typefunction
- function to run if the value is a literaldefault <T> T mapLiteralOrElse(Function<OWLLiteral,T> function, T defaultValue)
T
- returned typefunction
- function to run if the value is a literaldefaultValue
- value returned if the value if not a literaldefault <T> T mapLiteralOrElseGet(Function<OWLLiteral,T> function, Supplier<T> defaultValue)
T
- returned typefunction
- function to run if the value is a literaldefaultValue
- supplier to run if the value is not a literaldefault <T> Optional<T> mapIri(Function<IRI,T> function)
T
- returned typefunction
- function to run if the value is an IRIdefault <T> T mapIriOrElse(Function<IRI,T> function, T defaultValue)
T
- return typefunction
- function to run if the value is an IRIdefaultValue
- default value to return if the value is not an IRIdefault <T> T mapIriOrElseGet(Function<IRI,T> function, Supplier<T> defaultValue)
T
- returned typefunction
- function to run if the value is an IRIdefaultValue
- supplier to run if the value is not an IRIdefault <T> Optional<T> mapAnonymousIndividual(Function<OWLAnonymousIndividual,T> function)
T
- returned typefunction
- function to run if the value is an anonymous individualdefault <T> T mapAnonymousIndividualOrElse(Function<OWLAnonymousIndividual,T> function, T defaultValue)
T
- returned typefunction
- function to run if the value is an anonymous individualdefaultValue
- default value to if the value is not an anonymous individualdefault <T> T mapAnonymousIndividualOrElseGet(Function<OWLAnonymousIndividual,T> function, Supplier<T> defaultValue)
T
- returned typefunction
- function to run if the value is an anonymous individualdefaultValue
- supplier to run if the value is not an anonymous individualdefault void ifValue(Consumer<OWLLiteral> literalConsumer, Consumer<IRI> iriConsumer, Consumer<OWLAnonymousIndividual> anonConsumer)
literalConsumer
- consumer to run for literalsiriConsumer
- consumer to run for IRIsanonConsumer
- consumer to run for anonymous individualsdefault <T> Optional<T> mapValue(Function<OWLLiteral,T> literalFunction, Function<IRI,T> iriFunction, Function<OWLAnonymousIndividual,T> anonFunction)
T
- returned typeliteralFunction
- function to run for literalsiriFunction
- function to run for IRIsanonFunction
- function to run for anonymous individualsCopyright © 2020 The University of Manchester. All rights reserved.