Class EnumVocab<P extends Enum<P>>
java.lang.Object
com.adobe.epubcheck.vocab.EnumVocab<P>
- All Implemented Interfaces:
Vocab
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new vocabulary backed by the givenEnumclass and with properties having the common URI stembase.Creates a new vocabulary backed by the givenEnumclass and with properties having the common URI stembaseand prefixprefixCreates a new vocabulary backed by the givenEnumclass and with properties having the common URI stembase.Creates a new vocabulary backed by the givenEnumclass and with properties having the common URI stembaseand prefixprefix -
Method Summary
Modifier and TypeMethodDescriptionReturns thePropertyfor the given enum item contained in this vocabulary.Returns the property name for the given enum item contained in this vocabulary.getNames(Collection<P> properties) Returns the property names of the given enum items contained in this vocabulary.getURI()Returns the base URI of this vocabulary.com.google.common.base.Optional<Property> Returns whether a property in allowed in this vocabulary.
-
Field Details
-
index
-
uri
-
converter
-
-
Constructor Details
-
EnumVocab
Creates a new vocabulary backed by the givenEnumclass and with properties having the common URI stembase. Properties of the created vocabulary will have an empty prefix (in other words, this creates a default vocabulary).- Parameters:
clazz- the enumeration backing this vocabulary.base- the common stem URI of properties in this vocabulary.
-
EnumVocab
Creates a new vocabulary backed by the givenEnumclass and with properties having the common URI stembase. Properties of the created vocabulary will have an empty prefix (in other words, this creates a default vocabulary).- Parameters:
clazz- the enumeration backing this vocabulary.format- the case format used by properties in this vocabularybase- the common stem URI of properties in this vocabulary.
-
EnumVocab
Creates a new vocabulary backed by the givenEnumclass and with properties having the common URI stembaseand prefixprefix- Parameters:
clazz- the enumeration backing this vocabulary.base- the common stem URI of properties in this vocabulary.prefix- the common prefix of properties in this vocabulary.
-
EnumVocab
public EnumVocab(Class<P> clazz, com.google.common.base.CaseFormat format, String base, String prefix) Creates a new vocabulary backed by the givenEnumclass and with properties having the common URI stembaseand prefixprefix- Parameters:
clazz- the enumeration backing this vocabulary.format- the case format used by properties in this vocabularybase- the common stem URI of properties in this vocabulary.prefix- the common prefix of properties in this vocabulary.
-
-
Method Details
-
lookup
Description copied from interface:VocabReturns whether a property in allowed in this vocabulary. -
getURI
-
get
-
getName
-
getNames
Returns the property names of the given enum items contained in this vocabulary.- Parameters:
properties- a collection of properties to get the name of, must not benull- Returns:
- the collection of the names of properties in
properties.
-