org.licas.def.search

## Interface ServiceMetaSearchDef

- All Known Implementing Classes:
    ServerMetaSearch

      public interface ServiceMetaSearchDef

  This is an interface for including your own yellow pages lookup facility to a service.
  Author:
    Kieran Greer

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.util.HashMap<java.lang.String,java.lang.String>` | `getServiceClasses()` Get the class types for all services that are stored.
    `java.util.ArrayList<java.lang.String>` | `getServiceNames()` Get all child service names.
    `java.util.ArrayList<java.lang.String>` | `getServiceNames(java.util.ArrayList<java.lang.String> thisServiceTypes, boolean reciprocal)` Return all child service names for a list of service types.
    `java.util.ArrayList<java.lang.String>` | `getServiceTypes()` Return all service types for all stored services.
    `org.licas_xml.abs.Element` | `metaSearch(java.lang.String queryEngine, int callTimeout, org.licas_xml.abs.Element request, ServiceLinks serverLinks)` Query the service metadata to find matching information.

- - ### Method Detail

    - #### getServiceNames

          java.util.ArrayList<java.lang.String> getServiceNames()

      Get all child service names.
      Returns:
        all service uuids, of type String.

    - #### getServiceNames

          java.util.ArrayList<java.lang.String> getServiceNames(java.util.ArrayList<java.lang.String> thisServiceTypes,
                                                                boolean reciprocal)
                                                         throws LicasException

      Return all child service names for a list of service types.
      Parameters:
        `thisServiceTypes` - the service types list.
        `reciprocal` - is false return all service names of the service types, if true return all service names of all other types.
      Returns:
        the service names for the service types list.
      Throws:
        `LicasException` - if the service types input is `null`.

    - #### getServiceTypes

          java.util.ArrayList<java.lang.String> getServiceTypes()

      Return all service types for all stored services.
      Returns:
        all service types.

    - #### getServiceClasses

          java.util.HashMap<java.lang.String,java.lang.String> getServiceClasses()

      Get the class types for all services that are stored.
      Returns:
        the service handles with the class types for the services of this component.

    - #### metaSearch

          org.licas_xml.abs.Element metaSearch(java.lang.String queryEngine,
                                               int callTimeout,
                                               org.licas_xml.abs.Element request,
                                               ServiceLinks serverLinks)
                                        throws java.lang.Exception

      Query the service metadata to find matching information. To be recognised by the default classes, the root `request` element should have the tag name of `QueryConst`.`QUERYMODEL`, or 'Query_Model'. This should then contain a description of the query request. For this default model, the XML request that is passed in needs to be parsed by a `QueryParser` parser into a `QueryModel` object, of the 'licas_text' package. This is what the default classes will then evaluate. The documentation describes the different fields in more detail.
      Parameters:
        `queryEngine` - the query engine type. Required for a distributed query.
        `callTimeout` - maximum time allowed for the call (in milliseconds).
        `request` - the query request.
        `serverLinks` - the `ESB` links information.
      Returns:
        any suitable matches to the request. These are stored inside of an element for each related service, with attributes to describe the service uuid and type.
      Throws:
        `java.lang.Exception` - any error.