FinishedLogger - apache/ctakes GitHub Wiki

@PipeBitInfo( name = "Finished Logger", description = "Writes a banner message COMPLETE to the log when all processing is finished.", role = PipeBitInfo.Role.SPECIAL )

final public class FinishedLogger extends JCasAnnotator_ImplBase

Logs basic information on the run, such as the version of cTAKES, the total run time and time per document.

  • Author: SPF , chip-nlp
  • Version: %I%
  • Since: 5/21/2018

@Override public void initialize( final UimaContext context ) throws ResourceInitializationException

{@inheritDoc}

@Override public void process( final JCas jCas ) throws AnalysisEngineProcessException

Increase the count of documents being processed. {@inheritDoc}

@Override public void collectionProcessComplete() throws AnalysisEngineProcessException

Logs basic information on the run, such as total run time and time per document. {@inheritDoc}

  • Exceptions: AnalysisEngineProcessException -

static private String getTime( final long millis )

  • Parameters:
    • millis milliseconds for a time and date since January 1, 1970.
  • Returns: formatted text for the time and date.

static private String getSpan( final long millis )

  • Parameters:
    • millis milliseconds of a span of time, for instance milliseconds in an hour.
  • Returns: formatted text in days, hours, minutes, and seconds.

static public Map<String,String> getBuildInfo( final String... attributeNames )

Get cTAKES build information. This only works for a cTAKES binary installation jars, not simply compiled code. Example: Build Version: 4.0.1-SNAPSHOT Build Date: 2022-10-26 15:59

  • Parameters:
    • attributeNames formatted jar constants for version, build date, etc.
  • Returns: build information for the running cTAKES version or an empty map if none is found.

static private String getAttribute( final Attributes attributes, final String attributeName )

  • Parameters:
    • attributes all attributes in a jar manifest.
    • attributeName name of the wanted attribute.
  • Returns: text value of the wanted attribute, or empty text if the attribute is not found.
⚠️ **GitHub.com Fallback** ⚠️