semtags


Standard Syntax:
     <%@ taglib prefix="semtags" uri="http://www.inria.fr/2007/semtags#" %>

XML Syntax:
     <anyxmlelement xmlns:semtags="http://www.inria.fr/2007/semtags#" />

SemTags is a semantic web tags library that allows JSP developers to use (and work with) RDF/S and OWL ontologies and annotations in their JSP pages.

Tag Library Information
Display NameNone
Version1.1
Short Namesemtags
URIhttp://www.inria.fr/2007/semtags#
 

Tag Summary
initTo create and initialize the engine. You can add attributes to declare namespaces used in your SPARQL queries in the form prefix="namespace" e.g. dc="http://purl.org/dc/elements/1.1/" This tag must be called before any other calls to the SPARQL engine is made. If no engine variable is specified, the default variable "defaultEngineWrapper" is used. NB: to delete an engine, use the remove tag of the JSTL.
reloadTo re-initialize the engine reusing the parameters specified at initialization. NB: to delete an engine, use the remove tag of the JSTL.
send-queryTo send a SPARQL query to the engine and include the result directly in the current page. The query is specified either in attribute "query" or in the body of the tag. Namespaces declared at initialization may be used directly with out PREFIX declaration.
store-resultTo store the result of a SPARQL query into the context or write it in an xml external file. The query is specified either in attribute "query" or in the body of the tag. Namespaces declared at initialization may be used directly with out PREFIX declaration.
for-each-resultA convenient loop tag to directly iterate over the results of a SPARQL query. Variables appearing in the SELECT clause are created and updated in the JSP context for each iteration e.g. SELECT ?name ?age { ... } means ${name} and ${age} can be used directly in the body of the tag.
for-each-buffered-resultA convenient loop tag to directly iterate over the results of a SPARQL query. The result is buffered and if the tag is called again with the same query and reset="false", previous results are reused to save time. This can be useful for instance for paginated results. Variables appearing in the SELECT clause are created and updated in the JSP context for each iteration e.g. SELECT ?name ?age { ... } means ${name} and ${age} can be used directly in the body of the tag.
ifTo use a SPARQL query as test for a conditional statement IF-THEN.
chooseTo use a SPARQL query as test for a conditional statement CHOOSE-WHEN-OTHERWISE.
whenTo evaluate if and only if a condition is true. Used within choose tag.
otherwiseTo evaluate if and only if all other conditions are false. Used within choose tag.
for-each-labelTo iterate over the list of (rdfs) labels of a resource (class or property).
for-each-commentTo iterate over the list of (rdfs) comments of a resource (class or property).
for-each-childTo iterate over the list of direct children (rdfs:subXXX) of a resource (class or property).
for-each-parentTo iterate over the list of direct parents (rdfs:subXXX) of a resource (class or property).
for-each-root-conceptTo iterate over the list of root classes of the loaded ontologies.
for-each-root-propertyTo iterate over the list of root properties of the loaded ontologies.
selectGenerate select XHTML tag for each child (rdfs:subXXX) of a resource (class or property).
input-listGenerate input checkbox or radio tags XHTML tag for each child (rdfs:subXXX) of a resource (class or property).
create-annotTo create a new annotation file (e.g. "book.rdf") with its content.
remove-annotTo remove an annotation file (e.g. "book.rdf") and its content.
modify-annotTo modify an annotation file by re-writing one or more parts identified by an XPath e.g. xpath="//*[child::dc:title='the thing']". You can add attributes to declare namespaces used in the XPath expression in the form prefix="namespace" e.g. dc="http://purl.org/dc/elements/1.1/".
create-ruleTo create a new rule file.
modify-ruleTo modify a rule file by updating its condition and/or its conclusion.
remove-ruleTo remove a rule file.
create-ontologyTo create a new empty ontology file.
modify-ontologyTo modify an ontology file by re-writing the ontology modified part.
remove-ontologyTo remove an ontology file.
create-conceptTo create a new formatted basic concept.
create-propertyTo create a new formatted basic property.
create-notionTo create a new custom concept or property.
remove-conceptTo remove a concept (and optionally replace it by a substitute). All ontologies and annotations will be updated.
remove-propertyTo remove a property (and optionally replace it by a substitute). All ontologies and annotations will be updated.
modify-conceptTo modify a concept.
modify-propertyTo modify a concept.
merge-conceptsTo merge two concepts. The URI of the new merged concept will be uri1. All ontologies and annotations will be updated.
merge-propertiesTo merge two properties. The URI of the new merged property will be uri1. All ontologies and annotations will be updated.
 

Function Summary
java.lang.StringvalidateQuery( javax.servlet.jsp.PageContext, java.lang.String)To validate a query or a set of triples. Arguments are : the SPARQL query. Default engine instance is used. Because of '}' in SPARQL query, the query must be set as a variable before.
java.lang.StringdetailedValidateQuery( javax.servlet.jsp.PageContext, java.lang.String, fr.inria.semtags.EngineWrapper)To validate a query or a set of triples. Arguments are : the SPARQL query. The specified engine instance is used. Default engine instance is used. Because of '}' in SPARQL query, the query must be set as a variable before.
java.lang.StringquickQuery( javax.servlet.jsp.PageContext, java.lang.String)To get the first result of the first binding of a query. Arguments are : the SPARQL query. Default engine instance is used.
java.lang.StringdetailedQuickQuery( javax.servlet.jsp.PageContext, java.lang.String, fr.inria.semtags.EngineWrapper)To get the first result of the first binding of a query. Arguments are : the SPARQL query. The specified engine instance is used.
java.lang.Stringlabel( javax.servlet.jsp.PageContext, java.lang.String, java.lang.String, boolean)To display label(s) of a notion. Arguments are : notion's URI, language, all labels or one only.
java.lang.StringdetailedLabel( javax.servlet.jsp.PageContext, java.lang.String, java.lang.String, boolean, fr.inria.semtags.EngineWrapper)To display a label of a notion. Arguments are : notion's URI, language, all labels or one only, and the engine instance to use.
java.lang.Stringcomment( javax.servlet.jsp.PageContext, java.lang.String, java.lang.String, boolean)To display a comment of a notion. Arguments are : notion's URI, language, all comments or one only.
java.lang.StringdetailedComment( javax.servlet.jsp.PageContext, java.lang.String, java.lang.String, boolean, fr.inria.semtags.EngineWrapper)To display a comment of a notion. Arguments are : notion's URI, language, all comments or one only, and the engine instance to use.
intinstanceNb( javax.servlet.jsp.PageContext, java.lang.String)To display the number of direct instances of a concept. Arguments are : concept's URI.
intdetailedInstanceNb( javax.servlet.jsp.PageContext, java.lang.String, fr.inria.semtags.EngineWrapper)To display the number of direct instances of a concept. Arguments are : concept's URI, and the engine instance to use.
intallInstanceNb( javax.servlet.jsp.PageContext, java.lang.String)To display the number of instances of a concept or its descendants. Arguments are : concept's URI.
intdetailedAllInstanceNb( javax.servlet.jsp.PageContext, java.lang.String, fr.inria.semtags.EngineWrapper)To display the number of instances of a concept or its descendants. Arguments are : concept's URI, and the engine instance to use.
java.lang.Stringfile( javax.servlet.jsp.PageContext, java.lang.String)Return the relative file's name where the specified URI is defined.
java.lang.StringdetailedFile( javax.servlet.jsp.PageContext, java.lang.String, fr.inria.semtags.EngineWrapper)Return the relative file's name where the specified URI is defined. Arguments are : concept's or property's URI and the engine instance to use.
java.util.Listsources( javax.servlet.jsp.PageContext, java.lang.String)Returns the sources URIs as a list where the specified SPARQL pattern is defined.
java.util.ListdetailedSources( javax.servlet.jsp.PageContext, java.lang.String, fr.inria.semtags.EngineWrapper)Returns the sources URIs as a list where the specified SPARQL pattern is defined. Arguments are : pattern and the engine instance to use.
booleanisConcept( javax.servlet.jsp.PageContext, java.lang.String)Return true if the specified URI is a concept, false otherwise.
java.lang.StringdetailedIsConcept( javax.servlet.jsp.PageContext, java.lang.String, fr.inria.semtags.EngineWrapper)Return true if the specified URI is a concept, false otherwise. Arguments are : an URI and the engine instance to use.
booleanisProperty( javax.servlet.jsp.PageContext, java.lang.String)Return true if the specified URI is a property, false otherwise.
java.lang.StringdetailedIsProperty( javax.servlet.jsp.PageContext, java.lang.String, fr.inria.semtags.EngineWrapper)Return true if the specified URI is a property, false otherwise. Arguments are : an URI and the engine instance to use.
java.lang.Stringtoday( java.lang.String)Display today's date. Arguments are : the locale for formatting display date.
java.lang.StringcustomToday( java.lang.String)Display today's date. Arguments are : the pattern for formatting display date.
java.lang.StringgenerateID( )Generate an ID.
java.lang.Stringencode( java.lang.String)No Description
java.lang.Stringdecode( java.lang.String)No Description
java.lang.Stringnamespace( java.lang.String)Return the namespace of the specified URI.
java.lang.Stringid( java.lang.String)Return the ID (without the namespace) of the specified URI.
 


Java, JSP, and JavaServer Pages are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries. Copyright 2002-3 Sun Microsystems, Inc. 4150 Network Circle Santa Clara, CA 95054, U.S.A. All Rights Reserved.