edu.mssm.crover.tools.tm
Class TmPredictors

java.lang.Object
  |
  +--edu.mssm.crover.tools.tm.TmPredictors

public class TmPredictors
extends java.lang.Object

Factory for TmPredictor instances. This factory provides automatic management of classes registration. TmPredictor classes must be defined either through the register method, or through properties:

  • tm.predictor-classes Comma separated list of class-terms. One class term is defined as follow: package.class-name where package can be either an actual package name or the special string "default". In which case, the class-term is expanded such that default is replaced by the value of property tm.predictor-default-package
  • tm.predictor-default-package Package name to substitute for the "default" package.


    Field Summary
    static java.lang.String DEFAULT_TM_PREDICTOR_CLASS_NAMES
               
    static java.lang.String DEFAULT_TM_PREDICTOR_PACKAGE
               
     
    Constructor Summary
    TmPredictors()
              Initialize set of available TM predictors.
     
    Method Summary
     TmPredictor createPredictor(java.lang.String name)
              Create and returns pre-registered TM predictors.
    static java.lang.String[] getDefaultNames()
              Return a array of names for available predictors.
    static java.lang.String getDefaultReferenceURL(java.lang.String predictorName)
              Returns reference URL for implicitely registered predictors.
     java.lang.String[] getNames()
              Return a array of names for available predictors.
     java.lang.String getReferenceURL(java.lang.String predictorName)
              Returns a URL that describes the given predictor.
    static void main(java.lang.String[] args)
               
     void register(java.lang.Class predictor_class, java.lang.String name)
               
     
    Methods inherited from class java.lang.Object
    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
     

    Field Detail

    DEFAULT_TM_PREDICTOR_CLASS_NAMES

    public static final java.lang.String DEFAULT_TM_PREDICTOR_CLASS_NAMES
    See Also:
    Constant Field Values

    DEFAULT_TM_PREDICTOR_PACKAGE

    public static final java.lang.String DEFAULT_TM_PREDICTOR_PACKAGE
    See Also:
    Constant Field Values
    Constructor Detail

    TmPredictors

    public TmPredictors()
    Initialize set of available TM predictors. The list is built from two properties:

    Method Detail

    createPredictor

    public TmPredictor createPredictor(java.lang.String name)
    Create and returns pre-registered TM predictors.


    register

    public void register(java.lang.Class predictor_class,
                         java.lang.String name)

    getNames

    public java.lang.String[] getNames()
    Return a array of names for available predictors. Names can have been registered in two ways: implicitly via the properties tm.predictor-classes and tm.predictor-default-package, or explicitly through a call to the register() method of this instance.


    getReferenceURL

    public java.lang.String getReferenceURL(java.lang.String predictorName)
    Returns a URL that describes the given predictor.

    Returns:
    the url or null if the predictor name is not registered, not installed, or has no URL associated with it.

    getDefaultNames

    public static java.lang.String[] getDefaultNames()
    Return a array of names for available predictors. In constrast to the method getNames(), this method returns only names associated implicitly with this class

    See Also:
    getNames()

    getDefaultReferenceURL

    public static java.lang.String getDefaultReferenceURL(java.lang.String predictorName)
    Returns reference URL for implicitely registered predictors.

    See Also:
    TmPredictor.getReferenceURL, getReferenceURL(java.lang.String)

    main

    public static void main(java.lang.String[] args)


    Copyright @ 2003 Mount Sinai School of Medicine. All Rights Reserved.