Revision: 17371
http://sourceforge.net/p/gate/code/17371
Author: valyt
Date: 2014-02-20 15:45:05 +0000 (Thu, 20 Feb 2014)
Log Message:
-----------
More javadocs and small simplification.
Modified Paths:
--------------
mimir/branches/5.0/mimir-core/src/gate/mimir/MimirIndex.java
mimir/branches/5.0/mimir-core/src/gate/mimir/index/AtomicAnnotationIndex.java
mimir/branches/5.0/mimir-core/src/gate/mimir/index/AtomicIndex.java
mimir/branches/5.0/mimir-core/src/gate/mimir/index/AtomicTokenIndex.java
mimir/branches/5.0/mimir-core/src/gate/mimir/index/DocumentCollection.java
Modified: mimir/branches/5.0/mimir-core/src/gate/mimir/MimirIndex.java
===================================================================
--- mimir/branches/5.0/mimir-core/src/gate/mimir/MimirIndex.java
2014-02-20 15:35:58 UTC (rev 17370)
+++ mimir/branches/5.0/mimir-core/src/gate/mimir/MimirIndex.java
2014-02-20 15:45:05 UTC (rev 17371)
@@ -505,7 +505,6 @@
tokenIndexes[i] = new AtomicTokenIndex(
this,
subIndexname,
- new File(indexDirectory, subIndexname),
tokConfs[i].isDirectIndexEnabled(),
new LinkedBlockingQueue<GATEDocument>(indexingQueueSize),
new LinkedBlockingQueue<GATEDocument>(indexingQueueSize),
@@ -520,7 +519,6 @@
mentionIndexes[i] = new AtomicAnnotationIndex(
this,
subIndexname,
- new File(indexDirectory, subIndexname),
sics[i].isDirectIndexEnabled(),
new LinkedBlockingQueue<GATEDocument>(),
new LinkedBlockingQueue<GATEDocument>(),
Modified:
mimir/branches/5.0/mimir-core/src/gate/mimir/index/AtomicAnnotationIndex.java
===================================================================
---
mimir/branches/5.0/mimir-core/src/gate/mimir/index/AtomicAnnotationIndex.java
2014-02-20 15:35:58 UTC (rev 17370)
+++
mimir/branches/5.0/mimir-core/src/gate/mimir/index/AtomicAnnotationIndex.java
2014-02-20 15:45:05 UTC (rev 17371)
@@ -83,21 +83,25 @@
protected OffsetComparator offsetComparator;
/**
- * @param parent
- * @param name
- * @param indexDirectory
- * @param hasDirectIndex
- * @param inputQueue
- * @param outputQueue
+ * Creates a new atomic index for indexing annotations.
+ * @param parent the top level {@link MimirIndex} to which this new atomic
+ * index belongs.
+ * @param name the name for the new atomic index. This will be used as the
+ * name of the top level directory for this atomic index (which is a
+ * sub-directory of the parent) and as a base name for all the files of this
+ * atomic index.
+ * @param hasDirectIndex should a direct index be created as well.
+ * @param inputQueue the queue where documents are submitted for indexing;
+ * @param outputQueue the queue where indexed documents are returned to;
* @throws IndexException
* @throws IOException
*/
- public AtomicAnnotationIndex(MimirIndex parent, String name,
- File indexDirectory, boolean hasDirectIndex,
+ public AtomicAnnotationIndex(MimirIndex parent, String name,
+ boolean hasDirectIndex,
BlockingQueue<GATEDocument> inputQueue,
BlockingQueue<GATEDocument> outputQueue,
SemanticIndexerConfig siConfig) throws IOException, IndexException {
- super(parent, name, indexDirectory, hasDirectIndex,
+ super(parent, name, hasDirectIndex,
NullTermProcessor.getInstance(), inputQueue, outputQueue);
this.semIdxConfid = siConfig;
indexConfig = parent.getIndexConfig();
Modified: mimir/branches/5.0/mimir-core/src/gate/mimir/index/AtomicIndex.java
===================================================================
--- mimir/branches/5.0/mimir-core/src/gate/mimir/index/AtomicIndex.java
2014-02-20 15:35:58 UTC (rev 17370)
+++ mimir/branches/5.0/mimir-core/src/gate/mimir/index/AtomicIndex.java
2014-02-20 15:45:05 UTC (rev 17371)
@@ -798,13 +798,13 @@
* @throws IndexException
* @throws IOException
*/
- protected AtomicIndex(MimirIndex parent, String name, File
indexDirectory,
+ protected AtomicIndex(MimirIndex parent, String name,
boolean hasDirectIndex, TermProcessor termProcessor,
BlockingQueue<GATEDocument> inputQueue,
BlockingQueue<GATEDocument> outputQueue) throws IOException,
IndexException {
this.parent = parent;
this.name = name;
- this.indexDirectory = indexDirectory;
+ this.indexDirectory = new File(parent.getIndexDirectory(), name);
this.hasDirectIndex = hasDirectIndex;
this.termProcessor = termProcessor;
this.inputQueue = inputQueue;
Modified:
mimir/branches/5.0/mimir-core/src/gate/mimir/index/AtomicTokenIndex.java
===================================================================
--- mimir/branches/5.0/mimir-core/src/gate/mimir/index/AtomicTokenIndex.java
2014-02-20 15:35:58 UTC (rev 17370)
+++ mimir/branches/5.0/mimir-core/src/gate/mimir/index/AtomicTokenIndex.java
2014-02-20 15:45:05 UTC (rev 17371)
@@ -92,20 +92,24 @@
/**
- * @param parent
- * @param name
- * @param indexDirectory
- * @param hasDirectIndex
- * @param inputQueue
- * @param outputQueue
+ * Creates a new atomic index for indexing tokens.
+ * @param parent the top level {@link MimirIndex} to which this new atomic
+ * index belongs.
+ * @param name the name for the new atomic index. This will be used as the
+ * name of the top level directory for this atomic index (which is a
+ * sub-directory of the parent) and as a base name for all the files of this
+ * atomic index.
+ * @param hasDirectIndex should a direct index be created as well.
+ * @param inputQueue the queue where documents are submitted for indexing;
+ * @param outputQueue the queue where indexed documents are returned to;
* @throws IndexException
* @throws IOException
*/
- public AtomicTokenIndex(MimirIndex parent, String name, File indexDirectory,
+ public AtomicTokenIndex(MimirIndex parent, String name,
boolean hasDirectIndex, BlockingQueue<GATEDocument> inputQueue,
BlockingQueue<GATEDocument> outputQueue, TokenIndexerConfig config,
boolean zipCollection) throws IOException, IndexException {
- super(parent, name, indexDirectory, hasDirectIndex,
+ super(parent, name, hasDirectIndex,
config.getTermProcessor(), inputQueue, outputQueue);
this.featureName = config.getFeatureName();
this.zipCollectionEnabled = zipCollection;
Modified:
mimir/branches/5.0/mimir-core/src/gate/mimir/index/DocumentCollection.java
===================================================================
--- mimir/branches/5.0/mimir-core/src/gate/mimir/index/DocumentCollection.java
2014-02-20 15:35:58 UTC (rev 17370)
+++ mimir/branches/5.0/mimir-core/src/gate/mimir/index/DocumentCollection.java
2014-02-20 15:45:05 UTC (rev 17371)
@@ -387,10 +387,8 @@
/**
- * Opens a zip file and creates a DocumentCollection object for accessing
the
- * document data.
+ * Creates a DocumentCollection object for accessing the document data.
* @param indexDirectory
- * @throws IndexException if the document collection files cannot be
accessed.
* @throws IOException
*/
public DocumentCollection(File indexDirectory) throws IOException {
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk
_______________________________________________
GATE-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gate-cvs