Semantic web final assignment

  • 748 views
Uploaded on

Semantic web final assignment, We've used Sqvizler to build our own semantic web application. The application prototype was used to show the possibilites of finding all popular spots in the region of …

Semantic web final assignment, We've used Sqvizler to build our own semantic web application. The application prototype was used to show the possibilites of finding all popular spots in the region of a university. The data which is used for this application comes from several datasources; respectively dbpedia.org, linkedgeodata.org and a local database with university information.

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
748
On Slideshare
0
From Embeds
0
Number of Embeds
1

Actions

Shares
Downloads
24
Comments
0
Likes
1

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1.     ‘My College Spot’ “The App for foreign students”      By: Selvi Ratnasingan Barry KolleeGroup number: 41Assignment: Final assignmentCourse: Semantic Web
  • 2.  InhoudApplication and Knowledge Design ................................................................ 3 1. Description of our ontology. ................................................................... 3 2. Consider reusing existing ontologies. .................................................... 3 3. Enumerate important terms in the ontology. .......................................... 4 4. Define the classes and the class hierarchy. .......................................... 5 5. Define the classes and the class hierarchy. .......................................... 6 6. Define the properties of these properties. ............................................. 7Integrating Information ................................................................................... 10 Get RDF from timesharing database .......................................................... 10 Data from external ontologies .................................................................... 10 DBPedia (for collecting information about universities) .......................... 11 LinkedGeoData ....................................................................................... 12 DBPedia (for collecting information about the spots) ............................. 13 RDF-files we used to query data ................................................................ 13Application Interface ...................................................................................... 15Appendixes .................................................................................................... 18         2   MY  COLLEGE  SPOT    
  • 3. Application and Knowledge Design  Firstly we designed our ontology according to the ontology buildingmethodology. 1. Description of our ontology.The domain of our ontology is ‘Spot’s nearby Universities’. Our goal is to give usersof our application the opportunity to get information about all kinds of ‘spots’ nearbyuniversities. Examples of these sightseeing spots are museums, monuments andrestaurants.Our first priority is to let our application support a distance measurer, where wecompare the geolocation (longitude & latitude) of the selected university and the‘spot’ where the user refers to.With the names of our ‘spot’ in mind we can get lots of information from the webwhich gives information about our ‘spot’. We want to create a small pocket guidewhich shows: • Main info; give users insight in a description of the ‘spot’. • Year; the year that the ‘spot’ has been created or built. • Number of visitors; this will be the indicator of the popularity of the spot. • Geolocation; this info is critical to compare the distance between the user’s university and the actual ‘spot’.QueriesTo get all required information we need to perform several queries throughout theweb. Coupled to the information we need we can state that we need to perform thefollowing queries. These queries listed below should • getSpotsNearbyUniversity: o getGeoLocationOfUniversity: o getGeoLocationOfSpot: • getMainInfoOfSpot: • getFoundingYearOfSpot: • getNumberOfVisitors: • getGeoLocationOfSpot: 2. Consider reusing existing ontologies.To make an application which fullfills the requirements we need, we’ve chosen toinclude the following ontologies: • LinkedGeoData. This is the main ontology which we need because our first priority is to compare the geolocation of the universtity with our ‘spot’. We need to get the geolocation of the requested university and ‘spot’, the type of ‘spot’, and the names of the ‘spot’s’ nearby from geonames.org. We can state that we need the following types: o GeoMetry o Longitude o Latitude o Name • DBpedia. We want to use DBpedia to cover our small pocket guide. If we’re able to retrieve all the names of the ‘spot’s’ we’ve requested we should be MY  COLLEGE  SPOT   3      
  • 4. able to get some information about our ‘spot’s’ from DBpedia. The information from DBpedia which we need are. o Abstract (regular information about the ‘spot’) o NumberOfVisitors o FoundingYear • We also make use of the university database which covers 200 Universities throughout the world. This database is filled with names and ratings of several universities. In our concept we are only interested in the name of the university. o NameOfUniversity o Ratings 3. Enumerate important terms in the ontology.We’ve thought of important terms throughout our brainstorm which should cover theconcept and goal we want to establish. • Sightseeing o Museums o Monument o Theater o Zoo o Park o Restaurant • University • Location o City o Country o Geolocation • Departments • Type Of spot • To see, to eat, to relax • International rating • Number of Visitors • Famous people • Description of spot • Founding year • Cultural / non-Cultural 4   MY  COLLEGE  SPOT    
  • 5. 4. Define the classes and the class hierarchy.With the terms of brainstorm session we started to define classes and thenwe thought about the hierarchical relationship between classes. As you cansee we divided the spots into Cultural and Non-Cultural Spots. MY  COLLEGE  SPOT   5      
  • 6. 5. Define the propertiesAfter writing the properties for each classes we find out that some classeshave same literal properties like name, abstract, etc. So we defined one newclass for this common properties, BasicClass, as shown in the figure below.In this diagram the data type properties are displayed under their ownclasses. For example GeoLocation has latitude and longitude as data typeproperties. 6   MY  COLLEGE  SPOT    
  • 7. 6. Define the properties of these properties.In step 6 we define properties of defined properties and that means we add moreinformation to the properties. Besides of symmetric and inverse properties weintroduced in this step a restriction class which based on the property“distanceBetween” . In this diagram the inverse properties are in red color andsymmetric properties are in blue. MY  COLLEGE  SPOT   7      
  • 8. In the ontology we define the restriction class ‘NearbySpot’as follows:rankings:NearbySpot rdfs:subClassOf rankings:Spot ; rdfs:subClassOf [ rdf:type owl:Restriction ; owl:onPropertyrankings:distanceBetween ; owl:hasValue [ rdf:type rdfs:Datatype ; owl:onDatatype xsd:float ; owl:withRestriction ( [xsd:maxExclusive"5"^^xsd:float] ) ] ] .     8   MY  COLLEGE  SPOT    
  • 9. After inferencing we get the following diagram of ontology. The green color showsthe equivalent class of the particular class and the equivalent properties aredisplayed between the brackets.For inferencing we followed the steps below: • Syntax comparison (like searching for classes with same labels) • Hierarchy comparison (like common parents of instances) (we pick one or two instances of different countries and searching for common parents) MY  COLLEGE  SPOT   9      
  • 10. Integrating InformationWe now have a clear view on what our ontology should look like and we’re ready tosearch for the components which we want to use in our application.Get RDF from timesharing databaseAt first we started of with creating our own local database consisting of RDF. We’veused the timeshigher.sql file to build a mapping file. Within this mapping file we’verenamed the naming conventions of every subclass of the universities.Because we’d like to perform queries to the DBpedia pages of the universities we’veadjusted a small part of the mapping file which is needed for the program D2RQ.We wanted to have a direct useable URI object where we could query DBpedia withdirectly. We’ve done this by adding the value uriPattern1 to the university it’s name.For generating RDF dump of our database we’ve used the program D2RQ. Thisprogram allows us to build the .ttl files which holds all information of timesharingdatabase what we need for our semantic web application. This .ttl file consists of anN-Triple syntax. These dump files are necessary for us to perform queries to andeventually to give the requested data we need.Data from external ontologiesThe most important information which we need is the ‘names’ of all the universitieswhich are listed in the timeshigher.sql file. We want to reuse the name of theuniversity to perform several queries to dbpedia.org and linkedgeodata.org.Because of the complexity of our application we decided to copy the data from theexternal ontologies as a dump file. For getting all the info we need we perform thefollowing queries:                                                                                                                11  d2rq:uriPattern  "http://dbpedia.org/resource/@@rankings.university|urlify@@";   10   MY  COLLEGE  SPOT    
  • 11. DBPedia (for collecting information about universities)Get the DBPedia resources of all the universities which we request. To giveinformation about the university we perform queries for we use several propertieswhich are listed in the DBpedia pages for a university • Abstract (main info about the requested university) • City (place where the university is located) • Country (country where the university is located) • Image (image of the university) • Latitude • Longitude prefix rankings: <http://www.example.org/vocab/> construct { ?uni rankings:country <http://dbpedia.org/resource/Netherlands> ; rankings:city ?city ; rankings:image ?image ; rankings:abstract ?abstract; rankings:long ?long ; rankings:lat ?lat ; rankings:name ?name . } WHERE { ?uni rdf:type <http://dbpedia.org/ontology/EducationalInstitution> . ?uni <http://dbpedia.org/ontology/country> <http://dbpedia.org/resource/Netherlands> . ?uni <http://dbpedia.org/property/city> ?city . ?uni <http://dbpedia.org/property/name> ?name . ?uni <http://dbpedia.org/ontology/thumbnail> ?image . ?uni <http://dbpedia.org/ontology/abstract> ?abstract . ?uni <http://www.w3.org/2003/01/geo/wgs84_pos#long> ?long . ?uni <http://www.w3.org/2003/01/geo/wgs84_pos#lat> ?lat . FILTER(langMatches(lang(?name), "EN") && langMatches(lang(?abstract), "EN") )    In this query as you see we get only information of the universities in TheNetherlands, because of memory issues we decided to scope our application onlyin The Netherlands. MY  COLLEGE  SPOT   11    
  • 12. LinkedGeoDataWe use linkedgeodata to check if a certain spot is within a particular range of theuniversity. With the query listed below we want to receive the following information ofall the retrieved results. • Longitude (is a part of the geolocation) • Latitude (is a part of the geolocation) • Name of the spot.The following query is utilized to compare the geolocation of university and spots toget all tourist spots within a radius of 5 km.Prefix lgd: <http://linkedgeodata.org/>Prefix lgdo: http://linkedgeodata.org/ontology/Select ?spot ?name ?spotgeofrom <http://linkedgeodata.org> { ?uni owl:sameAs<http://dbpedia.org/resource/University_of_Amsterdam> . ?uni geo:geometry ?unigeo . ?spot a lgdo:Tourism . OPTIONAL { ?spot rdfs:label ?name . } ?spot geo:geometry ?spotgeo . Filter(bif:st_intersects(?unigeo, ?spotgeo, 5))}  In this query we are giving in two inputs. • Type of spot (i.e. Tourism, Theatre, SportsCentre, Monument and others) • DBpedia resource of the spot where we should compare withIn our demo application we’ve only used the University of Amsterdam as theDBPedia input. 12   MY  COLLEGE  SPOT    
  • 13. DBPedia (for collecting information about the spots)With the above information we are already able to give a map view of all theuniversities inside the timeshigher.sql file and the spots where we want to refer to.To give a more broader view on all the ‘spots’ nearby the university we want toperform some queries to DBpedia.org. We do this for retrieving the info of all thespots nearby the requested university. The info which we want to retrieve is: • Name (The name of the requested spot) • Abstract (a small description of the spot) • Image (image of the spot) • Founding year (for some spots we want to give info about the founding year, i.e. monuments) • Number of visitors (for some spots we want to give an indicator of it’s popularity. We do this with the number of visitors) • Year completed (for some spots we want to show the completion year (i.e. a church)). • Resting place of, (in some cases we want to show the persons resting place of a spot. (i.e. Gaudi of the ‘Sagrada Familia’ in Barcelona)Within this querie we request for main info about the requested spot. This spot isretrieved via the geolocation comparison query. In the example listed below *name*is the name of the requested spot. The implementation of the data of this spot isn’timplemented inside the demo application. But we can state that we would be ableto implement this pretty easily and reuse the data which is generated by this query.CONSTRUCT { <http://dbpedia.org/resource/*name*> ?p ?o . ?s ?p2 <http://dbpedia.org/resource/*name*>.}WHERE { { <http://dbpedia.org/resource/*name*> ?p ?o } UNION { ?s ?p2 <http://dbpedia.org/resource/*name*> }}     MY  COLLEGE  SPOT   13    
  • 14. RDF-files we used to query data • Our own ontology. In this file we define the class Ranking. This has 2 properties which we use in our web application. These two properties which we want to reuse in our application. o The name of the university o The rank of the university • The university data, within this file all the info from the timeshigher database is listed. In here we also define our direct URL to the DBpedia page from the actual university. • Individual information of every university. This file holds all the information which we need from every single university for our application. The content of this a dump file is from DBpedia.org. • Location based information about the university and the spots nearby. We want to know what the exact geolocation is of the requested university. We also need to reuse this longitude and latitude to get some spots. We are interested in the geolocation of the universities and spots and the names of the spots. This information should be retrieved from linkedgeodata.org and geonames.org. • Information about spots. We want to give some information (abstract) about the spots and the properties which are listed in our own ontology (i.e. numberOfVisitors). This information is being retrieved from DBpediaTo finish up our setup and to get information about the spots and the universities weneeded to setup a SPARQL server which enables us to perform queries on ourlocalhost. For retrieving our final goal we’ve configured Joseki2. We place all thecreated dump files into Joseki together with our own ontology (the university list)and Joseki has been configured completely.                                                                                                                    2  http://www.joseki.org/   14   MY  COLLEGE  SPOT    
  • 15. Application InterfaceWith Joseki installed and our RDF files in place we’re ready to go to perform ourSPARQL queries to all our dump files we created. Within our localhost we useSPARQLer to give us the results on certain requests we make. These requests willbe used later on within the top layer of our application. The results of these requestswill be displayed later on within the web browse. The actual result of our websiteand the html code which we used can be found in the appendix.List of queries which we used to display the information on our webpage:Query 1: Get a particular University from the timeshigher database based onit’s rank and give regular info about this universityPREFIX rankings: <http://www.example.org/vocab/>PREFIX dc: <http://purl.org/dc/elements/1.1/>prefix dbpedia: <http://dbpedia.org/ontology/#>prefix owl: <http://www.w3.org/2002/07/owl#>prefix xsd: <http://www.w3.org/2001/XMLSchema#>prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> SELECT ?Name ?Abstract ?Rank WHERE{ ?uni rankings:idOfRanking 92^^xsd:integer . ?uni rankings:orderOfRanking ?Rank . ?uni rankings:belongsTo ?link . ?link rankings:name ?Name . ?link rankings:abstract ?Abstract . } LIMIT 10Query 2: Get the name and location of the university based on it’s idOfRankingPREFIX rankings: <http://www.example.org/vocab/>PREFIX dc: <http://purl.org/dc/elements/1.1/>prefix dbpedia: <http://dbpedia.org/ontology/#>prefix owl: <http://www.w3.org/2002/07/owl#>prefix xsd: <http://www.w3.org/2001/XMLSchema#>prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>SELECT ?lat ?long ?name ?uni WHERE{ ?uni rankings:idOfRanking 92^^xsd:integer . ?uni rankings:belongsTo ?link . ?link rankings:name ?name . ?link rankings:lat ?lat . ?link rankings:long ?long .        } MY  COLLEGE  SPOT   15    
  • 16.  Query 3: Compare the geolocation of the university and spots nearby and getall the tourist spots within a radius of 5 km.PREFIX rankings: <http://www.example.org/vocab/>PREFIX dc: <http://purl.org/dc/elements/1.1/>prefix dbpedia: <http://dbpedia.org/ontology/#>prefix owl: <http://www.w3.org/2002/07/owl#>prefix xsd: <http://www.w3.org/2001/XMLSchema#>prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>SELECT ?Touristspot WHERE{ ?uni rankings:idOfRanking 92^^xsd:integer . ?uni rankings:belongsTo ?link . ?link rankings:name ?name . ?link rankings:abstract ?abstract . ?spot rankings:isNearBy ?link . ?spot rankings:name ?Touristspot . ?spot rankings:hasGeo ?spotGeo .}     16   MY  COLLEGE  SPOT    
  • 17. The demo setupTo use our application in an onlineenvironment where we candisplay the content to the user weneed to be able to host ourapplication and give it a front end.We do this by using the toolSGVizler. We imported the givenqueries within our .html code fordisplaying our data withincomponents which are availablewithin SGVizler. Both the sourcecode and the screenshots of ourfinal demo application can befound in the Appendixes.     MY  COLLEGE  SPOT   17    
  • 18. Appendix 1: D2RQ Mapping file  @prefix map: <#> .@prefix db: <> .@prefix vocab: <vocab/> .@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .@prefix jdbc: <http://d2rq.org/terms/jdbc/> .@prefix owl: <http://www.w3.org/2002/07/owl#> .map:database a d2rq:Database; d2rq:jdbcDriver "com.mysql.jdbc.Driver"; d2rq:jdbcDSN "jdbc:mysql://localhost:3306/VUDatabase"; d2rq:username "root"; d2rq:password "test"; jdbc:autoReconnect "true"; jdbc:zeroDateTimeBehavior "convertToNull"; .# Table rankingsmap:rankings a d2rq:ClassMap; d2rq:dataStorage map:database; d2rq:uriPattern "rankings/@@rankings.id@@"; d2rq:class vocab:rankings; d2rq:classDefinitionLabel "rankings"; .map:rankings__label a d2rq:PropertyBridge; d2rq:belongsToClassMap map:rankings; d2rq:property rdfs:label; d2rq:pattern "rankings #@@rankings.id@@"; .map:rankings_id a d2rq:PropertyBridge; d2rq:belongsToClassMap map:rankings; d2rq:property vocab:idOfRanking; d2rq:propertyDefinitionLabel "rankings id"; d2rq:column "rankings.id"; d2rq:datatype xsd:integer; .map:rankings_order a d2rq:PropertyBridge; d2rq:belongsToClassMap map:rankings; d2rq:property vocab:orderOfRanking; d2rq:propertyDefinitionLabel "rankings order"; d2rq:column "rankings.order"; d2rq:datatype xsd:integer; .map:rankings_university a d2rq:ObjectPropertyBridge; d2rq:belongsToClassMap map:rankings; d2rq:property vocab:belongsTo ; d2rq:propertyDefinitionLabel "rankings university"; d2rq:uriPattern "http://dbpedia.org/resource/@@rankings.university|urlify@@"; .map:rankings_overall_score a d2rq:PropertyBridge; d2rq:belongsToClassMap map:rankings; d2rq:property vocab:overallScoreOfRanking; d2rq:propertyDefinitionLabel "rankings overall_score"; d2rq:column "rankings.overall_score"; d2rq:datatype xsd:double; .map:rankings_teaching a d2rq:PropertyBridge; d2rq:belongsToClassMap map:rankings; d2rq:property vocab:teachingRanking; d2rq:propertyDefinitionLabel "rankings teaching"; d2rq:column "rankings.teaching"; d2rq:datatype xsd:double; .map:rankings_international_mix a d2rq:PropertyBridge; d2rq:belongsToClassMap map:rankings; d2rq:property vocab:internationalMixOfRanking; d2rq:propertyDefinitionLabel "rankings international_mix"; d2rq:column "rankings.international_mix"; d2rq:datatype xsd:double; .map:rankings_industry_income a d2rq:PropertyBridge; d2rq:belongsToClassMap map:rankings; 18   MY  COLLEGE  SPOT    
  • 19. d2rq:property vocab:industryIncomeOfRanking; d2rq:propertyDefinitionLabel "rankings industry_income"; d2rq:column "rankings.industry_income"; d2rq:datatype xsd:double; .map:rankings_research a d2rq:PropertyBridge; d2rq:belongsToClassMap map:rankings; d2rq:property vocab:researchRanking; d2rq:propertyDefinitionLabel "rankings research"; d2rq:column "rankings.research"; d2rq:datatype xsd:double; .map:rankings_citations a d2rq:PropertyBridge; d2rq:belongsToClassMap map:rankings; d2rq:property vocab:citationsRanking; d2rq:propertyDefinitionLabel "rankings citations"; d2rq:column "rankings.citations"; d2rq:datatype xsd:double; . MY  COLLEGE  SPOT   19    
  • 20. Appendix 2: Our ontology  @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .@prefix owl: <http:// www.w3.org/2002/07/owl#> .@prefix dbp-owl: <http://live.dbpedia.org/ontology/#> .@prefix dbp-prop: <http://live.dbpedia.org/property/#> .@prefix dbp-yago: <http://dbpedia.org/class/yago/#> .@prefix geo: <http://www.w3.org/2003/01/geo/wgs84_pos#> .@prefix rankings: <http://www.example.org/vocab/#> .rankings:BasicClass a rdfs:Class .rankings:name a rdfs:Property ; rdfs:domain rankings:BasicClass; rdfs:range xsd:string .rankings:name owl:equivalentProperty dbp-prop:name .rankings:abstract a rdfs:Property; rdfs:domain rankings:BasicClass; rdfs:range xsd:string .rankings:abstract owl:equivalentProperty dbp-owl:abstract .rankings:image a rdfs:Property ; rdfs:domain rankings:BasicClass; rdfs:rangexsd:string .rankings:image owl:equivalentProperty dbp-owl:thumbnail .rankings:University a rdfs:Class; rdfs:subClassOFrankings:BasicClass ; rdfs:subClassOfrankings:GeoLocation .rankings:University owl:equivalentClass dbp-owl:University .rankings:Ranking a rdfs:Class .rankings:orderOfRanking a rdfs:Property; rdfs:domain rankings:Ranking ; rdfs:range xsd:integer .rankings:belongsTo a rdfs:Property; rdfs:domain rankings:Ranking; rdfs:range rankings:University .rankings:has a rdfs:Property; rdfs:domain rankings:University; rdfs:range rankings:Ranking .rankings:has owl:inverseOf rankings:belongsTo .rankings:GeoLocation a rdfs:Class .rankings:GeoLocation owl:equivalentClass geo:GeoMetry .rankings:lat a rdfs:Property ; rdfs:domain rankings:GeoLocation; rdfs:range xsd:float .rankings:lat owl:equivalentProperty geo:lat .rankings:long a rdfs:Property ; rdfs:domain rankings:GeoLocation; rdfs:range xsd:float .rankings:long owl:equivalentProperty geo:long . 20   MY  COLLEGE  SPOT    
  • 21. rankings:Country a rdfs:Class; rdfs:subClassOf rankings:BasicClass ; rdfs:subClassOfrankings:GeoLocation .rankings:Country owl:equivalentClass dbp-owl:Country .rankings:City a rdfs:Class; rdfs:subClassOf rankings:BasicClass ; rdfs:subClassOfrankings:GeoLocation .rankings:City owl:equivalentClass dbp-owl:City .rankings:parentCountry a rdfs:Property ; rdfs:domain rankings:Country;rdfs:range rankings:City .rankings:Spot a rdfs:Class; rdfs:subClassOF rankings:BasicClass ; rdfs:subClassOfrankings:GeoLocation .rankings:Spot owl:equivalentClass dbp-owl:Organisation .rankings:distanceBetween rdf:type owl:symmetricProperty; rdfs:domain rankings:University; rdfs:rangerankings:Spot .rankings:NearbySpot rdfs:subClassOf rankings:Spot ; rdfs:subClassOf [ rdf:type owl:Restriction ; owl:onPropertyrankings:distanceBetween ; owl:hasValue [ rdf:type rdfs:Datatype ; owl:onDatatype xsd:float ; owl:withRestriction ( [xsd:maxExclusive"5"^^xsd:float] ) ] ] .rankings:Cultural_Spot a rdfs:Class; rdfs:subClassOf rankings:Spot .rankings:Non-cultural_Spot a rdfs:Class; rdfs:subClassOfrankings:Spot .rankings:established a rdfs:Property; rdfs:domain rankings:Cultural_Spot;rdfs:range xsd:integer .rankings:established owl:equivalentProperty dbp-prop:established .rankings:yearCompleted a rdfs:Property; rdfs:domain rankings:Cultural_Spot;rdfs:range xsd:integer .rankings:yearCompleted owl:equivalentProperty dbp-prop:yearCompleted .rankings:Park a rdfs:Class; rdfs:subClassOf rankings:Non-cultural_Spot .rankings:Zoo a rdfs:Class; rdfs:subClassOf rankings:Non-cultural_Spot .rankings:Cafe a rdfs:Class; rdfs:subClassOf rankings:Non-cultural_Spot . MY  COLLEGE  SPOT   21    
  • 22. rankings:Restaurant a rdfs:Class; rdfs:subClassOf rankings:Non-cultural_Spot .rankings:Theater a rdfs:Class; rdfs:subClassOf rankings:Non-cultural_Spot .rankings:Church a rdfs:Class; rdfs:subClassOf rankings:Cultural_Spot .rankings:Monument a rdfs:Class; rdfs:subClassOfrankings:Cultural_Spot .rankings:Museum a rdfs:Class; rdfs:subClassOf rankings:Cultural_Spot .rankings:Art a rdfs:Class; rdfs:subClassOf rankings:BasicClass .rankings:has a rdfs:Property; rdfs:domain rankings:Museum; rdfs:rangerankings:Art .rankings:has owl:equivalentProperty dbp-prop:museum .rankings:isPlacedIn a rdfs:Property; rdfs:domain rankings:Art; rdfs:rangerankings:Museum .rankings:has owl:inverseOf rankings:isPlacedIn .rankings:Person a rdfs:Class; rdfs:subClassOf rankings:BasicClass .rankings:Person owl:equivalentClass dbp-owl:Person .rankings:birthDate a rdfs:Property; rdfs:domain rankings:Person; rdfs:range xsd:date .rankings:birthDate owl:equivalentProperty dbp-owl:birthDate .rankings:deathDate a rdfs:Property; rdfs:domain rankings:Person; rdfs:range xsd:date .rankings:deathDate owl:equivalentProperty dbp-owl:deathDate .rankings:createdBy a rdfs:Property; rdfs:domain rankings:Art; rdfs:rangerankings:Person .rankings:createdBy owl:equivalentProperty dbp-prop:artist .rankings:created a rdfs:Property; rdfs:domain rankings:Person; rdfs:rangerankings:Art .rankings:createdBy owl:inverseOf rankings:created . 22   MY  COLLEGE  SPOT    
  • 23. Appendix 3: Snippet of the Education information dump file@prefix ns0: <http://www.example.org/vocab/> .@prefix dbpedia: <http://dbpedia.org/resource/> .dbpedia:Eindhoven_University_of_Technology ns0:name "Eindhoven University ofTechnology"@en ; ns0:city dbpedia:Eindhoven .@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .dbpedia:Eindhoven_University_of_Technology ns0:lat "51.4481"^^xsd:float ; ns0:abstract "The Eindhoven University of Technology is a university oftechnology located in Eindhoven, Netherlands. The motto of the university is: Mensagitat molem (The mind brings matter into motion). The university was the second ofits kind in the Netherlands, only Delft University of Technology existed previously.Until mid-1980 it was known as the Technische Hogeschool Eindhoven (abbr. THE). In2011 QS World University Rankings placed Eindhoven at 146th internationally, but 61stglobally for Engineering & IT. Furthermore, in 2011 Academic Ranking of WorldUniversities (ARWU) rankings, TU/e was placed at the 52-75 bucket internationally inEngineering/Technology and Computer Science (ENG) category and at 34th placeinternationally in the Computer Science subject field."@en ; ns0:long "5.48972"^^xsd:float ; ns0:image <http://upload.wikimedia.org/wikipedia/commons/thumb/5/51/TU_Eindhoven.jpg/200px-TU_Eindhoven.jpg> ; ns0:country dbpedia:Netherlands .dbpedia:University_of_Twente ns0:name "University of Twente"@en ; ns0:city dbpedia:Enschede ; ns0:lat "52.2427"^^xsd:float ; ns0:abstract "University of Twente is a university located in Enschede,Netherlands. It offers research and degree programmes in the social and behavioralsciences and in engineering. In keeping with its entrepreneurial spirit, theUniversity is committed to making economic and social contribution to the region ofthe Netherlands where it is based. The UT collaborates with Delft University ofTechnology and Eindhoven University of Technology under the umbrella of the 3TU.Federation, and is also a partner in the European Consortium of InnovativeUniversities (ECIU)."@en ; ns0:long "6.85326"^^xsd:float ; ns0:image <http://upload.wikimedia.org/wikipedia/commons/thumb/4/43/University_of_Twente_logo_-_english_version.png/200px-University_of_Twente_logo_-_english_version.png> ; ns0:country dbpedia:Netherlands . MY  COLLEGE  SPOT   23    
  • 24. Appendix 4: Snippet of the spot information (in this snippetRijksmuseum is listed)@prefix dbpprop: <http://dbpedia.org/property/> .@prefix dbpedia: <http://dbpedia.org/resource/> .<http://dbpedia.org/resource/The_Milkmaid_(Vermeer)> dbpprop:museum dbpedia:Rijksmuseum .dbpedia:Pierre_Cuypers dbpprop:significantBuildings dbpedia:Rijksmuseum .@prefix dbpedia-owl: <http://dbpedia.org/ontology/> .dbpedia:Pierre_Cuypers dbpedia-owl:significantBuilding dbpedia:Rijksmuseum .<http://dbpedia.org/resource/The_Love_Letter_(Vermeer)> dbpprop:museum dbpedia:Rijksmuseum .<http://dbpedia.org/resource/Syndics_of_the_Drapersu0027_Guild> dbpprop:museum dbpedia:Rijksmuseum .dbpedia:The_Feast_of_Saint_Nicholas dbpprop:museum dbpedia:Rijksmuseum .dbpedia:The_Gallant_Conversation dbpprop:museum dbpedia:Rijksmuseum .dbpedia:The_Jewish_Bride dbpprop:museum dbpedia:Rijksmuseum .dbpedia:The_Floating_Feather dbpprop:museum dbpedia:Rijksmuseum .dbpedia:Holy_Kinship dbpprop:museum dbpedia:Rijksmuseum .dbpedia:Woman_in_Blue_Reading_a_Letter dbpprop:museum dbpedia:Rijksmuseum .<http://dbpedia.org/resource/The_Little_Street_(Vermeer)> dbpprop:museum dbpedia:Rijksmuseum .<http://dbpedia.org/resource/The_Night_Watch_(painting)> dbpprop:museum dbpedia:Rijksmuseum .@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .dbpedia:Rijksmuseum rdf:type dbpedia-owl:Building , dbpedia-owl:Museum , dbpedia-owl:Place , dbpedia-owl:ArchitecturalStructure .@prefix ns4: <http://schema.org/> .dbpedia:Rijksmuseum rdf:type ns4:Place , ns4:Museum .@prefix owl: <http://www.w3.org/2002/07/owl#> .dbpedia:Rijksmuseum rdf:type owl:Thing .@prefix yago: <http://dbpedia.org/class/yago/> .dbpedia:Rijksmuseum rdf:type yago:GeoclassMuseum .@prefix ns7: <http://www.opengis.net/gml/> .dbpedia:Rijksmuseum rdf:type ns7:_Feature , yago:NationalMuseumsOfTheNetherlands ; owl:sameAs <http://it.dbpedia.org/resource/Rijksmuseum_(Amsterdam)> .@prefix ns8: <http://pt.dbpedia.org/resource/> .dbpedia:Rijksmuseum owl:sameAs ns8:Rijksmuseum .@prefix ns9: <http://ja.dbpedia.org/resource/> 24   MY  COLLEGE  SPOT    
  • 25. Appendix 5: Screenshots of our applicationOveral view with information about the University of Amsterdam , it’s locationon the map, the spots that are nearby and these spots within a mapview.Main info about the university of Amsterdam MY  COLLEGE  SPOT   25    
  • 26. Selection of the spots nearby the University of AmsterdamMapview of the spots nearby the university of Amsterdam     26   MY  COLLEGE  SPOT    
  • 27. Appendix 6: Source code of our webpage (SGVizler)  <!DOCTYPE HTML><html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Sgvizler</title> <meta charset="UTF-8"/> <link rel="shortcut icon"href="http://sgvizler.googlecode.com/svn/www/favicon.ico" /> <link rel="stylesheet" type="text/css"href="http://sgvizler.googlecode.com/svn/www/sgvizler.css" /> <script type="text/javascript"src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script> <script type="text/javascript" src="https://www.google.com/jsapi"></script> <script type="text/javascript" id="sgvzlr_script"src="http://sgvizler.googlecode.com/svn/release/0.4/sgvizler.js"></script> <script type="text/javascript"> // CONFIGURATION Sgvizler 0.4: Set variables to fit your setup. // NB! Do not let the last item in a list end with a comma. //// Query settings. The defaults settings are listed. sgvizler.queryOptions = { // Default query. //query: "SELECT ?class (count(?instance)AS ?noOfInstances)nWHERE{ ?instance a ?class }nGROUP BY ?classnORDER BY ?class", // Endpoint URL. endpoint: "http://localhost:2020/sparql", // Endpoint output format. endpoint_output: json, // xml or json // This string is appended the endpoint variable and the query to itagain to give a link to the "raw" query results. endpoint_query_url: "?output=text&amp;query=", // URL to SPARQL validation service. The query is appended to it. //validator_query_url: "http://www.sparql.org/query-validator?languageSyntax=SPARQL&amp;outputFormat=sparql&amp;linenumbers=true&amp;query=", // Default chart type. //chart: gLineChart // Default log level. Must be either 0, 1, or 2. loglevel: 2 }; //// Prefixes // Add convenient prefixes for your dataset. rdf, rdfs, xsd, owl // are already set. Examples: sgvizler.namespaces[wd] = http://sws.ifi.uio.no/d2rq/resource/; sgvizler.namespaces[w] = http://sws.ifi.uio.no/ont/world.owl#; //// Your chart drawing preferences. The defaults are listed. // See the Google visualization API for available options for // Google charts, and the Sgvizler homepage for other // options. Options applicable to all charts are put in the // "root" of sgvizler.chartOptions. Chart specific options are // put in a "child" with the charts id as name, // e.g. gGeoMap. sgvizler.chartOptions = { //width: 800, //height: 400, //chartArea: { left: 5%, top: 5%, width: 75%, height: 80% }, // gGeoMap: { // dataMode: markers // }, // gMap: { // dataMode: markers, // }, // sMap: { // dataMode: markers, // showTip: true, // useMapTypeControl: true // } MY  COLLEGE  SPOT   27    
  • 28. }; //// Leave this as is. Ready, steady, GO! $(document).ready(sgvizler.go()); </script> </head> <body> <div id="logo"> <a href="http://code.google.com/p/sgvizler/"> <img src="http://sgvizler.googlecode.com/svn/www/mr.sgvizler.png"alt="mr.sgvizler.png"/> </a><br/>Mr. Sgvizler </div> <h1>My College Spot</h1> <h2>University of Amsterdam</h2> <table> <tr style="width:100%; height:500px;"> <td style="width:50%;"> <div id="sgvzl_example2" data-sgvizler-query=" PREFIX rankings: <http://www.example.org/vocab/>PREFIX dc: <http://purl.org/dc/elements/1.1/>prefix dbpedia: <http://dbpedia.org/ontology/#>prefix owl: <http://www.w3.org/2002/07/owl#>prefix xsd: <http://www.w3.org/2001/XMLSchema#>prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> SELECT ?Name ?Abstract ?Rank WHERE{ ?uni rankings:idOfRanking 92^^xsd:integer . ?uni rankings:orderOfRanking ?Rank . ?uni rankings:belongsTo ?link . ?link rankings:name ?Name . ?link rankings:abstract ?Abstract . } LIMIT 10 " data-sgvizler-chart="gTable" data-sgvizler-loglevel="1" style="width:800px; height:400px;" ></div> </td> <td style="width:50%;"> <div id="sgvzl_example4" data-sgvizler-query="PREFIX rankings: <http://www.example.org/vocab/>PREFIX dc: <http://purl.org/dc/elements/1.1/>prefix dbpedia: <http://dbpedia.org/ontology/#>prefix owl: <http://www.w3.org/2002/07/owl#>prefix xsd: <http://www.w3.org/2001/XMLSchema#>prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> SELECT ?lat ?long ?name ?uni WHERE{ ?uni rankings:idOfRanking 92^^xsd:integer . ?uni rankings:belongsTo ?link . ?link rankings:name ?name . ?link rankings:lat ?lat . ?link rankings:long ?long . } " data-sgvizler-chart="sMap" data-sgvizler-loglevel="2" style="width:600px; height:400px;"> </div> </td> </tr> 28   MY  COLLEGE  SPOT    
  • 29. </table><table> <tr style="width:100%"> <td style="width:50%"> <div id="sgvzl_example3" data-sgvizler-query="PREFIX rankings: <http://www.example.org/vocab/>PREFIX dc: <http://purl.org/dc/elements/1.1/>prefix dbpedia: <http://dbpedia.org/ontology/#>prefix owl: <http://www.w3.org/2002/07/owl#>prefix xsd: <http://www.w3.org/2001/XMLSchema#>prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> SELECT ?Touristspot WHERE{ ?uni rankings:idOfRanking 92^^xsd:integer . ?uni rankings:belongsTo ?link . ?link rankings:name ?name . ?link rankings:abstract ?abstract . ?spot rankings:isNearBy ?link . ?spot rankings:name ?Touristspot . ?spot rankings:hasGeo ?spotGeo . } LIMIT 21 " data-sgvizler-chart="gTable" data-sgvizler-loglevel="1" style="width:800px; height:600px;" ></div> </td> <td style="width:50%"> <div id="sgvzl_example5" data-sgvizler-query= "PREFIX rankings: <http://www.example.org/vocab/>PREFIX dc: <http://purl.org/dc/elements/1.1/>prefix dbpedia: <http://dbpedia.org/ontology/#>prefix owl: <http://www.w3.org/2002/07/owl#>prefix xsd: <http://www.w3.org/2001/XMLSchema#>prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> SELECT ?spotLat ?spotLong ?name ?spot WHERE{ ?spot rankings:isNearBy ?link . ?spot rankings:name ?name . ?spot rankings:lat ?spotLat . ?spot rankings:long ?spotLong . } " data-sgvizler-chart="sMap" data-sgvizler-loglevel="2" style="width:800px; height:400px;"> </div> </td> </tr></table> <hr/> <div id="footer"> <!-- Please leave a link to the Sgvizler homepage --> <p> Sgvizler visualizes the result of SPARQL SELECT queries using javascript and the Google Visualization API. For more information, see the <a href="http://code.google.com/p/sgvizler/">Sgvizler</a> homepage. (c) 2011 Martin G. Skj&#230;veland. </p> </div> </body></html> MY  COLLEGE  SPOT   29