org.ceryle.wiki.plugin.assertion
Class AssertionHarvester
java.lang.Object
java.lang.Thread
org.ceryle.wiki.plugin.assertion.AssertionHarvester
- All Implemented Interfaces:
- Runnable
public class AssertionHarvester
- extends Thread
Extends Thread to harvest a Set of Assertions, building from them
a TM4J TopicMap. This is meant to occur as one burst of activity (hence
it being implemented as a Thread); subsequent maintenance is then
handled by the parent WikiMapManager (a subclass of AssertionHandler).
- Version:
- $Id: AssertionHarvester.java,v 1.2 2007-06-15 12:10:13 altheim Exp $
- Author:
- Murray Altheim
|
Field Summary |
static String |
PROPERTY_HARVEST_ENABLED
The System property name for the property enabling the harvesting of
assertions by the AssertionHarvester. |
| Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
PROPERTY_HARVEST_ENABLED
public static final String PROPERTY_HARVEST_ENABLED
- The System property name for the property enabling the harvesting of
assertions by the AssertionHarvester. The value is "ceryle.assertionharvester.enabled".
- See Also:
- Constant Field Values
AssertionHarvester
protected AssertionHarvester(WikiMapManager manager,
Collection assertions,
ActionListener listener)
throws TopicMapException
- Constructor provided the Set of Assertions to process, and an
optional ActionListener to fire off an event upon completion.
The Set of Assertions is immediately copied into an array.
- Parameters:
manager - the WikiMapManager that requested a harvestassertions - the collection of Assertions to harvestlistener - the optional listener that will receive an
ActionEvent upon harvest completion
- Throws:
TopicMapException - if any fatal error occurs during harvest
run
public void run()
- Specified by:
run in interface Runnable- Overrides:
run in class Thread
getTopicMapBuilder
public TopicMapBuilder getTopicMapBuilder()
throws TopicMapException
- Returns the TopicMapBuilder, null if not available. If the
TopicMap is available, the builder is lazily-created.
- Throws:
TopicMapException
harvestAssertion
protected TopicMapObject harvestAssertion(Assertion assertion)
- Harvests the Assertion, returning either its Association within
the TopicMap, or in the case of property assignment Assertions,
the subject Topic that contains the Occurrence. Any Topics
necessary to create the Association are automatically created.
The Ceryle Project. Copyright ©2001-2007 Murray Altheim, All Rights Reserved. See LICENSE included with distribution.