Class AggregateVocab

  • All Implemented Interfaces:
    Vocab

    public class AggregateVocab
    extends java.lang.Object
    implements Vocab
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.String uri  
      private java.util.List<Vocab> vocabs  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private AggregateVocab​(java.util.List<Vocab> vocabs)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getURI()
      Returns the base URI of this vocabulary.
      com.google.common.base.Optional<Property> lookup​(java.lang.String name)
      Returns whether a property in allowed in this vocabulary.
      static Vocab of​(Vocab... vocabs)
      Returns a vocabulary composed of the union of the vocabularies given as parameter.
      • Methods inherited from class java.lang.Object

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

      • vocabs

        private final java.util.List<Vocab> vocabs
      • uri

        private final java.lang.String uri
    • Constructor Detail

      • AggregateVocab

        private AggregateVocab​(java.util.List<Vocab> vocabs)
    • Method Detail

      • of

        public static Vocab of​(Vocab... vocabs)
        Returns a vocabulary composed of the union of the vocabularies given as parameter. The given vocabularies must have the same base URI.
        Parameters:
        vocabs - the vocabularies to aggregate.
        Returns:
        the aggregated vocabulary.
      • lookup

        public com.google.common.base.Optional<Property> lookup​(java.lang.String name)
        Description copied from interface: Vocab
        Returns whether a property in allowed in 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 java.lang.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.