nectec.semantic.web.knowledge.application.framework.recommender
Class Recommender

java.lang.Object
  extended by nectec.semantic.web.knowledge.application.framework.representative.ApplicationTemplate
      extended by nectec.semantic.web.knowledge.application.framework.recommender.Recommender

public class Recommender
extends ApplicationTemplate

Contain all the methods regarding to Recommender application. Some of the methods available in this class contain a parameter named 'path' and it is actually the name of a class in ontology. The name is called 'path' due to the system expectation that the directory(path) name must be similar to the respective class name in the ontology.


Field Summary
 
Fields inherited from class nectec.semantic.web.knowledge.application.framework.representative.ApplicationTemplate
PROPERTY_CLASSIFICATION_DISPLAY, PROPERTY_CLASSIFICATION_PROCESSING, TO_DISPLAY, TO_PROCESS
 
Constructor Summary
Recommender(String root)
          Constructor method.
 
Method Summary
static boolean checkDataExistence(String root, boolean afterRule)
          Check whether the data is ready or not, in order to run Recommender application.
 ArrayList<String> getAllPropertiesInvolved(String classOfInterest)
          Get all the properties configured to be involved in the current class of interest.
 HashMap<String,String> getAvailableConditionalProperties(String classOfInterest)
          Get the list of properties which users can use for defining rule in condition part, as defined in its configuration.
 HashMap<String,String> getAvailableRecommendedProperties(String classOfInterest)
          Get the list of properties which are added due to the rule.
 boolean isInIncludedProperties(String propertyName, int propertyClassification)
          Check whether the given property is included in the configuration or not.
static void prepareData(String root, String plginData)
          Prepare the data required for use of Semantic Search, which includes merging data, applying the rules from common place, and insert additional inferences to the base data.
 
Methods inherited from class nectec.semantic.web.knowledge.application.framework.representative.ApplicationTemplate
getAllInstanceUniqueIDs, getAllInstanceURNs, getAppRelPath, getAvailableDisplayProperties, getConfig, getCurrentClassOfInterest, getCustomLabel, getInformationOfGivenInstanceURN, getNamespace, getOntologyModel, getOntologyProcessingInstance, getPaths, getPaths, getPkeyValueGivenURN, getRangeOfPropertyWRTcurretClass, getRelatedInformationOfGivenClassInstance, getStruturalInfoOfURN, getSubclassesOfGivenPropertyRange, getURNofID, getValueOfProperty, hasPropertyValueForInstanceWithGivenID, init, isValidResourceInThisNS, searchInstances, searchInstancesOfGivenConditions, setCurrentApplicationPath, setCurrentClassOfInterest, setOntologyModel
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Recommender

public Recommender(String root)
Constructor method. This should not be called directly. Instead one should get this object from the class 'ServiceRepresentative'.

Parameters:
root - Location of the Recommender data directory on the system (e.g. "D:/NECTEC/SKAF_HOME/AppData/Employee").
Method Detail

getAvailableConditionalProperties

public HashMap<String,String> getAvailableConditionalProperties(String classOfInterest)
Get the list of properties which users can use for defining rule in condition part, as defined in its configuration.

Parameters:
classOfInterest - Class of interest (if used null, the class of current interest, which was defined when you create the object, is applied).
Returns:
Collection of properties along with their type description (LITERAL or REFERENCE).

getAvailableRecommendedProperties

public HashMap<String,String> getAvailableRecommendedProperties(String classOfInterest)
Get the list of properties which are added due to the rule.

Parameters:
classOfInterest - Class of interest (if used null, the class of current interest, which was defined when you create the object, is applied).
Returns:
Collection of properties along with their type description (LITERAL or REFERENCE).

checkDataExistence

public static boolean checkDataExistence(String root,
                                         boolean afterRule)
Check whether the data is ready or not, in order to run Recommender application.

Parameters:
root - Root of the application data (e.g. "D:/NECTEC/SKAF_HOME/AppData/Employee").
Returns:
true (It is ready) or false (It is not ready).

isInIncludedProperties

public boolean isInIncludedProperties(String propertyName,
                                      int propertyClassification)
Check whether the given property is included in the configuration or not.

Specified by:
isInIncludedProperties in class ApplicationTemplate
Parameters:
propertyName - Property of interest.
propertyClassification - Property type (Types are defined as Constants (Start with the word 'PROPERTY_CLASSIFICATION_') in ApplicationTemplate class and callable.)
Returns:
true(It is included in configuration) / false(It is not included in configuration)

getAllPropertiesInvolved

public ArrayList<String> getAllPropertiesInvolved(String classOfInterest)
Get all the properties configured to be involved in the current class of interest. Including searchable properties, display properties, conditional properties and, if have, recommended properties.

Specified by:
getAllPropertiesInvolved in class ApplicationTemplate
Parameters:
classOfInterest - Class of interest.
Returns:
Collection of those properties.

prepareData

public static void prepareData(String root,
                               String plginData)
Prepare the data required for use of Semantic Search, which includes merging data, applying the rules from common place, and insert additional inferences to the base data.

Parameters:
root - Location of the Recommender data directory on the system (e.g. "D:/NECTEC/SKAF_HOME/AppData/Employee").
plginData - File name that contains data plugged in from other sources.