Class UncheckedVocab

java.lang.Object
com.adobe.epubcheck.vocab.UncheckedVocab
All Implemented Interfaces:
Vocab

public final class UncheckedVocab extends Object implements Vocab
A Vocab implementation which always return a successful lookup result. In other words, this represents an "unchecked" vocabulary which assumes that all property names are allowed. It is used to represent user-declared custom vocabularies that are not known to EpubCheck.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final String
     
    private final String
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    UncheckedVocab(String base, String prefix)
    Creates a new unchecked vocabulary representing properties whose URIs start with base and short names have the prefix prefix.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the base URI of this vocabulary.
    com.google.common.base.Optional<Property>
    lookup(String name)
    Returns a reference to a new Property with the short name name, the same prefix and stem URI as was given when creating this vocabulary.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • base

      private final String base
    • prefix

      private final String prefix
  • Constructor Details

    • UncheckedVocab

      public UncheckedVocab(String base, String prefix)
      Creates a new unchecked vocabulary representing properties whose URIs start with base and short names have the prefix prefix.
      Parameters:
      base - the URI stem used to generate URIs of properties in this vocabulary.
      prefix - the prefix used for property names.
  • Method Details

    • lookup

      public com.google.common.base.Optional<Property> lookup(String name)
      Returns a reference to a new Property with the short name name, the same prefix and stem URI as was given when creating this vocabulary.
      Specified by:
      lookup in interface Vocab
      Parameters:
      name - the property name (unprefixed).
      Returns:
      an Property reference which contains a Property if the lookup was successful or nothing if the property was not found in this vocabulary.
    • getURI

      public String getURI()
      Description copied from interface: Vocab
      Returns the base URI of this vocabulary.
      Specified by:
      getURI in interface Vocab
      Returns:
      the base URI of this vocabulary.