|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnectec.semantic.web.knowledge.application.framework.representative.ApplicationTemplate
public abstract class ApplicationTemplate
Template class which will be inherited by the application classes: Semantic Search and Recommender and contains all the common methods shared among these two sub classes.
Field Summary | |
---|---|
static int |
PROPERTY_CLASSIFICATION_DISPLAY
Indicator of property type classified by the system, which in this case, display property. |
static int |
PROPERTY_CLASSIFICATION_PROCESSING
Indicator of property type classified by the system, which in this case, both searchable property and conditional property. |
static String |
TO_DISPLAY
Display property indicator for internal processing. |
static String |
TO_PROCESS
Searchable/Conditional property indicator for internal processing. |
Constructor Summary | |
---|---|
ApplicationTemplate()
|
Method Summary | |
---|---|
ArrayList<String> |
getAllInstanceUniqueIDs()
Get all the IDs of instances of the currently interested class. |
ArrayList<String> |
getAllInstanceURNs()
Get all the URNs of instances of the currently interested class. |
abstract ArrayList<String> |
getAllPropertiesInvolved(String classOfInterest)
Get all the properties configured to be involved in the current class of interest. |
String |
getAppRelPath()
Get the appRelPath path of the application. |
HashMap<String,String> |
getAvailableDisplayProperties(String classOfInterest)
Get the available display properties of the given class. |
HashMap<String,String> |
getConfig()
Get the configuration. |
String |
getCurrentClassOfInterest()
Get current class(path) of interest. |
String |
getCustomLabel(String classOfInterest,
String propertyName)
Get the label of the given property (Customized label instead of rdfs:label). |
HashMap<String,ArrayList<String>> |
getInformationOfGivenInstanceURN(String urn)
Get all related information of class instances of the given urn. |
String |
getNamespace()
Get the namespace of the ontology. |
com.hp.hpl.jena.ontology.OntModel |
getOntologyModel()
Get the ontology model of knowledge base. |
OntologyProcessing |
getOntologyProcessingInstance()
Get the instance of OntologyProcessing Class so that the processing on the ontology can be performed without the instances. |
ArrayList<String> |
getPaths()
Get list of classes involved, defined in the configuration. |
static ArrayList<String> |
getPaths(String root)
Get list of classes involved, defined in the configuration. |
String |
getPkeyValueGivenURN(String urn)
Given the urn, retrieve the value of primary-key like property. |
String |
getRangeOfPropertyWRTcurretClass(String propertyName)
Get class of the given property comes from (i.e. |
HashMap<String,ArrayList<String>> |
getRelatedInformationOfGivenClassInstance(String classOfInterest,
String instanceIdentificationNumber)
Get all related information of instances of the given class. |
HashMap<String,String> |
getStruturalInfoOfURN(String urn)
Get the information (RDF type, unique ID, ect) of given URN. |
ArrayList<String> |
getSubclassesOfGivenPropertyRange(String propertyName)
Get all the subclasses of the class that the given property comes from. |
String |
getURNofID(String uniqueID)
Given the uniqueID of resource, get the URN of it. |
ArrayList<String> |
getValueOfProperty(String instanceIdentificationNumber,
String propertyName)
Get the value of the given property of the instance with given ID. |
boolean |
hasPropertyValueForInstanceWithGivenID(String instanceIdentificationNumber,
String propertyName)
Check whether the instance with given id has the given property or not. |
void |
init()
Initializing the instance. |
abstract boolean |
isInIncludedProperties(String propertyName,
int propertyClassification)
Check whether the given property is included in the configuration or not. |
boolean |
isValidResourceInThisNS(String resourceName)
Check whether the given resource is a valid resource in the ontology or not. |
ArrayList<String> |
searchInstances(String propertyName,
String operator,
String literalValue,
String referenceValue)
Search the instance of a given condition. |
ArrayList<String> |
searchInstancesOfGivenConditions(ArrayList<String> properties,
ArrayList<String> operators,
ArrayList<String> literalValues,
ArrayList<String> resourceValues)
Query the model for searching the instances which match all the given conditions. |
void |
setCurrentApplicationPath(String newAppPath)
Set the current application path (domain) to another. |
void |
setCurrentClassOfInterest(String newClassOfInterest)
Set the current class of interest. |
void |
setOntologyModel(com.hp.hpl.jena.ontology.OntModel ontologyModel)
Set the main model for knowledge base. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String TO_DISPLAY
public static final String TO_PROCESS
public static final int PROPERTY_CLASSIFICATION_DISPLAY
public static final int PROPERTY_CLASSIFICATION_PROCESSING
Constructor Detail |
---|
public ApplicationTemplate()
Method Detail |
---|
public void init()
public ArrayList<String> getValueOfProperty(String instanceIdentificationNumber, String propertyName)
instanceIdentificationNumber
- Instance identification number (Unique Id of the instance).propertyName
- Property of interest.
public HashMap<String,ArrayList<String>> getRelatedInformationOfGivenClassInstance(String classOfInterest, String instanceIdentificationNumber)
classOfInterest
- Class of interest.instanceIdentificationNumber
- Instance identification number.
public HashMap<String,String> getAvailableDisplayProperties(String classOfInterest)
classOfInterest
- Class of interest (if used null, the class of current interest, which was defined when you create the object, is applied).
public ArrayList<String> getSubclassesOfGivenPropertyRange(String propertyName)
propertyName
- Property of interest.
public String getRangeOfPropertyWRTcurretClass(String propertyName)
propertyName
- Property of interest.
public String getCustomLabel(String classOfInterest, String propertyName)
classOfInterest
- Class of interest.propertyName
- Property of interest.
public void setCurrentClassOfInterest(String newClassOfInterest)
newClassOfInterest
- New class of interest.public void setCurrentApplicationPath(String newAppPath)
newAppPath
- New application path.public String getCurrentClassOfInterest()
public void setOntologyModel(com.hp.hpl.jena.ontology.OntModel ontologyModel)
ontologyModel
- New model to be set.public com.hp.hpl.jena.ontology.OntModel getOntologyModel()
public String getNamespace()
public HashMap<String,String> getConfig()
public ArrayList<String> searchInstances(String propertyName, String operator, String literalValue, String referenceValue)
propertyName
- Name of the property.operator
- Operator for the condition (Possible operators are are literalValue
- Literal value of the property.referenceValue
- Resource value of the property.
public OntologyProcessing getOntologyProcessingInstance()
public ArrayList<String> getPaths()
public static ArrayList<String> getPaths(String root)
appRelPath
- Searching directory path.
public boolean hasPropertyValueForInstanceWithGivenID(String instanceIdentificationNumber, String propertyName)
instanceIdentificationNumber
- Identification number of the instance.propertyName
- Property of interest.
public boolean isValidResourceInThisNS(String resourceName)
resourceName
- Resource to be tested.
public abstract boolean isInIncludedProperties(String propertyName, int propertyClassification)
propertyName
- Property of interest.propertyClassification
- Property type (Types are defined as Constants (Start with the word 'PROPERTY_CLASSIFICATION_') in ApplicationTemplate class and callable.)
public abstract ArrayList<String> getAllPropertiesInvolved(String classOfInterest)
classOfInterest
- Class of interest.
public String getAppRelPath()
public ArrayList<String> searchInstancesOfGivenConditions(ArrayList<String> properties, ArrayList<String> operators, ArrayList<String> literalValues, ArrayList<String> resourceValues)
properties
- Collection of properties.operators
- Collection of operators (Possible operators are literalValues
- Collection of Literal values.resourceValues
- Collection of reference values.
public ArrayList<String> getAllInstanceURNs()
public ArrayList<String> getAllInstanceUniqueIDs()
public String getPkeyValueGivenURN(String urn)
urn
- URN/IRI of the resource.
public HashMap<String,ArrayList<String>> getInformationOfGivenInstanceURN(String urn)
urn
- URN/IRI of the resource.
public HashMap<String,String> getStruturalInfoOfURN(String urn)
urn
- Input URN.
public String getURNofID(String uniqueID)
uniqueID
- Input unique ID of resource.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |