org.licas.service.link

## Class LinkConfig

- java.lang.Object
- - org.licas.service.link.LinkConfig

-     public class LinkConfig
      extends java.lang.Object

  This class stores a description of what linking options are allowed and can parse a String-based description to determine if a certain linking option has been specified.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `ADDNEGATIVE` Defines add negative concepts to the link
    `static java.lang.String` | `ALWAYSFULL` Defines always add full search count
    `static java.lang.String` | `BORROW` Defines the borrow memory method
    `static java.lang.String` | `COMPARISON` Defines the comparison operator included
    `static java.lang.String` | `FILTER` Defines filter individual links before using
    `static java.lang.String` | `FULLIFANSWER` Defines add full search count if it provides an answer
    `static java.lang.String` | `INDIVIDUAL` Defines update individual links if no full answer
    `static java.lang.String` | `LEARN` Defines the weight learning algorithm
    `static java.lang.String` | `LINKFULL` Defines a link with full search
    `static java.lang.String` | `LINKONLY` Defines a link only search
    `static java.lang.String` | `LOCALVIEW` Defines local view only
    `static java.lang.String` | `MEMORY` Defines the memory limit method
    `static java.lang.String` | `NEVERFULL` Defines never add full search count
    `static java.lang.String` | `REASON` Defines reasoning query
    `static java.lang.String` | `RESERVE` Defines to include a reserve slot for each branch
    `static java.lang.String` | `STATS` Defines calculate stats for the process
    `static java.lang.String` | `VIEW` Defines create network view

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `LinkConfig()` Creates a new instance of LinkConfig

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static java.util.ArrayList` | `activationFunctions()` Get a list of the default activation functions.
    `static java.lang.String` | `addLinkMethod(java.lang.String currentLinkConfig, java.lang.String linkMethod)` Return true if parameter is a valid link method.
    `static boolean` | `addNegative(java.lang.String linkMethod)` Return true if link configuration indicates to add negative concepts to the links.
    `static boolean` | `alwaysFull(java.lang.String linkMethod)` Return true if always add full search count.
    `static boolean` | `canBorrow(java.lang.String linkMethod)` Return true if link configuration indicates can borrow memory.
    `static boolean` | `canLearn(java.lang.String linkMethod)` Return true if link configuration indicates can learn.
    `static boolean` | `createView(java.lang.String linkMethod)` Return true if network should create a view.
    `static boolean` | `filter(java.lang.String linkMethod)` Return true if link configuration indicates to filter individual links.
    `static java.lang.String` | `fixLinkMethod(java.lang.String linkMethod)` Make sure the link specification has the appropriate start and end characters.
    `static boolean` | `fullIfAnswer(java.lang.String linkMethod)` Return true if add full search count only if it returns an answer.
    `static java.util.ArrayList` | `getLinkMethods()` Return a list of all legal linking methods.
    `static boolean` | `includeComparison(java.lang.String linkMethod)` Return true if comparison operator is included in linking.
    `static boolean` | `includeReserve(java.lang.String linkMethod)` Return true if link configuration indicates can borrow memory.
    `static boolean` | `isFullSearch(java.lang.String linkMethod)` Return true if any full search is indicated.
    `static boolean` | `isLinkFull(java.lang.String linkMethod)` Return true if link with full search method used.
    `static boolean` | `isLinkMethod(java.lang.String linkMethod)` Return true if parameter is a valid link method.
    `static boolean` | `isLinkOnly(java.lang.String linkMethod)` Return true if link only search method used.
    `static boolean` | `isLinkSearch(java.lang.String linkMethod)` Return true if any linked search is indicated.
    `static boolean` | `isReasoning(java.lang.String linkMethod)` Return true if link configuration indicates reasoning queries as well.
    `static boolean` | `limitMemory(java.lang.String linkMethod)` Return true if amount of memory is limited.
    `static boolean` | `localViewOnly(java.lang.String linkMethod)` Return true if network should store all view components locally only.
    `static boolean` | `neverFull(java.lang.String linkMethod)` Return true if never add full search count.
    `static boolean` | `stats(java.lang.String linkMethod)` Return true if link configuration indicates to calculate stats.
    `static boolean` | `updateIndividual(java.lang.String linkMethod)` Return true if link configuration indicates to update individual links.
    `static java.lang.String` | `zzz_getLinkerClass(java.lang.String linkMethod)` Return the linker class that most closely matches the linking method.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### LINKONLY

          public static final java.lang.String LINKONLY

      Defines a link only search
      See Also:
        Constant Field Values

    - #### LINKFULL

          public static final java.lang.String LINKFULL

      Defines a link with full search
      See Also:
        Constant Field Values

    - #### COMPARISON

          public static final java.lang.String COMPARISON

      Defines the comparison operator included
      See Also:
        Constant Field Values

    - #### MEMORY

          public static final java.lang.String MEMORY

      Defines the memory limit method
      See Also:
        Constant Field Values

    - #### LEARN

          public static final java.lang.String LEARN

      Defines the weight learning algorithm
      See Also:
        Constant Field Values

    - #### BORROW

          public static final java.lang.String BORROW

      Defines the borrow memory method
      See Also:
        Constant Field Values

    - #### RESERVE

          public static final java.lang.String RESERVE

      Defines to include a reserve slot for each branch
      See Also:
        Constant Field Values

    - #### INDIVIDUAL

          public static final java.lang.String INDIVIDUAL

      Defines update individual links if no full answer
      See Also:
        Constant Field Values

    - #### FILTER

          public static final java.lang.String FILTER

      Defines filter individual links before using
      See Also:
        Constant Field Values

    - #### ADDNEGATIVE

          public static final java.lang.String ADDNEGATIVE

      Defines add negative concepts to the link
      See Also:
        Constant Field Values

    - #### VIEW

          public static final java.lang.String VIEW

      Defines create network view
      See Also:
        Constant Field Values

    - #### LOCALVIEW

          public static final java.lang.String LOCALVIEW

      Defines local view only
      See Also:
        Constant Field Values

    - #### ALWAYSFULL

          public static final java.lang.String ALWAYSFULL

      Defines always add full search count
      See Also:
        Constant Field Values

    - #### FULLIFANSWER

          public static final java.lang.String FULLIFANSWER

      Defines add full search count if it provides an answer
      See Also:
        Constant Field Values

    - #### NEVERFULL

          public static final java.lang.String NEVERFULL

      Defines never add full search count
      See Also:
        Constant Field Values

    - #### REASON

          public static final java.lang.String REASON

      Defines reasoning query
      See Also:
        Constant Field Values

    - #### STATS

          public static final java.lang.String STATS

      Defines calculate stats for the process
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### LinkConfig

          public LinkConfig()

      Creates a new instance of LinkConfig

  - ### Method Detail

    - #### isLinkMethod

          public static boolean isLinkMethod(java.lang.String linkMethod)
                                      throws java.lang.Exception

      Return true if parameter is a valid link method.
      Parameters:
        `linkMethod` - the link method.
      Returns:
        true if a valid link method.
      Throws:
        `java.lang.Exception` - any error.

    - #### getLinkMethods

          public static java.util.ArrayList getLinkMethods()

      Return a list of all legal linking methods.
      Returns:
        a list of all linking methods.

    - #### activationFunctions

          public static java.util.ArrayList activationFunctions()

      Get a list of the default activation functions.
      Returns:
        a list of the default activation function types.

    - #### isFullSearch

          public static boolean isFullSearch(java.lang.String linkMethod)

      Return true if any full search is indicated.
      Parameters:
        `linkMethod` - a string description of the link method.
      Returns:
        true if any full search is indicated.

    - #### isLinkSearch

          public static boolean isLinkSearch(java.lang.String linkMethod)

      Return true if any linked search is indicated.
      Parameters:
        `linkMethod` - a string description of the link method.
      Returns:
        true if any linked search is indicated.

    - #### isLinkOnly

          public static boolean isLinkOnly(java.lang.String linkMethod)

      Return true if link only search method used.
      Parameters:
        `linkMethod` - a string description of the link method.
      Returns:
        true if link only search method used.

    - #### isLinkFull

          public static boolean isLinkFull(java.lang.String linkMethod)

      Return true if link with full search method used.
      Parameters:
        `linkMethod` - a string description of the link method.
      Returns:
        true if link with full search method used.

    - #### addLinkMethod

          public static java.lang.String addLinkMethod(java.lang.String currentLinkConfig,
                                                       java.lang.String linkMethod)
                                                throws java.lang.Exception

      Return true if parameter is a valid link method.
      Parameters:
        `currentLinkConfig` - the current link configuration, null if no config yet.
        `linkMethod` - the new link method to add.
      Returns:
        the link configuration with the new link type added.
      Throws:
        `java.lang.Exception` - any error.

    - #### fixLinkMethod

          public static java.lang.String fixLinkMethod(java.lang.String linkMethod)

      Make sure the link specification has the appropriate start and end characters.
      Parameters:
        `linkMethod` - the current link specification.
      Returns:
        the fixed link specification.

    - #### createView

          public static boolean createView(java.lang.String linkMethod)

      Return true if network should create a view.
      Parameters:
        `linkMethod` - a string description of the link method.
      Returns:
        true if network should create a view.

    - #### localViewOnly

          public static boolean localViewOnly(java.lang.String linkMethod)

      Return true if network should store all view components locally only.
      Parameters:
        `linkMethod` - a string description of the link method.
      Returns:
        true if network should store all view components locally only.

    - #### alwaysFull

          public static boolean alwaysFull(java.lang.String linkMethod)

      Return true if always add full search count.
      Parameters:
        `linkMethod` - a string description of the link method.
      Returns:
        true if link only search method used.

    - #### fullIfAnswer

          public static boolean fullIfAnswer(java.lang.String linkMethod)

      Return true if add full search count only if it returns an answer.
      Parameters:
        `linkMethod` - a string description of the link method.
      Returns:
        true if link only search method used.

    - #### neverFull

          public static boolean neverFull(java.lang.String linkMethod)

      Return true if never add full search count.
      Parameters:
        `linkMethod` - a string description of the link method.
      Returns:
        true if link only search method used.

    - #### includeComparison

          public static boolean includeComparison(java.lang.String linkMethod)

      Return true if comparison operator is included in linking.
      Parameters:
        `linkMethod` - a string description of the link method.
      Returns:
        true if comparison operator is included.

    - #### limitMemory

          public static boolean limitMemory(java.lang.String linkMethod)

      Return true if amount of memory is limited.
      Parameters:
        `linkMethod` - a string description of the link method.
      Returns:
        true if amount of memory is limited.

    - #### canLearn

          public static boolean canLearn(java.lang.String linkMethod)

      Return true if link configuration indicates can learn.
      Parameters:
        `linkMethod` - a string description of the link method.
      Returns:
        true if link method can learn.

    - #### canBorrow

          public static boolean canBorrow(java.lang.String linkMethod)

      Return true if link configuration indicates can borrow memory.
      Parameters:
        `linkMethod` - a string description of the link method.
      Returns:
        true if link method can borrow memory.

    - #### includeReserve

          public static boolean includeReserve(java.lang.String linkMethod)

      Return true if link configuration indicates can borrow memory.
      Parameters:
        `linkMethod` - a string description of the link method.
      Returns:
        true if link method can borrow memory.

    - #### updateIndividual

          public static boolean updateIndividual(java.lang.String linkMethod)

      Return true if link configuration indicates to update individual links.
      Parameters:
        `linkMethod` - a string description of the link method.
      Returns:
        true if link method should update individual links.

    - #### filter

          public static boolean filter(java.lang.String linkMethod)

      Return true if link configuration indicates to filter individual links.
      Parameters:
        `linkMethod` - a string description of the link method.
      Returns:
        true if link method should filter individual links.

    - #### addNegative

          public static boolean addNegative(java.lang.String linkMethod)

      Return true if link configuration indicates to add negative concepts to the links.
      Parameters:
        `linkMethod` - a string description of the link method.
      Returns:
        true if link method should include negative concepts with the links.

    - #### isReasoning

          public static boolean isReasoning(java.lang.String linkMethod)

      Return true if link configuration indicates reasoning queries as well.
      Parameters:
        `linkMethod` - a string description of the link method.
      Returns:
        true if link method indicates reasoning queries.

    - #### stats

          public static boolean stats(java.lang.String linkMethod)

      Return true if link configuration indicates to calculate stats.
      Parameters:
        `linkMethod` - a string description of the link method.
      Returns:
        true if link method should calculate stats.

    - #### zzz_getLinkerClass

          public static java.lang.String zzz_getLinkerClass(java.lang.String linkMethod)

      Return the linker class that most closely matches the linking method.
      Parameters:
        `linkMethod` - a string description of the link method.
      Returns:
        true the name of the class to create for the linking method.