C# 클래스 mergedServices.SPARQLQueryBuilder

파일 보기 프로젝트 열기: sherifkandeel/weet-it_WCF 1 사용 예제들

공개 메소드들

메소드 설명
SPARQLQueryBuilder ( ) : System

The constructor of the class, initiates the vars

buildQueries ( string object1, string object2, int maxDistance, int limit, List ignoredObjects = null, List ignoredProperties = null, int avoidCycles ) : List

Builds and returns a set of queries to find relations between two object1 and object2.

비공개 메소드들

메소드 설명
completeQuery ( string coreQuery, Dictionary options, Dictionary vars ) : string

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 options ) : string

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 options ) : string

Returns a query for getting a direct connection from $object1 to $object2.

expandTerms ( List terms, string ooperator = "&&" ) : string

puts bracket around the (filterterms) and concatenates them with &&

generateFilter ( Dictionary options, Dictionary vars ) : string

generates the necessary Filters

getQueries ( string object1, string object2, int distance, int limit, List ignoredObjects = null, List ignoredProperties = null, int avoidCycles ) : List>.Dictionary

Return a set of queries to find relations between two objects.

listToString ( List inputList ) : string

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

메소드 상세

SPARQLQueryBuilder() 공개 메소드

The constructor of the class, initiates the vars
public SPARQLQueryBuilder ( ) : System
리턴 System

buildQueries() 공개 메소드

Builds and returns a set of queries to find relations between two object1 and object2.
public buildQueries ( string object1, string object2, int maxDistance, int limit, List ignoredObjects = null, List ignoredProperties = null, int avoidCycles ) : 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
리턴 List