public class TermFactory extends Object
Modifier and Type | Method and Description |
---|---|
Term |
findClassTerm(String termName)
This method works just as findTerm(final String termName) but restricts
the results to just class terms.
|
Term |
findPropertyTerm(String termName)
This method works just as findTerm(final String termName) but restricts
the results to just property terms.
|
Term |
findTerm(String termName)
This is the main method to get a term from the factory searching both for property or class terms.
|
Term |
findTerm(String termName,
boolean isClassTerm)
This method works just as findTerm(final String termName) but restricts
the results to just property or class terms.
|
static TermFactory |
instance() |
Set<Class<? extends Enum>> |
listRegisteredTermEnums() |
static String |
normaliseTerm(String term) |
<T extends Enum & Term> |
registerQualifiedTermEnum(Class<T> termClass)
Registers all terms from a new term enumeration, but only adds their qualified and prefixed names.
|
void |
registerTerm(Term term) |
void |
registerTerm(UnknownTerm term) |
<T extends Enum & Term & AlternativeNames> |
registerTermEnum(Class<T> termClass,
String... altPrefixes)
Registers all terms from a term enumeration.
|
public static TermFactory instance()
public Set<Class<? extends Enum>> listRegisteredTermEnums()
public void registerTerm(Term term)
public void registerTerm(UnknownTerm term)
public <T extends Enum & Term & AlternativeNames> void registerTermEnum(Class<T> termClass, String... altPrefixes)
altPrefixes
- alternative prefixes to be used to register simple prefixed term namespublic <T extends Enum & Term> void registerQualifiedTermEnum(Class<T> termClass)
public static String normaliseTerm(String term)
public Term findTerm(String termName) throws IllegalArgumentException
IllegalArgumentException
public Term findPropertyTerm(String termName) throws IllegalArgumentException
IllegalArgumentException
public Term findClassTerm(String termName) throws IllegalArgumentException
IllegalArgumentException
public Term findTerm(String termName, boolean isClassTerm) throws IllegalArgumentException
IllegalArgumentException
Copyright © 2024 Global Biodiversity Information Facility. All rights reserved.