Package org.terrier.realtime.multi
Class MultiMeta
- java.lang.Object
-
- org.terrier.realtime.multi.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
-
-
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 indexjava.lang.String[]
getReverseKeys()
Not implemented.int
size()
How many documents in this metaindex
-
-
-
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
-
size
public int size()
How many documents in this 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.
-
getAllItems
public java.lang.String[] getAllItems(int docid) throws java.io.IOException
Obtain all metadata for specified document.- Specified by:
getAllItems
in interfaceMetaIndex
- 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.
-
getItems
public java.lang.String[] getItems(java.lang.String key, int[] docids) throws java.io.IOException
Obtain metadata of specified type for specified documents.
-
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.
-
getReverseKeys
public java.lang.String[] getReverseKeys()
Not implemented.- Specified by:
getReverseKeys
in interfaceMetaIndex
-
getDocument
public int getDocument(java.lang.String key, java.lang.String value) throws java.io.IOException
Not implemented.- Specified by:
getDocument
in interfaceMetaIndex
- Throws:
java.io.IOException
-
close
public void close() throws java.io.IOException
Not implemented.- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Throws:
java.io.IOException
-
-