WARNING: This server provides a static reference view of the NetKernel documentation. Links to dynamic content do not work. For the best experience we recommend you install NetKernel and view the documentation in the live system .

Endpoint
Name:jena.RDFUpdate
Description:Update a Jena RDF Model with a simple structured XML language
Id:jena.RDFUpdate
Category:accessor
Identifier Syntax

jena.RDFUpdate is an accessor using Active URI syntax with the following base identifiers:

Base
active:jRDFUpdateModel

and the following arguments: (for more details on argument passing details see here)

ArgumentRulesTypingDescription
operand
Mandatory
Representation (java.lang.Object)model to update
operator
Mandatory
Representation (java.lang.Object)declarative updates
Request Verbs

The following verb is supported:

Verb
SOURCE
Response

The response representation of this accessor for SOURCE requests is unknown.

This accessor throws no documented exceptions.

Import Requirements

To use jena.RDFUpdate accessor you must import the module urn:org:netkernel:rdf:jena:

<import>
  <uri>urn:org:netkernel:rdf:jena</uri>
</import>

The jRDFUpdateModel accessor takes a declarative XML structured update and applies it to the specified model. Returns the updated model.

operator

The operator is an XML document of the following form...

<jRDFUpdateModel>
  <addTriple>
    <resource>http://www.1060.org/forum/</resource>
    <property>
      <namespace>http://www.1060.org/descriptive/terms/</namespace>
      <name>colour</name>
    </property>
    <value type="xs:string">purple</value>
  </addTriple>
  <removeAllMatching>
    <property>
      <namespace>http://www.1060.org/descriptive/terms/</namespace>
      <name>distinctiveness</name>
    </property>
  </removeAllMatching>
</jRDFUpdateModel>

Operations are expressed as first-child elements of the root node "jRDFUpdateModel". Any number of operations may be specified. Note The model is updated atomically, the order of operations is significant. The following operations are supported:

addTriple - adds a new triple to the RDF model. Arguments for this operation are:

  • resource The URI of the resource
  • property The URI of the property describing the resource which is expressed in two parts:
    • namespace - the namespace URI base
    • name - the name to append to the namespace base
  • value - this is the value to associate with the resource. By default this is a URI. If the optional "@type" attribute is specified it may specify an XML Schema data type (for example "xs:string")

removeAllMatching - removes all resources from the Model which match a defined selection criterion - all selection criterion are optional and in each case if no argument is supplied then all resources will be match for that criterion.

  • resource The URI of the resource
  • property The URI of the property describing the resource which is expressed in two parts:
    • namespace - the namespace URI base
    • name - the name to append to the namespace base
  • value - this is the value to associate with the resource. By default this is a URI. If the optional "@type" attribute is specified it may specify an XML Schema data type (for example "xs:string")