Method | Description | |
---|---|---|
SPARQLQueryBuilder ( ) : System |
The constructor of the class, initiates the vars
|
|
buildQueries ( string object1, string object2, int maxDistance, int limit, List |
Builds and returns a set of queries to find relations between two object1 and object2.
|
Method | Description | |
---|---|---|
completeQuery ( string coreQuery, Dictionary |
is thefunction that takes the Sparql Query from Direct and ConnectViamiddleObject functions and complete it it takes the part after where {.... , and completes it depending on the options
|
|
connectedViaAMiddleObject ( string first, string second, int dist1, int dist2, bool toObject, Dictionary |
Return a set of queries to find relations between two objects which are connected via a middle objects $dist1 and $dist2 give the distance between the first and second object to the middle they have ti be greater that 1
|
|
direct ( string object1, string object2, int distance, Dictionary |
Returns a query for getting a direct connection from $object1 to $object2.
|
|
expandTerms ( List |
puts bracket around the (filterterms) and concatenates them with &&
|
|
generateFilter ( Dictionary |
generates the necessary Filters
|
|
getQueries ( string object1, string object2, int distance, int limit, List |
Return a set of queries to find relations between two objects.
|
|
listToString ( List |
takes a list and converts it to a string(list must be of count 1)
|
|
stringToLoist ( string input ) : List |
takes a string and converts it to a list of strings of count1
|
|
toPattern ( string s, string p, string o, bool toObject ) : string |
this function puts the query terms subject, predicate, object
|
|
uri ( string x ) : string |
takes the object name and returns the URI link to easily use in Sparql Query
|
public buildQueries ( string object1, string object2, int maxDistance, int limit, List |
||
object1 | string | object1 |
object2 | string | object2 |
maxDistance | int | MaxiumDistance between the two objects |
limit | int | Limit of results |
ignoredObjects | List |
List of strings of names of objects be ignored in the Queries for example : http://dbpedia.org/resource/thing |
ignoredProperties | List |
List of strings of names of properties to be ignored in the Queries |
avoidCycles | int | Integer value which indicates whether we want to suppress cycles , 0 = no cycle avoidance , 1 = no intermediate object can be object1 or object2 , 2 = like 1 + an object can not occur more than once in a connection |
return | List |