|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object
|
+--java.awt.Component
|
+--java.awt.Container
|
+--java.awt.Window
|
+--java.awt.Frame
|
+--javax.swing.JFrame
|
+--ArborFrame
|
+--MorphologyTool
The MorphologyTool is responsible for displaying morphological information in a top-level frame. Global searches for variants in the text can be performed by double-clicking an item from the right list. Dictionary lookup is accomplished by double-clicking on an item in the left list.
| Inner classes inherited from class javax.swing.JFrame |
javax.swing.JFrame.AccessibleJFrame |
| Inner classes inherited from class java.awt.Frame |
java.awt.Frame.AccessibleAWTFrame |
| Inner classes inherited from class java.awt.Window |
java.awt.Window.AccessibleAWTWindow |
| Inner classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
| Inner classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent |
| Fields inherited from class javax.swing.JFrame |
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled |
| Fields inherited from class java.awt.Frame |
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR |
| Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface javax.swing.WindowConstants |
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE |
| Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
MorphologyTool(ContentOwner owner)
|
|
| Method Summary | |
void |
acquireFromDonatus()
Acquires morphological data from Donatus. |
void |
addEntriesToDonatus()
Adds new morphological entries to Donatus. |
boolean |
areFormsLoaded()
Returns true if a morphology file has been loaded. |
org.w3c.dom.Document |
buildChangedMorphDOM()
Builds a DOM of the user-modified morphological entries. |
org.w3c.dom.Document |
buildCompleteMorphDOM()
Builds a DOM containing all morphological entries. |
void |
characters(char[] ch,
int start,
int length)
This is part of the ContentHandler interface. |
void |
comment(char[] ch,
int start,
int length)
These methods belong to the LexicalHandler interface. |
void |
dispose()
Cleans up, when it's time for us to give up the ghost. |
void |
endCDATA()
|
void |
endDocument()
|
void |
endDTD()
|
void |
endElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String qName)
This is part of the ContentHandler interface. |
void |
endEntity(java.lang.String name)
|
void |
endPrefixMapping(java.lang.String prefix)
|
void |
ensureFormsLoaded(java.lang.String lang)
Tries to load the morphological data, if not already loaded. |
void |
extendMapping(java.lang.String formV,
java.lang.String formB,
java.lang.String formID,
java.lang.String lang)
Adds a new mapping of a basic and variant form. |
java.util.List |
getAllIdents(java.lang.String lang)
Returns the the set of all used morphological identification labels. |
java.util.List |
getAllLemmata(java.lang.String lang)
Returns a list of all known lemmata for a language. |
java.lang.String[] |
getBasicForms(java.lang.String form,
java.lang.String lang)
Returns the possible basic forms for a variant. |
java.lang.String |
getDecodedLemma(Language lang,
PluggableFilter pf,
java.lang.String s)
If s is a transcoding via pf of a lemma,
returns the lemma (in native encoding for the specified language). |
DonatusClient |
getDonatusClient()
Obtains an interface for interacting with the Donatus morphology server. |
java.io.File |
getMorphSaveFile()
Returns the local file to which modified morphology will by default be saved. |
java.lang.String[] |
getVariantForms(java.lang.String form,
java.lang.String lang)
Returns the known variant forms for a lemma. |
void |
ignorableWhitespace(char[] ch,
int start,
int length)
|
boolean |
isDirty()
Returns true if the morphology is "dirty" -- that is, if any items have been added since the last save. |
boolean |
isHidden()
Returns true if the the morphology features for the content owner should be disabled. |
boolean |
isModified()
Returns true if there are user-modified morphological data. |
void |
parseAcquired(java.io.ByteArrayInputStream bais)
Parses XML acquired from Donatus. |
void |
popup(java.lang.String word,
java.lang.String lang,
org.w3c.dom.Node container,
int count,
ContentRenderPane content)
Ensures that our frame is visible and initializes the JLists. |
void |
processingInstruction(java.lang.String target,
java.lang.String data)
|
void |
queryLoadUnparsed(java.net.URL url)
Provides the user the option of loading unparsed items as a termlist. |
void |
serialize(org.w3c.dom.Document doc,
java.io.File file)
Serializes a DOM to a file sink. |
void |
setDocumentLocator(org.xml.sax.Locator locator)
|
void |
setHidden(boolean value)
Sets the property that determines whether the morphology features for the content owner should be disabled. |
void |
showLog()
Displays the log from Donatus. |
void |
skippedEntity(java.lang.String name)
|
void |
startCDATA()
|
void |
startDocument()
|
void |
startDTD(java.lang.String name,
java.lang.String publicId,
java.lang.String systemId)
|
void |
startElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes atts)
This is part of the ContentHandler interface. |
void |
startEntity(java.lang.String name)
|
void |
startPrefixMapping(java.lang.String prefix,
java.lang.String url)
|
java.lang.String |
toString()
|
void |
valueChanged(javax.swing.event.ListSelectionEvent evt)
This method is required by ListSelectionListener. |
| Methods inherited from class javax.swing.JFrame |
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getJMenuBar, getLayeredPane, getRootPane, isRootPaneCheckingEnabled, paramString, processKeyEvent, processWindowEvent, remove, setContentPane, setDefaultCloseOperation, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, update |
| Methods inherited from class java.awt.Frame |
addNotify, finalize, getCursorType, getFrames, getIconImage, getMenuBar, getState, getTitle, isResizable, remove, removeNotify, setCursor, setIconImage, setMenuBar, setResizable, setState, setTitle |
| Methods inherited from class java.awt.Window |
addWindowListener, applyResourceBundle, applyResourceBundle, getFocusOwner, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getOwnedWindows, getOwner, getToolkit, getWarningString, hide, isShowing, pack, postEvent, processEvent, removeWindowListener, setCursor, show, toBack, toFront |
| Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getInsets, getLayout, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setFont, validate, validateTree |
| Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputMethodRequests, getLocation, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseMotionEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setDropTarget, setEnabled, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, size, transferFocus |
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.awt.MenuContainer |
getFont, postEvent |
| Constructor Detail |
public MorphologyTool(ContentOwner owner)
| Method Detail |
public java.lang.String getDecodedLemma(Language lang,
PluggableFilter pf,
java.lang.String s)
s is a transcoding via pf of a lemma,
returns the lemma (in native encoding for the specified language).
Otherwise returns null.lang - languagepf - a pluggable display filters - string to be tested
public void popup(java.lang.String word,
java.lang.String lang,
org.w3c.dom.Node container,
int count,
ContentRenderPane content)
JLists.word - word for which to display morphological
informationlang - language code as per ISO 639container - (outermost) container of wordcount - token-type occurrence count for wordcontent - calling ContentRenderPanepublic void valueChanged(javax.swing.event.ListSelectionEvent evt)
ListSelectionListener.valueChanged in interface javax.swing.event.ListSelectionListener
public java.lang.String[] getBasicForms(java.lang.String form,
java.lang.String lang)
form - variant formlang - language code as per ISO 639getVariantForms(java.lang.String, java.lang.String)
public java.lang.String[] getVariantForms(java.lang.String form,
java.lang.String lang)
form - basic formlang - language code as per ISO 639getBasicForms(java.lang.String, java.lang.String)public java.util.List getAllLemmata(java.lang.String lang)
lang - language code as per ISO 639
public void extendMapping(java.lang.String formV,
java.lang.String formB,
java.lang.String formID,
java.lang.String lang)
formV - variant formformB - basic formformID - morphological analysislang - languagepublic void ensureFormsLoaded(java.lang.String lang)
lang - language code as per ISO 639public boolean areFormsLoaded()
public void startElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes atts)
throws org.xml.sax.SAXException
ContentHandler interface.startElement in interface org.xml.sax.ContentHandler
public void endElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String qName)
throws org.xml.sax.SAXException
ContentHandler interface.endElement in interface org.xml.sax.ContentHandler
public void characters(char[] ch,
int start,
int length)
throws org.xml.sax.SAXException
ContentHandler interface.characters in interface org.xml.sax.ContentHandlerpublic void setDocumentLocator(org.xml.sax.Locator locator)
setDocumentLocator in interface org.xml.sax.ContentHandlerpublic void startDocument()
startDocument in interface org.xml.sax.ContentHandlerpublic void endDocument()
endDocument in interface org.xml.sax.ContentHandler
public void startPrefixMapping(java.lang.String prefix,
java.lang.String url)
startPrefixMapping in interface org.xml.sax.ContentHandlerpublic void endPrefixMapping(java.lang.String prefix)
endPrefixMapping in interface org.xml.sax.ContentHandler
public void ignorableWhitespace(char[] ch,
int start,
int length)
ignorableWhitespace in interface org.xml.sax.ContentHandler
public void processingInstruction(java.lang.String target,
java.lang.String data)
processingInstruction in interface org.xml.sax.ContentHandlerpublic void skippedEntity(java.lang.String name)
skippedEntity in interface org.xml.sax.ContentHandler
public void comment(char[] ch,
int start,
int length)
LexicalHandler interface.comment in interface org.xml.sax.ext.LexicalHandlerpublic void endCDATA()
endCDATA in interface org.xml.sax.ext.LexicalHandlerpublic void endDTD()
endDTD in interface org.xml.sax.ext.LexicalHandlerpublic void endEntity(java.lang.String name)
endEntity in interface org.xml.sax.ext.LexicalHandlerpublic void startCDATA()
startCDATA in interface org.xml.sax.ext.LexicalHandler
public void startDTD(java.lang.String name,
java.lang.String publicId,
java.lang.String systemId)
startDTD in interface org.xml.sax.ext.LexicalHandlerpublic void startEntity(java.lang.String name)
startEntity in interface org.xml.sax.ext.LexicalHandlerpublic org.w3c.dom.Document buildChangedMorphDOM()
public org.w3c.dom.Document buildCompleteMorphDOM()
public void serialize(org.w3c.dom.Document doc,
java.io.File file)
doc - DOMfile - file to which XML is writtenpublic java.io.File getMorphSaveFile()
public boolean isDirty()
public DonatusClient getDonatusClient()
public void addEntriesToDonatus()
public void acquireFromDonatus()
public void parseAcquired(java.io.ByteArrayInputStream bais)
bais - input stream for XML datapublic void queryLoadUnparsed(java.net.URL url)
url - URL to unparsed data (from Donatus server)public boolean isHidden()
public void setHidden(boolean value)
value - true to disable morphologypublic boolean isModified()
public java.util.List getAllIdents(java.lang.String lang)
lang - language code as per ISO 639public void showLog()
public void dispose()
dispose in class java.awt.Windowpublic java.lang.String toString()
toString in class java.awt.Component
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||