edu.northwestern.at.wordhoard.tools.martin
Class MartinProvider

java.lang.Object
  extended by edu.northwestern.at.wordhoard.tools.martin.MartinProvider
All Implemented Interfaces:
TaggingDataProvider

public class MartinProvider
extends java.lang.Object
implements TaggingDataProvider

A tagging data provider for Martin's database.


Constructor Summary
MartinProvider(java.sql.Connection martinConnection)
          Creates a new MartinProvider.
 
Method Summary
 java.lang.String[] getMorph(org.w3c.dom.Element el, java.lang.String wordTag)
          Gets the morphology data for a word.
 boolean setWork(java.lang.String corpusTag, java.lang.String workTag)
          Sets the work.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MartinProvider

public MartinProvider(java.sql.Connection martinConnection)
               throws java.lang.Exception
Creates a new MartinProvider.

Parameters:
martinConnection - Connection to Martin's database.
Throws:
java.lang.Exception
Method Detail

setWork

public boolean setWork(java.lang.String corpusTag,
                       java.lang.String workTag)
                throws java.lang.Exception
Sets the work.

Parameters:
corpusTag - Corpus tag.
workTag - Work tag.
Returns:
True if no error, false if error.
Throws:
java.lang.Exception

getMorph

public java.lang.String[] getMorph(org.w3c.dom.Element el,
                                   java.lang.String wordTag)
                            throws java.lang.Exception
Gets the morphology data for a word.

Specified by:
getMorph in interface TaggingDataProvider
Parameters:
el - "w" element.
wordTag - Word tag.
Returns:
Morphology tags for the word: An array of two strings: The lemma and pos tags. Returns null if no data is available or an error was reported.
Throws:
java.lang.Exception