Class MultiMeta

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable, MetaIndex

    public class MultiMeta
    extends java.lang.Object
    implements MetaIndex
    A MetaIndex for use with a MultiIndex. It wraps around multiple individual meta indices to make them look like a single structure.
    Since:
    4.0
    Author:
    Richard McCreadie, Stuart Mackie
    • Constructor Summary

      Constructors 
      Constructor Description
      MultiMeta​(MetaIndex[] metas, int[] offsets)
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()
      Not implemented.
      java.lang.String[] getAllItems​(int docid)
      Obtain all metadata for specified document.
      int getDocument​(java.lang.String key, java.lang.String value)
      Not implemented.
      java.lang.String getItem​(java.lang.String key, int docid)
      Obtain metadata of specified type for specified document.
      java.lang.String[] getItems​(java.lang.String[] keys, int docid)
      Obtain metadata of specified types for specified document.
      java.lang.String[][] getItems​(java.lang.String[] keys, int[] docids)
      Obtain metadata of specified types for specified documents.
      java.lang.String[] getItems​(java.lang.String key, int[] docids)
      Obtain metadata of specified type for specified documents.
      java.lang.String[] getKeys()
      Returns the keys of this meta index
      java.lang.String[] getReverseKeys()
      Not implemented.
      int size()
      How many documents in this metaindex
      • Methods inherited from class java.lang.Object

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

      • MultiMeta

        public MultiMeta​(MetaIndex[] metas,
                         int[] offsets)
        Constructor.
    • Method Detail

      • getKeys

        public java.lang.String[] getKeys()
        Returns the keys of this meta index
        Specified by:
        getKeys in interface MetaIndex
      • size

        public int size()
        How many documents in this metaindex
        Specified by:
        size in interface MetaIndex
      • getItem

        public java.lang.String getItem​(java.lang.String key,
                                        int docid)
                                 throws java.io.IOException
        Obtain metadata of specified type for specified document.
        Specified by:
        getItem in interface MetaIndex
        Throws:
        java.io.IOException
      • getAllItems

        public java.lang.String[] getAllItems​(int docid)
                                       throws java.io.IOException
        Obtain all metadata for specified document.
        Specified by:
        getAllItems in interface MetaIndex
        Throws:
        java.io.IOException
      • getItems

        public java.lang.String[] getItems​(java.lang.String[] keys,
                                           int docid)
                                    throws java.io.IOException
        Obtain metadata of specified types for specified document.
        Specified by:
        getItems in interface MetaIndex
        Throws:
        java.io.IOException
      • getItems

        public java.lang.String[] getItems​(java.lang.String key,
                                           int[] docids)
                                    throws java.io.IOException
        Obtain metadata of specified type for specified documents.
        Specified by:
        getItems in interface MetaIndex
        Throws:
        java.io.IOException
      • getItems

        public java.lang.String[][] getItems​(java.lang.String[] keys,
                                             int[] docids)
                                      throws java.io.IOException
        Obtain metadata of specified types for specified documents. Return array is indexed by documents, then by metakeys.
        Specified by:
        getItems in interface MetaIndex
        Throws:
        java.io.IOException
      • getReverseKeys

        public java.lang.String[] getReverseKeys()
        Not implemented.
        Specified by:
        getReverseKeys in interface MetaIndex
      • getDocument

        public int getDocument​(java.lang.String key,
                               java.lang.String value)
                        throws java.io.IOException
        Not implemented.
        Specified by:
        getDocument in interface MetaIndex
        Throws:
        java.io.IOException
      • close

        public void close()
                   throws java.io.IOException
        Not implemented.
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Throws:
        java.io.IOException