Vocabulary Definitions

Schema for crypto built-in functions

These are terms drawn to match the available functions in mxCrypto.

Vocabulary Terms

Property Definitions
cr:md5 MD5 hash (link)

The object is a MD5 hash of the subject.

rdfs:domain
rdfs:Literal
rdfs:range
xsd:string
cr:sha SHA-1 hash (link)

The object is a SHA-1 hash of the subject.

rdfs:domain
rdfs:Literal
rdfs:range
xsd:string
cr:sha256 SHA-256 hash (link)

The object is a SHA-256 hash of the subject.

rdfs:domain
rdfs:Literal
rdfs:range
xsd:string
cr:sha512 SHA-512 hash (link)

The object is a SHA-512 hash of the subject.

rdfs:domain
rdfs:Literal
rdfs:range
xsd:string

n3 definition of some list functions

This is an ontology for computable list functions.

Vocabulary Terms

Property Definitions
list:append append (link)

Concatenates separate lists into a single list

schema: ($a_1 .. $a_n) list:append $a_s

definition: true if and only if the subject is a list of lists and the concatenation of all those lists is $a_s. $a_s can be calculated as a function of the subject.

requires: all $a_1, .., $a_n to be lists with all constituent members bound.

example: ( (1 2) (3 4) ) list:append (1 2 3 4).

rdfs:domain
log:List
list:first first (link)

Extracts the first member of a list.

schema: ($a_1 .. $a_n) list:first $a_s

definition: true if and only the subject is a list and $a_s is the first member of that list. $a_s can be calculated as a function of the subject.

requires: all $a_1, .., $a_n to be bound.

vs:term_status
unstable
rdfs:domain
log:List
list:in in (link)

Determines if an subject is a member of the object list or binds every member of the object list to the subject.

schema: $a_1 list:in $a_2

definition: true if and only $a_2 is a list and $a_1 is in that list. $a_1 can be calculated from $a_2.

requires: $a_2 to be a bound list.

rdfs:range
log:List
list:iterate iterate (link)

Iterates over index/value pairs of the subject list

schema: ($a_1 .. $a_n) list:iterate ($i $v)

definition: Gets the matching pair of list index and list value for every member of the subject. If the object is a variable, it will create a solution for each member of the subject list. If any member of the object list is a variable, it will create a solution for all matching members of the subject list. If the object is ground and the entry at the specified index matches the specified value, it evaluates to true; otherwise, false.

requires: $i is an integer.

example: ( 1 2 3 ) list:iterate ($i $v).

rdfs:domain
log:List
rdfs:range
log:List
list:last in (link)

Extracts the first member of a list.

schema: ($a_1 .. $a_n) list:last $a_s

definition: true if and only the subject is a list and $a_s is the last member of that list. $a_s can be calculated as a function of the subject.

requires: all $a_1, .., $a_n to be bound.

rdfs:domain
log:List
list:length length (link)

Calculates the length of a list.

schema: ($a_1 .. $a_n) list:length $a_s

definition: true if and only the subject is a list and $a_s is integer length of that list. $a_s can be calculated as a function of the subject.

requires:

  • all $a_1, .., $a_n to be bound.
  • $a_s: unbound, xs:integer (or its derived types) (see note on type promotion, and casting from string)
vs:term_status
unstable
rdfs:domain
log:List
rdfs:range
xsd:integer
list:member member (link)

Determines if an object is a member of the subject list or binds every member of the subject list to the object.

schema: $a_1 list:member $a_2

definition: true if and only $a_1 is a list and $a_2 is in that list. $a_2 can be calculated from $a_1.

requires: $a_1 to be a bound list.

rdfs:domain
log:List
list:memberAt memberAt (link)

Gets the member of a list at a given position (where the position of the first element is 1)

schema: (($a_1 .. $a_n) $a_i) list:memberAt $a_m

definition: Iff ($a_1 .. $a_n) has an element at position $a_i, and if that element and $a_m can unify.

requires: $a_i or $a_m (or both) must be bound.

Note that if $a_i is a variable, this builtin may bind it to more than one value (e.g. ((“A” “B” “A”) ?i) list:memberAt "A").

literal domains:

  • $a_1 .. $a_n, $a_m: unconstrained
  • $a_i: xs:decimal, xs:float, xs:double within the value space of xs:integer (see also note on type promotion and substitution). I.e., in case the double/float/decimal's literal's value is within the value space of integers, the literal will match the domain. In case of a negative integer, the index will count backwards from the length of the list.
vs:term_status
unstable
rdfs:domain
log:List
list:remove remove (link)

Removes the second component of the subject list from the first component of that list.

schema: ($a_1 $a_2) list:remove $a_3

definition: Iff the subject is a list of two lists $a_1 and $a_2, $a_2 is a subset of $a_1 and $a_3 is a list composed of the members of the $a_1 with all members of $a_2 removed, matching left to right. $a_3 can be calculated as a function of the subject.

requires: $a_1 and $a_2 must be bound lists.

example: ( (1 2 3 4) (2 3) ) list:remove (1 4).

vs:term_status
unstable
rdfs:domain
log:List
rdfs:range
log:List

n3 definition of some Semantic Web terms

These raise the level above RDF's pure relational data, and Web Ontology's ontological level, to allow rules to be expressed and inference done. They connect the inference to the web, allowing data to be fetched from resources elsewhere, and remote servers to be queried.

Vocabulary Terms

Class Definitions
log:Chaff Chaff (link)

Any statement mentioning anything in this class is considered boring and purged by the cwm --purge option. This is a convenience, and does not have any value when published as a general fact on the web.

log:Document log:Document (link)
rdfs:subClassOf
http://rdfs.org/ns/void#Dataset
log:Formula Formula (link)

The class of Notation-3 Formulae

rdfs:subClassOf
log:Type
log:List List (link)

A Notation-3 List, as a resource. A sub-class of an RDF List.

rdfs:subClassOf
log:Type, rdf:List
log:N3Document N3Document (link)

A document which, which parsed as Notation3 as defined in general by http://www.w3.org/DesignIssues/Notation3.html and this schema, conveys the intent of the author by the semantics defined on those specifications, and the semantics defined by the specifications of any other identifiers used in the document.

log:Other List (link)

Some other Notation-3 type

rdfs:subClassOf
log:Type
log:String List (link)

An RDF Literal

rdfs:subClassOf
log:Type, rdfs:Literal
log:Truth Truth (link)

Something which is true: believe it as you would believe this.

Understood natively by cwm in that it will execute rules in a formula declared a Truth within a formula it is already taking rules from.

log:Type Type (link)

The class of Notation3-specifiec resource types.

vs:term_status
unstable
Property Definitions
log:becomes becomes (link)

Built-in to perform RDF linear implication i.e. retracting the subject graph and asserting the object graph.

vs:term_status
unstable
log:conclusion conclusion (link)

All possible conclusions which can be drawn from a formula.

schema: $a_1 log:conclusion $a_2

definition: $a_2 is the set of conclusions which can be drawn from $a_1, by successively applying any rules it contains to the data it contains.

requires: $a_1 is a formula $a_2 is unbound or a formula.

note: This is equivalent to cwm's "--think" command line function. It does use built-ins, so it may for example indirectly invoke other documents, validate signatures, etc.

rdfs:domain
log:Formula
rdfs:range
log:Formula
log:conjunction conjunction (link)

A function to merge formulae: logical AND.

schema: ($a_1 .. $a_n) log:conjunction $a_s

definition: $a_s, which can be generated, is a formula containing a copy of each of the formulae $a_1 .. $a_n.

requires: all $a_1, .., $a_n to be formulae.

rdfs:domain
log:List
rdfs:range
log:Formula
log:content content (link)

This connects a document and a string that represents it. (Cwm knows how to go get a document in order to evaluate this.)

schema: $a_1 log:content $a_2

requires: $a_1 must be an IRI. $a_2 must be either unbound or a string.

note: The content-type of the information is not given and so must be known or guessed.

rdfs:domain
log:N3Document
rdfs:range
log:String
log:definitiveDocument definitive document (link)

When document D is the definitiveDocument for property P, any statement X P Y is true iff the semantics of document D include that statement.

For example, there may be a definitive document for the zipcode of airports by airport code, and so on. This is useful to let a reasoner know that it can extend its query to the given document. (Cwm will do this if its mode includes "r").

vs:term_status
deprecated
rdfs:domain
rdf:Property
rdfs:range
log:N3Document
log:definitiveService definitive service (link)

When service S is the definitiveService for property P, any statement X P Y is true iff and only if a query to S returns that it is. The protocol for the service S depends on the scheme. For mysql protocol, the URI of the service is like sql://user:password@host.domain/database/.

For example, there may be a definitive service for the zipcode of airports by airport code, and so on. This is useful to let a reasoner know that it can help resolve a query by delegating it to the service in question. (Cwm will do this if its mode includes "r").

vs:term_status
deprecated
rdfs:domain
rdf:Property
log:dtlit log:dtlit (link)

Takes a list of a string and a URI and creates a datatyped literal.

schema: ($a_1 $a_2) log:dtlit $a_3

definition: true if and only if the datatyped literal formed of $a_1 and $a_1 equals $a_3.

The subject is a list composed of a string and an IRI, and the object is a datatyped literal with the value $a_1 and datatype $a_2.

requires: $a_1 and $a_2 to be bound. $a_1 to be a xs:string (see note on casting to string). $a_2 to be an IRI.

example: `{ ("2005-03-30T11:00:00" :tz) log:dtlit ?X } => { ?X a :Answer } . will produce "2005-03-30T11:00:00"^^:tz a :Answer .

rdfs:domain
log:List
rdfs:range
rdfs:Literal
log:equalTo equalTo (link)

Determines if two RDF resources are the same.

schema: $a_1 log:equalTo $a_2

definition: true if and only if $a_1 and $a_2 are the same RDF node (symbol or literal).

Do not confuse with owl:sameAs.

log:findall findall (link)

Built-in used as ?SCOPE e:findall (?SELECT ?WHERE ?ANSWER). Within the subject ?SCOPE it unifies ?ANSWER with a list that contains all the instantiations of ?SELECT satisfying the ?WHERE clause.

vs:term_status
unstable
rdfs:domain
log:Formula
rdfs:range
log:List
log:forAllIn forAllIn (link)

Built-in for implementing a scoped universal quantification.

vs:term_status
unstable
log:forAllInClosure forAllInClosure (link)

Built-in for implementing a scoped universal quantification.

vs:term_status
unstable
log:implies implies (link)

Logical implication.

This is the relation between the antecedent (subject) and conclusion (object) of a rule.

schema: $a_1 log:implies $a_2

definition: The application of a rule to a knowledge-base is as follows. For every substitution which, applied to the antecedent ($a_1), gives a formula ($a_2) which is a subset of the knowledge-base, then the result of applying that same substitution to the conclusion may be added to the knowledge-base.

requires: $a_1 and $a_2 must be formulae.

related: See log:conclusion.

rdfs:domain
log:Formula
rdfs:range
log:Formula
log:includes includes (link)

The subject formula includes the object formula.

schema: $a_1 log:includes $a_2

definition: $a_1 includes $a_2 if there exists some substitution which when applied to $a_2 creates a formula B' such that for every statement in B' is also in $a_1, every variable universally (or existentially) quantified in B' is quantified in the same way in $a_1.

Variable substitution is applied recursively to nested compound terms such as formulae, lists and sets.

requires: $a_1 and $a_2 must be formulae.

note: You can use this to peer inside nested formulae.

rdfs:domain
log:Formula
rdfs:range
log:Formula
log:n3String n3 string (link)

The subject formula, expressed as N3, gives this string.

schema: $a_1 log:n3String $a_2

definition: $a_1, serialized as N3, gives $a_2.

requires: $a_1 is a formula.

related: See log:parsedAsN3.

rdfs:domain
log:Formula
rdfs:range
log:N3
log:notEqualTo notEqualTo (link)

Determines if two RDF resources are not the same.

schema: $a_1 log:notEqualTo $a_2

definition: true if and only if $a_1 and $a_2 are not the same RDF node (symbol or literal).

owl:inverse
log:equalTo
log:notIn notIn (link)

Custom built-in for implementing scoped negation-as-failure (SNAF).

vs:term_status
unstable
log:notInClosure notInClosure (link)

Custom built-in for implementing scoped negation-as-failure (SNAF).

vs:term_status
unstable
log:notIncludes not includes (link)

The object formula is NOT a subset of subject.

schema: $a_1 log:notIncludes $a_2

definition: true if and only if log:includes is false. The converse of log:includes.

related: See log:includes.

rdfs:domain
log:Formula
rdfs:range
log:Formula
log:outputString output string (link)

The subject is a key and the object is a string, where the strings are to be output in the order of the keys. See cwm --strings in cwm --help.

vs:term_status
deprecated
rdfs:range
log:String
log:parsedAsN3 parses to N3 (link)

The subject string, parsed as N3, gives this formula.

schema: $a_1 log:parsedAsN3 $a_2

definition: $a_1, parsed as N3, gives $a_2.

requires: $a_1 is a syntactically valid string in N3 format.

related: See log:n3String.

rdfs:domain
log:N3
rdfs:range
log:Formula
log:racine racine (link)

For anything identified by a URI with a fragid, this is the thing identified by the same URI without a hash or fragid. For anything else, it is itself.

log:rawType rawType (link)

Returns an identifier based on the type of the RDF Resource.

schema: $a_1 log:rawType $a_2

definition: true if the type of $a_1 is the same as $a_2, or binds the type to $a_2.

requires: $a_2 is unbound or one of log:Formula, log:Literal, log:List, log:Set or log:Other.

example: log:semanticsOrError returns either a formula or a string, and you can check which using log:rawType.

rdfs:range
log:Type
log:rawUri raw uri (link)

This allows one to look at the actual string of the URI which identifies this, for anything, even a blank node or a formula. This peeks into the internal workings of cwm, and so is not normally used. Use log:uri instead.

rdfs:range
log:String
log:semantics semantics (link)

The log:semantics of a document is the formula achieved by parsing representation of the document.

schema: $a_1 log:semantics $a_2

definition: For a document in Notation3, log:semantics is the log:parsedAsN3 of the log:content of the document.

For a document in another RDF syntax, it is parsed according to the appropriate specification to yield an RDF formula (a subclass of N3 log:Formula).

Evaluates to false if an unrecognized document format is retrieved.

requires: $a_1 must be an IRI.

aside: Philosophers will be distracted here into worrying about the meaning of meaning. At least we didn't call this function "meaning"! In as much as N3 is used as an interlingua for interoperability for different systems, this for an N3 based system is the meaning expressed by a document.

related: See log:parsedAsN3 and log:content.

rdfs:domain
log:N3Document
rdfs:range
log:Formula
log:semanticsOrError semantics or error message (link)

This connects a document and either the formula it parses to, or an error message explaining what went wrong with trying.

schema: $a_1 log:semanticsOrError $a_2

requires: $a_1 must be an IRI.

related: See log:semantics.

rdfs:domain
log:N3Document
log:skolem skolem (link)

Built-in to generate a Skolem IRI object which is a function of the arguments in the subject list

vs:term_status
unstable
rdfs:domain
log:List
rdfs:range
log:String
log:uri log:uri (link)

This allows one to look at the actual string of the URI which identifies this.

(Cwm can get the URI of a resource or get the resource from the URI.) This is a level breaker, breaking the rule of not looking inside a URI. Use (eg with string:match) to replace RDF's old "aboutEach" functionality. Use to implement the URI spec and protocol specs, etc.

rdfs:range
log:String
Datatype Definitions
log:N3 log:N3 (link)

The class log:N3 is the class of N3 literal values. log:N3 is an instance of rdfs:Datatype and a subclass of rdfs:Literal. The value of log:content of a log:N3Document is a literal with datatype log:N3.

vs:term_status
unstable
rdfs:subClassOf
rdfs:Literal

Schema mathematical built-in functions

This is an ontology for computable math functions.

Vocabulary Terms

Class Definitions
math:Function Function (link)

A math:Function is unique in terms of math:EqualTo.

rdfs:subClassOf
owl:FunctionalProperty
math:List List (link)

The class of things that are N3 lists where all of the members are math:Value items.

rdfs:subClassOf
log:List
math:LogicalOperator math:LogicalOperator (link)

A logical operator allows evaluation eihter way, or testing relationship between two values

rdfs:subClassOf
math:Function, math:ReverseFunction
math:ReverseFunction math:ReverseFunction (link)

A math:ReverseFunction is unambiguous in terms of math:EqualTo.

rdfs:subClassOf
owl:InverseFunctionalProperty
math:StrictProperty StrictProperty (link)

The class of things that compare values.

rdfs:subClassOf
rdf:Property
math:TwoMemberedList TwoMemberedList (link)

This is the class of things that are math lists with only two members.

rdfs:subClassOf
math:List
math:Value Value (link)

The class of things that derive from XSD numeric datatypes.

rdfs:subClassOf
_:b0
Property Definitions
math:absoluteValue negation (link)

The object is calulated as the absolute value of the subject.

rdfs:domain
math:Value
rdfs:range
math:Value
math:acos acos (link)

The object is calulated as the arc cosine value of the subject.

rdfs:domain
math:Value
rdfs:range
math:Value
math:asin asin (link)

The object is calulated as the arc sine value of the subject.

rdfs:domain
math:Value
rdfs:range
math:Value
math:atan atan (link)

The object is calulated as the arc tangent value of the subject.

rdfs:domain
math:Value
rdfs:range
math:Value
math:cos cos (link)

The subject is an angle expressed in radians. The object is calulated as the cosine value of the subject.

rdfs:domain
math:Value
rdfs:range
math:Value
math:cosh cosh (link)

The subject is an angle expressed in radians. The object is calulated as the #hyperbolic cosine value of the subject.

rdfs:domain
math:Value
rdfs:range
math:Value
math:degrees degrees (link)

The subject is an angle expressed in radians. The object is calulated as the conversion in degrees of the value of the subject.

rdfs:domain
math:Value
rdfs:range
math:Value
math:difference difference (link)

The subject is a pair of numbers. The object is calculated by subtracting the second number of the pair from the first.

rdfs:domain
math:TwoMemberedList
rdfs:range
math:Value
math:equalTo equalTo (link)

schema: $a1 math:equalTo $a2

summary: checks equality of numbers

definition: true if and only if $a1 is equal to $a2.

requires: $a_1 or $a_2 (or both) must be either concrete numerals, or variables bound to a numeral.

literal domains:

  • $a1: xs:decimal (or its derived types), xs:float, or xs:double (see note on type promotion, and casting from string)
  • $a2: xs:decimal (or its derived types), xs:float, or xs:double (see note on type promotion, and casting from string)
rdfs:domain
math:Value
rdfs:range
math:Value
math:exponentiation exponentiation (link)

The subject is a pair of numbers. The object is calculated by raising the first number of the power of the second.

rdfs:domain
math:TwoMemberedList
rdfs:range
math:Value
math:greaterThan greaterThan (link)

True iff the subject is a number which is greater than the object.

rdfs:domain
math:Value
rdfs:range
math:Value
math:integerQuotient integerQuotient (link)

The subject is a pair of numbers. The object is calculated by dividing the first number of the pair by the second, ignoring remainder.

vs:term_status
deprecated
rdfs:domain
math:TwoMemberedList
rdfs:range
math:Value
math:lessThan lessThan (link)

True iff the subject is a number which is LESS than a object.

rdfs:domain
math:Value
rdfs:range
math:Value
math:memberCount memberCount (link)

The number of items in a list. The subject is a list, the object is calculated as the number of members. Obsolete, see list:length

vs:term_status
deprecated
rdfs:domain
math:List
rdfs:range
math:Value
math:negation negation (link)

The subject or object is calculated to be the negation of the other.

rdfs:domain
math:Value
rdfs:range
math:Value
math:notEqualTo notEqualTo (link)

True iff the subject is a number which is NOT EQUAL to a object.

rdfs:domain
math:Value
rdfs:range
math:Value
math:notGreaterThan notGreaterThan (link)

True iff the subject is a number which is NOT greater than the object.

rdfs:domain
math:Value
rdfs:range
math:Value
math:notLessThan notlessThan (link)

True iff the subject is a number which is NOT LESS than a object.

rdfs:domain
math:Value
rdfs:range
math:Value
math:product product (link)

The subject is a list of numbers. The object is calculated as the arithmentic product of those numbers.

rdfs:domain
math:List
rdfs:range
math:Value
math:quotient quotient (link)

The subject is a pair of numbers. The object is calculated by dividing the first number of the pair by the second.

rdfs:domain
math:TwoMemberedList
rdfs:range
math:Value
math:remainder remainder (link)

The subject is a pair of integers. The object is calculated by dividing the first number of the pair by the second and taking the remainder.

rdfs:domain
math:TwoMemberedList
rdfs:range
math:Value
math:rounded rounded (link)

The object is calulated as the number with no fractional part that is closest to the subject. If there are two such numbers, then the one that is closest to positive infinity is returned.

rdfs:domain
math:Value
rdfs:range
math:Value
math:sin sin (link)

The subject is an angle expressed in radians. The object is calulated as the sine value of the subject.

rdfs:domain
math:Value
rdfs:range
math:Value
math:sinh sinh (link)

The subject is an angle expressed in radians. The object is calulated as the hyperbolic sine value of the subject.

rdfs:domain
math:Value
rdfs:range
math:Value
math:sum sum (link)

schema: ($a_1 .. $a_n) math:sum $a_s

summary: performs addition of numbers

definition: true if and only if the arithmetic sum of $a_1, .. $a_n equals $a_s.

requires: all $a_1, .., $a_n to be bound.

literal domains:

  • $a_1 .. $a_n : xs:decimal (or its derived types), xs:float, or xs:double (see note on type promotion, and casting from string)
  • $a_s: xs:decimal (or its derived types), xs:float, or xs:double (see note on type promotion, and casting from string)
rdfs:domain
log:List
rdfs:range
math:Value
math:tan tan (link)

The subject is an angle expressed in radians. The object is calulated as the tangent value of the subject.

rdfs:domain
math:Value
rdfs:range
math:Value
math:tanh tanh (link)

The subject is an angle expressed in radians. The object is calulated as the hyperbolic tangent value of the subject.

rdfs:domain
math:Value
rdfs:range
math:Value

String Processing Ontology

This is an ontology for computable string functions. It is implemented, for example, in CWM and Euler.

Vocabulary Terms

Property Definitions
string:concat is concatenation of (link)

(obsolete - (was backwards!) - use: string:concatenation)

owl:inverse
string:concatenation
vs:term_status
deprecated
rdfs:domain
log:String
rdfs:range
log:List
string:concatenation concatenate into (link)

schema: ($a_1 .. $a_n) string:concatenation $a_s

summary: concatenates the given resources

definition: true if and only if the string concatenation of $a_1, .. $a_n equals $a_s.

requires: all $a_1, .., $a_n to be bound.

literal domains:

  • $a_1 .. $a_n : xs:string (see note on casting to string)
  • $a_s: xs:string (see note on casting to string)
rdfs:domain
log:List
rdfs:range
log:String
string:contains contains (link)

True iff the subject string contains the object string.

rdfs:domain
log:String
rdfs:range
log:String
string:containsIgnoringCase contains (link)

True iff the subject string contains the object string, with the comparison done ignoring the difference between upper case and lower case characters.

rdfs:domain
log:String
rdfs:range
log:String
string:endsWith ends with (link)

True iff the subject string ends with the object string.

rdfs:domain
log:String
rdfs:range
log:String
string:equalIgnoringCase contains (link)

True iff the subject string is the same as object string ignoring differences between upper and lower case.

rdfs:domain
log:String
rdfs:range
log:String
string:format is the string formatted function of (link)

The subject is a list, whose first member is a format string, and whose remaining members are arguments to the format string. The formating string is in the style of python's % operator, very similar to C's sprintf(). The object is calculated from the subject.

rdfs:domain
log:List
rdfs:range
log:String
string:greaterThan is greater than (link)

True iff the string is greater than the object when ordered according to Unicode(tm) code order.

rdfs:domain
log:String
rdfs:range
log:String
string:lessThan is less than (link)

True iff the string is less than the object when ordered according to Unicode(tm) code order.

rdfs:domain
log:String
rdfs:range
log:String
string:matches contains (link)

The subject is a string; the object is is a regular expression in the perl, python style. It is true iff the string matches the regexp.

rdfs:domain
log:String
rdfs:range
log:String
string:notEqualIgnoringCase contains (link)

True iff the subject string is the NOT same as object string ignoring differences between upper and lower case.

rdfs:domain
log:String
rdfs:range
log:String
string:notGreaterThan is not greater than (link)

True iff the string is NOT greater than the object when ordered according to Unicode(tm) code order.

rdfs:domain
log:String
rdfs:range
log:String
string:notLessThan is not less than (link)

True iff the string is NOT less than the object when ordered according to Unicode(tm) code order.

rdfs:domain
log:String
rdfs:range
log:String
string:notMatches contains (link)

The subject string; the object is is a regular expression in the perl, python style. It is true iff the string does NOT match the regexp.

rdfs:domain
log:String
rdfs:range
log:String
string:replace replace (link)

A built-in for replacing characters or sub. takes a list of 3 strings; the first is the input data, the second the old and the third the new string. The object is calculated as the replaced string. For example, ("fofof bar", "of", "baz") string:replace "fbazbaz bar".

rdfs:domain
log:List
rdfs:range
log:String
string:scrape scrape (link)

The subject is a list of two strings. The second string is a regular expression in the perl, python style. It must contain one group (a part in parentheses). If the first string in the list matches the regular expression, then the object is calculated as being the part of the first string which matches the group.

rdfs:domain
log:List
rdfs:range
log:String
string:startsWith starts with (link)

True iff the subject string starts with the object string.

rdfs:domain
log:String
rdfs:range
log:String

n3 definition of some time and date functions

Vocabulary Terms

Property Definitions
time:day day (link)

Iff the subject is a xsd:dateTime and the object is the integer day component of the dateTime. the object can be calculated as a function of the subject.

rdfs:domain
xsd:dateTime
rdfs:range
xsd:integer
time:dayOfWeek day of week (link)

Iff the subject is a xsd:dateTime and the object is the integer the day number within the week, Sunday being 0. the object can be calculated as a function of the subject.

rdfs:domain
xsd:dateTime
rdfs:range
xsd:integer
time:gmTime Universal Time (link)

Iff the subject is a dateTime format string and the object is the result of formatting the Universal Time of processing in the format given. If the format string has zero length, then the ISOdate standard format is used. [ is time:gmtime of ""] the therefore the current date time. It will end with "Z" as a timezone code. the object can be calculated as a function of the subject. Rules which use this function will of course NOT be repeatable.

rdfs:domain
time:format
rdfs:range
xsd:string
time:hour hour (link)

Iff the subject is a xsd:dateTime and the object is the hour year component of the dateTime. the object can be calculated as a function of the subject.

rdfs:domain
xsd:dateTime
rdfs:range
xsd:integer
time:inSeconds in era seconds (link)

Iff the subject is a xsd:dateTime and the object is the integer number of seconds since the beginning of the era on a given system. Don't assume a particular value, always test for it. the object can be calculated as a function of the subject.

Cwm implements this as a bidirectional function: you can calculate the ISO date from the seconds since the beginning of the era, or vice-versa.

rdfs:domain
xsd:dateTime
rdfs:range
xsd:integer
time:localTime local time (link)

Iff the subject is a dateTime format string and the object is the result of formatting the current time of processing and local timezone in the format given. If the format string has zero length, then the ISOdate standard format is used. [ is time:gmtime of ""] the therefore the current date time. It will end with "Z" as a timezone code. the object can be calculated as a function of the subject. Rules which use this function will of course NOT be repeatable.

rdfs:domain
time:format
rdfs:range
xsd:string
time:minute minute (link)

Iff the subject is a xsd:dateTime and the object is the integer minute component of the dateTime. the object can be calculated as a function of the subject.

rdfs:domain
xsd:dateTime
rdfs:range
xsd:integer
time:month month (link)

Iff the subject is a xsd:dateTime and the object is the integer month component of the dateTime. the object can be calculated as a function of the subject.

rdfs:domain
xsd:dateTime
rdfs:range
xsd:integer
time:second second (link)

Iff the subject is a xsd:dateTime and the object is the integer year component of the dateTime. the object can be calculated as a function of the subject.

rdfs:domain
xsd:dateTime
rdfs:range
xsd:integer
time:timeZone timezone offset (link)

Iff the subject is a xsd:dateTime and the object is the trailing timezone offset part, e.g. "-05:00".. the object can be calculated as a function of the subject.

rdfs:domain
xsd:dateTime
rdfs:range
xsd:string
time:year year (link)

Iff the subject is a xsd:dateTime and the object is the integer year component of the dateTime. the object can be calculated as a function of the subject.

rdfs:domain
xsd:dateTime
rdfs:range
xsd:integer