Class ValidationContext.ValidationContextPredicates

  • Enclosing class:
    ValidationContext

    public static final class ValidationContext.ValidationContextPredicates
    extends java.lang.Object
    Utility to create Predicates applying to ValidationContext instances.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static com.google.common.base.Predicate<ValidationContext> hasProp​(Property property)
      Returns a predicate that evaluates to true if the given property is declared in the context being tested.
      static com.google.common.base.Predicate<ValidationContext> hasPubType​(PublicationType type)
      Returns a predicate that evaluates to true if the given publication dc:type is declared in the context being tested.
      static com.google.common.base.Predicate<ValidationContext> mimetype​(java.lang.String mimetype)
      Returns a predicate that evaluates to true if the context being tested has the given media type.
      static com.google.common.base.Predicate<ValidationContext> path​(java.lang.String path)
      Returns a predicate that evaluates to true if the context being tested has the given path.
      static com.google.common.base.Predicate<ValidationContext> profile​(EPUBProfile profile)
      Returns a predicate that evaluates to true if the context being tested declares the given validation profile.
      static com.google.common.base.Predicate<ValidationContext> version​(EPUBVersion version)
      Returns a predicate that evaluates to true if the context being tested declares the given EPUB version.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ValidationContextPredicates

        private ValidationContextPredicates()
    • Method Detail

      • hasProp

        public static com.google.common.base.Predicate<ValidationContext> hasProp​(Property property)
        Returns a predicate that evaluates to true if the given property is declared in the context being tested.
      • hasPubType

        public static com.google.common.base.Predicate<ValidationContext> hasPubType​(PublicationType type)
        Returns a predicate that evaluates to true if the given publication dc:type is declared in the context being tested.
      • mimetype

        public static com.google.common.base.Predicate<ValidationContext> mimetype​(java.lang.String mimetype)
        Returns a predicate that evaluates to true if the context being tested has the given media type.
      • path

        public static com.google.common.base.Predicate<ValidationContext> path​(java.lang.String path)
        Returns a predicate that evaluates to true if the context being tested has the given path.
      • profile

        public static com.google.common.base.Predicate<ValidationContext> profile​(EPUBProfile profile)
        Returns a predicate that evaluates to true if the context being tested declares the given validation profile.
      • version

        public static com.google.common.base.Predicate<ValidationContext> version​(EPUBVersion version)
        Returns a predicate that evaluates to true if the context being tested declares the given EPUB version.