-
Notifications
You must be signed in to change notification settings - Fork 0
Home
alexjannis edited this page Jun 20, 2014
·
4 revisions
##parameters
- search_query
- terminologies
- format
- first_hit
- match_type
res = "" <- this will hold the search result
if no terminologies given{
if first_hit = true
return error
//first local search
res = do local search in Virtuoso on query, format and match_type
//now external search
for each service in external webservice list {
//we will skip all services which dont support our format andor match_type
if (format is given) and (service does not support this format)
skip to next service
if (match_type is given) and (service does not support matching)
skip to next service
service do search on query
add search result to res
}
return res
}
else terminologies are given{
for each termi in terminologies{
if external service list contains a service with acronym=termi{
//we will skip all services which dont support our format andor match_type
if (format is given) and (service does not support this format)
skip to next service
if (match_type is given) and (service does not support matching)
skip to next service
service do search on query
add search result to res
if (search result is not empty) and (first_hit = true)
return res
}
else if termi is in local virtuoso {
do local search in Virtuoso on query, format and match_type
add search result to res
if (search result is not empty) and (first_hit = true)
return res
}else{
cant find termi local or external ignore that
}
} //end for
return res
}
this process beyond supports the following use cases:
- terminologies holds:
- nothing: it will search internal and external
- only local stuff: it will search only local
- only external stuff: it will search only external
- mixed acronyms: it will check which one is local and which one is external befor performing the search
- undefined acronyms: they will be ignored
- if format or match_type is set
- if an external service was listes with its acronym in terminologies and it doent support the match_type or the format, it will be skipped
- otherwise it will perform the search
- if first_hit is true:
- if no terminologies are given, the process will be cancelled
- otherwise i will break after the first not empty search result