Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## pf.matcher.implementations.functional
Class FunctionalMatcher

    java.lang.Object
      pf.matcher.implementations.functional.FunctionalMatcher

All Implemented Interfaces:
  IMatcher

    public class FunctionalMatcher

extends java.lang.Object
implements IMatcher

This class implements a functional matcher based on Pallouci's works.

Version:
  0.1
Author:
  Rodrigo Almeida de Amorim

Field Summary
`static int` | `EXACT` This constant represents an exact match.
`static int` | `FAIL` This constant represents a fail match.
`static char` | `INPUT` This constant represents an Input parameters.
`private com.hp.hpl.jena.ontology.OntModel` | `model` An inferencing model.
`static int` | `NOTHING` This constant represents a lack of match.
`(package private) com.hp.hpl.jena.ontology.OntModelSpec` | `ontModel` An ontology model
`private java.lang.String` | `ontology` An ontology.
`static char` | `OUTPUT` This Constant represents an Output parameters.
`static int` | `PLUGIN` This constant represents a plug-in match.
`private java.util.ArrayList<java.net.URI>` | `requestParameters` Attribute that holds all request parameters.
`private com.hp.hpl.jena.rdf.model.Resource` | `resource` A Resource
`private java.util.ArrayList<java.util.ArrayList<SimilarityDegree>>` | `resultInputs` An array that holds all correspondences between the inputs.
`private java.util.ArrayList<java.util.ArrayList<SimilarityDegree>>` | `resultOutputs` An array that holds all correspondences between the outputs.
`static int` | `SIBLING` This constant represents a sibling match.
`static int` | `SUBSUMES` This constant represents a subsumes match.

Constructor Summary
`FunctionalMatcher()` Constructor of the class, it expects an ArrayList of URI from request.

Method Summary
`private java.util.ArrayList<SimilarityDegree>` | `caculateDegree(java.util.ArrayList<java.net.URI> serviceParameters, char typeOfParameters)` Method that performs the matching switching among available filters.
`java.util.ArrayList<java.util.ArrayList<SimilarityDegree>>` | `getResultInputs()`
`java.util.ArrayList<java.util.ArrayList<SimilarityDegree>>` | `getResultOutputs()`
`private boolean` | `hasSameOntology(java.net.URI requestParameter, java.net.URI serviceParameter)` Method that verify if the parameters have the same source/Ontology.
`private boolean` | `isExactMatching(java.net.URI requestParameter, java.net.URI serviceParameter, char typeOfParameter)` Method that calculates if two elements of an ontology are exact.
`private boolean` | `isPluginMatching(java.net.URI requestParameter, java.net.URI serviceParameter, char typeOfParameter)` Method that calculates if two elements of an ontology are plug-in.
`private boolean` | `isSiblingMatching(java.net.URI requestParameter, java.net.URI serviceParameter, char typeOfParameter)` Method that calculates if two elements of an ontology are siblings.
`private boolean` | `isSubsumesMatching(java.net.URI requestParameter, java.net.URI serviceParameter, char typeOfParameter)` Method that calculates if two elements of an ontology are subsumes.
`private void` | `loadOntology(java.lang.String localOntology)` Method that test if the new ontology is equal the one loaded before.
`void` | `matcher(java.util.ArrayList<Service> services, Query request)` Method that has to be implemented due the interface.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### NOTHING

    public static final int NOTHING

  This constant represents a lack of match.

  See Also:
    Constant Field Values

### EXACT

    public static final int EXACT

  This constant represents an exact match.

  See Also:
    Constant Field Values

### PLUGIN

    public static final int PLUGIN

  This constant represents a plug-in match.

  See Also:
    Constant Field Values

### SUBSUMES

    public static final int SUBSUMES

  This constant represents a subsumes match.

  See Also:
    Constant Field Values

### SIBLING

    public static final int SIBLING

  This constant represents a sibling match.

  See Also:
    Constant Field Values

### FAIL

    public static final int FAIL

  This constant represents a fail match.

  See Also:
    Constant Field Values

### INPUT

    public static final char INPUT

  This constant represents an Input parameters.

  See Also:
    Constant Field Values

### OUTPUT

    public static final char OUTPUT

  This Constant represents an Output parameters.

  See Also:
    Constant Field Values

### requestParameters

    private java.util.ArrayList<java.net.URI> requestParameters

  Attribute that holds all request parameters.

### ontology

    private java.lang.String ontology

  An ontology.

### model

    private com.hp.hpl.jena.ontology.OntModel model

  An inferencing model.

### ontModel

    com.hp.hpl.jena.ontology.OntModelSpec ontModel

  An ontology model

### resource

    private com.hp.hpl.jena.rdf.model.Resource resource

  A Resource

### resultInputs

    private java.util.ArrayList<java.util.ArrayList<SimilarityDegree>> resultInputs

  An array that holds all correspondences between the inputs.

### resultOutputs

    private java.util.ArrayList<java.util.ArrayList<SimilarityDegree>> resultOutputs

  An array that holds all correspondences between the outputs.

Constructor Detail

### FunctionalMatcher

    public FunctionalMatcher()

  Constructor of the class, it expects an ArrayList of URI from request.

  Parameters:
    `requestParameters` - - ArrayList with request parameters.

Method Detail

### getResultInputs

    public java.util.ArrayList<java.util.ArrayList<SimilarityDegree>> getResultInputs()

  Returns:
    the resultInputs

### getResultOutputs

    public java.util.ArrayList<java.util.ArrayList<SimilarityDegree>> getResultOutputs()

  Returns:
    the resultOutputs

### loadOntology

    private void loadOntology(java.lang.String localOntology)

  Method that test if the new ontology is equal the one loaded before.

  Parameters:
    `localOntology` - - New ontology to be tested.

### hasSameOntology

    private boolean hasSameOntology(java.net.URI requestParameter,
                                    java.net.URI serviceParameter)

  Method that verify if the parameters have the same source/Ontology.

  Parameters:
    `requestParameter` - - A request parameter.
    `serviceParameter` - - A service parameter.
  Returns:
    true/false - return true if the sources are the same and false if they are different.

### isExactMatching

    private boolean isExactMatching(java.net.URI requestParameter,
                                    java.net.URI serviceParameter,
                                    char typeOfParameter)

  Method that calculates if two elements of an ontology are exact.

  Parameters:
    `requestParameter` - - A request parameter.
    `serviceParameter` - - A service parameter.
    `typoOfParameter` - - It informs if the parameters are inputs or outputs.
  Returns:
    true/false - return true if they are the same and false if they are different.

### isPluginMatching

    private boolean isPluginMatching(java.net.URI requestParameter,
                                     java.net.URI serviceParameter,
                                     char typeOfParameter)

  Method that calculates if two elements of an ontology are plug-in.

  Parameters:
    `requestParameter` - - A request parameter.
    `serviceParameter` - - A service parameter.
    `typoOfParameter` - - It informs if the parameters are inputs or outputs.
  Returns:
    true/false - return true if they are the same and false if they are different.

### isSubsumesMatching

    private boolean isSubsumesMatching(java.net.URI requestParameter,
                                       java.net.URI serviceParameter,
                                       char typeOfParameter)

  Method that calculates if two elements of an ontology are subsumes.

  Parameters:
    `requestParameter` - - A request parameter.
    `serviceParameter` - - A service parameter.
    `typoOfParameter` - - It informs if the parameters are inputs or outputs.
  Returns:
    true/false - return true if they are the same and false if they are different.

### isSiblingMatching

    private boolean isSiblingMatching(java.net.URI requestParameter,
                                      java.net.URI serviceParameter,
                                      char typeOfParameter)

  Method that calculates if two elements of an ontology are siblings.

  Parameters:
    `requestParameter` - - A request parameter.
    `serviceParameter` - - A service parameter.
    `typoOfParameter` - - It informs if the parameters are inputs or outputs.
  Returns:
    true/false - return true if they are the same and false if they are different.

### caculateDegree

    private java.util.ArrayList<SimilarityDegree> caculateDegree(java.util.ArrayList<java.net.URI> serviceParameters,
                                                                 char typeOfParameters)

  Method that performs the matching switching among available filters.

  Parameters:
    `serviceParameters` - - An ArrayList with all service parameters.
    `typeOfParameters` - - Type of parameters, Input or Output.
  Returns:
    - return an ArrayList with all correspondences matched.

### matcher

    public void matcher(java.util.ArrayList<Service> services,
                        Query request)

  Method that has to be implemented due the interface. It manager all the methods in the class FunctionalMatcher.

  Specified by:
    `matcher` in interface `IMatcher`
  Parameters:
    `services` - - An ArrayList with all services loaded.
    `request` - - A Query with data from request loaded.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD