Class InterfaceMatchMaker
- java.lang.Object
-
- fi.tut.mei.matchmaking.process.interfacemm.InterfaceMatchMaker
-
- All Implemented Interfaces:
IClearResults,IInterfaceMatchMaker
public class InterfaceMatchMaker extends Object implements IInterfaceMatchMaker, IClearResults
Performs the Interface Matchmaking process.- Author:
- Niko Siltala
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classInterfaceMatchMaker.InputResourcesClass storing the input resource list as structure of RDs and RIDs-
Nested classes/interfaces inherited from interface fi.tut.mei.matchmaking.process.interfacemm.IInterfaceMatchMaker
IInterfaceMatchMaker.eMatchingLevel
-
-
Field Summary
Fields Modifier and Type Field Description protected static StringJAR_IFMM_QUERY_TEMPLATES_LOCATIONLocation of the Interface Matchmaking queries inside the compiled jarprotected static StringMAIN_RESOURCES_LOCATIONprotected static StringNOT_EXISTING_IF_STD_CODEprotected static StringNOT_EXISTING_IF_STD_CODE_IMPLEMENTATIONprotected static StringNOT_EXISTING_IF_STD_CODE_NAMESPACEprotected static StringQUERY_TEMPLATE_LOCATION
-
Constructor Summary
Constructors Constructor Description InterfaceMatchMaker(fi.tut.mei.capabilityQueryLib.Client ontoclient)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanareConnectable_Gid(List<String> resources)Test are given resources connectable with each othervoidclearAllResults()Clear All results related markers and connections assigned for this instancevoidclearConnections()Clear all connections found for this instancevoidclearMarkers()Clears markers used for resultsStringgetDefaultNamespaceURI()IInterfaceMatchMaker.eMatchingLevelgetMatchingLevel()List<String>hasNoInterfaces(List<String> resources)Test if resource(s) has no interface definitions.protected StringloadSparqlTemplate(String name)IfMatchResultmakeInterfaceMatch_Gid(List<String> resources)Test are given resources connectable with each othervoidsetDefaultNamespaceURI(String defaultNamespaceURI)voidsetMatchingLevel(IInterfaceMatchMaker.eMatchingLevel level)Sets target interface matching level
-
-
-
Field Detail
-
JAR_IFMM_QUERY_TEMPLATES_LOCATION
protected static final String JAR_IFMM_QUERY_TEMPLATES_LOCATION
Location of the Interface Matchmaking queries inside the compiled jar- See Also:
- Constant Field Values
-
MAIN_RESOURCES_LOCATION
protected static final String MAIN_RESOURCES_LOCATION
- See Also:
- Constant Field Values
-
QUERY_TEMPLATE_LOCATION
protected static final String QUERY_TEMPLATE_LOCATION
- See Also:
- Constant Field Values
-
NOT_EXISTING_IF_STD_CODE
protected static final String NOT_EXISTING_IF_STD_CODE
- See Also:
- Constant Field Values
-
NOT_EXISTING_IF_STD_CODE_NAMESPACE
protected static final String NOT_EXISTING_IF_STD_CODE_NAMESPACE
- See Also:
- Constant Field Values
-
NOT_EXISTING_IF_STD_CODE_IMPLEMENTATION
protected static final String NOT_EXISTING_IF_STD_CODE_IMPLEMENTATION
- See Also:
- Constant Field Values
-
-
Method Detail
-
areConnectable_Gid
public boolean areConnectable_Gid(List<String> resources) throws GeneralIfMMException, ResourceNotFoundException
Description copied from interface:IInterfaceMatchMakerTest are given resources connectable with each other- Specified by:
areConnectable_Gidin interfaceIInterfaceMatchMaker- Parameters:
resources- List of tested resources. Full URI with namespace is expected.- Returns:
- true if all resources on the list are connectable with each other, and no resource is left unconnected.
- Throws:
GeneralIfMMExceptionResourceNotFoundException
-
makeInterfaceMatch_Gid
public IfMatchResult makeInterfaceMatch_Gid(List<String> resources) throws GeneralIfMMException, ResourceNotFoundException
Description copied from interface:IInterfaceMatchMakerTest are given resources connectable with each other- Specified by:
makeInterfaceMatch_Gidin interfaceIInterfaceMatchMaker- Parameters:
resources- List of tested resources. Full URI with namespace is expected.- Returns:
- interface matchmaking result
- Throws:
GeneralIfMMExceptionResourceNotFoundException
-
hasNoInterfaces
public List<String> hasNoInterfaces(List<String> resources)
Description copied from interface:IInterfaceMatchMakerTest if resource(s) has no interface definitions.- Specified by:
hasNoInterfacesin interfaceIInterfaceMatchMaker- Parameters:
resources- List of tested resources- Returns:
- List of resources, which have not interface definitions made, and thus cannot be connected with any other resource.
-
getMatchingLevel
public IInterfaceMatchMaker.eMatchingLevel getMatchingLevel()
- Returns:
- the matchingLevel
-
setMatchingLevel
public void setMatchingLevel(IInterfaceMatchMaker.eMatchingLevel level)
Description copied from interface:IInterfaceMatchMakerSets target interface matching level- Specified by:
setMatchingLevelin interfaceIInterfaceMatchMaker- Parameters:
level- until which detail interface matchmaking is performed
-
clearAllResults
public void clearAllResults()
Description copied from interface:IClearResultsClear All results related markers and connections assigned for this instance- Specified by:
clearAllResultsin interfaceIClearResults
-
clearMarkers
public void clearMarkers()
Description copied from interface:IClearResultsClears markers used for results- Specified by:
clearMarkersin interfaceIClearResults
-
clearConnections
public void clearConnections()
Description copied from interface:IClearResultsClear all connections found for this instance- Specified by:
clearConnectionsin interfaceIClearResults
-
getDefaultNamespaceURI
public String getDefaultNamespaceURI()
- Returns:
- the defaultNamespaceURI
-
setDefaultNamespaceURI
public void setDefaultNamespaceURI(String defaultNamespaceURI)
- Parameters:
defaultNamespaceURI- the defaultNamespaceURI to set
-
loadSparqlTemplate
protected String loadSparqlTemplate(String name) throws IOException
- Throws:
IOException
-
-