The optional string returned as result string if no match occurs. If this string is empty and no match occurs, then the result string is unbound.
An input string is converted into a result string by applying a match and replacement expressions. For example, the input string "semantic web" with the match expression "([A-z]+) ([A-z]+)" and the replacement expression "The $1 life" returns the string "The semantic life". An optional input string is returned, if no match occurs. If this string is empty and no match occurs, then the result string is unbound.
Converts an input string into lower title case. For example, "semantic web" becomes "semantic Web". An optional matching expression can be given to only convert the matched characters.
the subject in the match triple, or an unbound variable for a wildcard
the object in the match triple, or an unbound variable for a wildcard
the predicate in the match triple, or an unbound variable for a wildcard
Counts all occurences of a triple pattern based on subject (?arg1), predicate (?arg2) and object (?arg3) input. Any of those can be unbound variables.
Evaluates a condition and depending on the outcome either returns the true argument or the false argument. This is comparable to Java's ... ? ... : ... notation.
The condition that shall be evaluated. If true then return the ?arg2 argument, otherwise return ?arg3.
Converts an input string into lower camel case. For example, "semantic web" becomes "semanticWeb". An optional matching expression can be given to only convert the matched characters.
The template of the input string. This must conform to the pattern language implemented by the Java SimpleDateFormat class (http://java.sun.com/j2se/1.4.2/docs/api/java/text/SimpleDateFormat.html).
Converts a string in a semi-structured format into a xsd:date, xsd:dateTime or xsd:time literal. The input string must be in a given template format, e.g. "yyyy.MM.dd G 'at' HH:mm:ss z" for strings such as 2001.07.04 AD at 12:08:56 PDT.
Gets the maximum cardinality of a property at a class. The function checks for locally defined owl:maxCardinality restrictions on the class or its superclasses. If none is found, it will check if the property is functional and, if so, return 1. Otherwise it will return null.
Creates a new string value by trimming an input string. Leading and trailing whitespaces are deleted.
Builds a string from the members of a given rdf:List (?arg1). The function iterates over all members of the list (which must be well-formed according to the RDF syntax rules). For each member, a string template (?arg2) is applied where the expression {?member} will be substituted with the current member. Optionally, a separator (?arg3) can be inserted between the list members in the result string, e.g. to insert a comma.
the head of the rdf:List to convert to string
the separator to insert between each string
the additional string that will be appended to the right of {?arg1}
the URI resource that constitutes the left part of the new URI
Constructs a new URI resource by concatenating a string constant {?arg2} to the URI of a given resource {?arg1}. Example: smf:deriveURI(owl:Thing, "-Child") = owl:Thing-Child
Converts an input string to title case. For example, "germany" becomes "Germany". An optional matching expression can be given to only convert the matched characters.
Gets the last index of the first occurence of a certain substring in a given search string. Returns null if the substring is not found.
true to embed HTML markup into the output
Converts a SPARQL query encoded in SPIN RDF format to a SPARQL string in textual form. The SPIN query must be well-formed in the context graph at execution time, and the provided argument must be the root of the expression (e.g., an instance of sp:Select).
Creates a random xsd:double between 0 and 1.
the SPARQL select query string to execute
Runs an nested SPARQL query and counts its results. Note that the nested query will reuse the variable bindings from its surrounding.
Returns the base URI of the ontology that the input resource is defined in.
Returns the workspace file path of the ontology that the input resource is defined in, if it exists.
Same as smf:buildString, but with the side effect of printing the string into the Error Log of TopBraid Composer. This can be used as an efficient debugging aid. The result of the function is the evaluated template.
Converts an input string into upper case. For example, "semantic web" becomes "SEMANTIC WEB". An optional matching expression can be given to only convert the matched characters.
An (optional) country code such as "au" to aid the search.
Attempts to convert a textual address (?arg1) into a comma-separated pair of lat/long values. The implementation currently uses the Google API (http://code.google.com/apis/maps/documentation/geocoding/) to do the actual work.
The address as a raw string, e.g. "1600 Amphitheatre Parkway, Mountain View, CA".
The type of the duration: It can be one of: "ms", "s", "m", "h", "d", "mon", "y", "c".
Returns the duration between two dates in terms of one of the given "types". "type" is a string constant, which indicates the type of duration. It can be: String value - Explanation ms - milliseconds s - seconds m - minutes h - hours d - days mon - months y - years c - centuries
Gets the minimum cardinality of a property at a class. The function checks for locally defined owl:minCardinality restrictions on the class or its superclasses. If none is found, it will return null.
the class to get the minimum cardinality at
Attempts to get a DBPedia page for a string.
the end index; if not bound, use the length of text - 1
Extracts a substring from an input string. This is similar to afn:substr but more robust against null values.
the start index (0 is the first character); if not bound, then the function will return null
Constructs a new URI resource by inserting the existing variable bindings into a template. The template can mention variable names in curly braces, such as "my:Instance-{?index}" would create "my:Instance-42" is ?index has the value 42. As an alternative to variable names, the function can take additional arguments after the template, the variables of which can be accessed using {?1}, {?2} etc. For example: smf:buildURI("my:Instance-{?1}-{?2}", ?day, ?month) would insert day and month at places {?1} and {?2}.
The URI template such as "<http://my.com/Instance-{?index}>". If the template contains a full URI, then it must be wrapped by <...>, otherwise the system will treat it as a qname.
Converts an input string into camel case. For example, "semantic web" becomes "SemanticWeb". An optional matching expression can be given to only convert the matched characters.
Constructs a new string by inserting the existing variable bindings into a template. The template can mention variable names in curly braces, such as "Hello {?index}" would create "Hello 42" is ?index has the value 42. As an alternative to variable names, the function can take additional arguments after the template, the variables of which can be accessed using {?1}, {?2} etc. For example: smf:buildString("Hello-{?1}-{?2}", ?day, ?month) would insert day and month at places {?1} and {?2}.
an rdf:List containing the match objects
Checks whether a given subject/predicate combination has all values enumerated from a given rdf:List. In other words, for each member ?object of the rdf:List, the triple (?arg1, ?arg2, ?object) must be in the model to return true. If the list is empty, true will also be returned.
Checks whether the input expression evaluates to a bound variable. This is similar to the built-in bound function of SPARQL, but bound expects a variable as argument and therefore can not be used to evaluate arbitrary nested functions.
Converts an input string to an HTML string - i.e. special characters are converted.
Returns the current time in milliseconds. See System.currentTimeMillis() in Java.
the language of the result literal; may be empty to delete any existing language
Creates a new string literal with a given language from an existing value. For example, smf:setLanguage("House", "en") becomes "House"@en.
Converts an input string into lower case. For example, "SEMANTIC Web" becomes "semantic web". An optional matching expression can be given to only convert the matched characters.
Executes a named system command with an optional number of arguments.
Gets the prefix of a given resource (?arg1). Returns nothing if the argument is a URI that cannot be abbreviated with a prefix.
Calls another SPARQL function specified by a URI resource (?arg1), with additional arguments passed into from ?arg2 onwards. This can be used to dynamically call functions, the URI of which is now known statically. The result of the function call will be passed on as result of the invoke call.
The URI resource defining the function to call.
Evaluates the expressions starting with the first argument, and returns the first result that is bound. This can be used to implement complex if ... then ... else if ... else if ... else patterns. The implementation does lazy evaluation, i.e. the arguments will only be evaluated if needed. The function declares no arguments, but any number of arguments is allowed at run time.
Gets the local range of a property at a class. The function first checks for locally defined owl:allValuesFrom restrictions on the class or its superclasses. If none is found, it will try to use the global rdfs:range of the property. If this does not exist either, it will return null.
The optional serialization format of the output. By default, it is N3. This value should be an instance of "sml:RDFSerialization" from sparqlmotionlib.owl ontology. For example: sml:RDFXML.
Converts the current RDF graph to text. Optionally the serialization of the RDF graph as text can be given. By default, the serialization is N3.
A URI resource or string literal that is used to generate a label. For URI resources, the local name will be used, the full string otherwise.
Can be used to derive a "human-readable" label from a resource URI or local name. For example, with the input ex:firstName this will return "first name". The result can then be used in the rest of the SPARQL query, e.g. to create an rdfs:label.
An (optional) string template, that may include any of the following special commands: - {date} inserts the current date - {name} inserts the generated label - {name:lower-case} inserts the label as lower case - {name:upper-case} inserts the label as upper case - {name:title-case} insert the label as title case Any other characters will be inserted as they appear.
Creates a new literal from an existing literal, but with a different datatype. This can, for example, be used to convert between floating point values and int values.
the "old" literal that shall be converted
Generates a new unique ID as a string literal. This is often useful for creating "random" URIs and other identifiers.
the node (literal or resource) that shall be rendered into a string
Gets a human-readable string representation from an RDF node. If it's a literal, the function will return the literal's lexical text. If it's a resource the system will use the rdfs:label (if exists) or otherwise use the qname.
Gets the index of the first occurence of a certain substring in a given search string. Returns null if the substring is not found.
Converts a given URI string to an RDF resource with that URI.
Gets the qname of a resource, using the defined namespace abbreviations. In contrast to the official specs, this function will drop the : character if it's the first character in the string. If the resource does not have a suitable prefix abbreviation, the function will return the URI wrapped by <...>.