-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
updates SPARQL query support and related tooling
- Loading branch information
Showing
19 changed files
with
824 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
grails-app/controllers/org/fogbeam/quoddy/SemanticAssertionController.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package org.fogbeam.quoddy | ||
|
||
import com.hp.hpl.jena.rdf.model.Statement | ||
|
||
class SemanticAssertionController | ||
{ | ||
|
||
// def jenaService; | ||
|
||
def index = | ||
{ | ||
|
||
Map model = [:]; | ||
|
||
|
||
return model; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
104 changes: 104 additions & 0 deletions
104
grails-app/controllers/org/fogbeam/quoddy/StatementController.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
package org.fogbeam.quoddy | ||
|
||
class StatementController | ||
{ | ||
|
||
def jenaService; | ||
|
||
def list = | ||
{ | ||
|
||
List allStatements = jenaService.listAllStatements(); | ||
|
||
|
||
Map model = [:]; | ||
|
||
model.put( "allStatements", allStatements); | ||
|
||
return model; | ||
|
||
} | ||
|
||
|
||
def addProperty = | ||
{ | ||
|
||
Map model = [:]; | ||
|
||
return model; | ||
} | ||
|
||
def saveProperty = | ||
{ | ||
String propertyUri = params.propertyUri; | ||
String propertyLabel = params.propertyLabel; | ||
|
||
jenaService.saveProperty( propertyUri, propertyLabel ); | ||
|
||
redirect(controller:"statement", action:"list" ); | ||
} | ||
|
||
def addClass = | ||
{ | ||
|
||
Map model = [:]; | ||
|
||
return model; | ||
} | ||
|
||
def saveClass = | ||
{ | ||
String classUri = params.classUri; | ||
String classLabel = params.classLabel; | ||
|
||
jenaService.saveClass( classUri, classLabel ); | ||
|
||
redirect(controller:"statement", action:"list" ); | ||
} | ||
|
||
|
||
def create = | ||
{ | ||
Map model = [:]; | ||
|
||
return model; | ||
} | ||
|
||
|
||
def save = | ||
{ | ||
String subject = params.subject; | ||
String predicate = params.predicate; | ||
String object = params.object; | ||
|
||
jenaService.saveStatementWithResourceObject( subject, predicate, object ); | ||
|
||
redirect(controller:"statement", action:"list" ); | ||
|
||
} | ||
|
||
def listProperties = | ||
{ | ||
List allStatements = jenaService.listProperties(); | ||
|
||
Map model = [:]; | ||
|
||
model.put( "allStatements", allStatements ); | ||
|
||
return model; | ||
|
||
} | ||
|
||
|
||
def listClasses = | ||
{ | ||
List allStatements = jenaService.listClasses(); | ||
|
||
Map model = [:]; | ||
|
||
model.put( "allStatements", allStatements ); | ||
|
||
return model; | ||
|
||
} | ||
} |
Oops, something went wrong.