note: this page is automatically generated from embedded documentation in the PHP source.
Overview
Represents a changeset. Can be used to create a changeset based on the difference between two bounded descriptions. The descriptions must share the same subject URI.
- See:
- http://n2.talis.com/wiki/Changesets
Fields inherited from Moriarty.SimpleGraph
Constructors
Methods
Methods inherited from Moriarty.SimpleGraph
Fields
- $a - Serialise the graph to RDF/XML
- $after - Serialise the graph to RDF/XML
- $before - Serialise the graph to RDF/XML
- $subjectIndex - Serialise the graph to RDF/XML
Constructor Detail
public ChangeSet(mixed a)
Method Detail
addT
public void addT(mixed s, mixed p, mixed o, mixed o_type)
adds a triple to the internal simpleIndex holding all the changesets and statements
- Return:
- void
- Author:
- Keith
has_changes
public void has_changes()
toRDFXML
public void toRDFXML()
to_rdfxml
public void to_rdfxml()
Serialise the graph to RDF/XML
- Return:
- string the RDF/XML version of the graph
Field Detail
a
public mixed $a
Create a new changeset. This will calculate the required additions and removals based on before and after versions of a bounded description. The args parameter is an associative array that may have the following fields:
- subjectOfChange => a string representing the URI of the changeset's subject of change
- createdDate => a string representing the date of the changeset
- creatorName => a string representing the creator of the changeset
- changeReason => a string representing the reason for the changeset
- after => an array of triples representing the required state of the resource description after the changeset would be applied. All subjects must be the same.
- before => an array of triples representing the state of the resource description before the changeset is applied. All subjects must be the same.
- after_rdfxml => a string of RDF/XML representing the required state of the resource description after the changeset would be applied. This is parsed and used to overwrite the 'after' parameter, if any. All subjects must be the same.
- before_rdfxml => a string of RDF/XML representing the state of the resource description before the changeset is applied. This is parsed and used to overwrite the 'begin' parameter, if any. All subjects must be the same.
If none of 'after', 'before', 'after_rdfxml' or 'before_rdfxml' is supplied then an empty changeset is constructed.
The 'after' and 'before' arrays are simple arrays where each element is a triple array with the following structure: - s => the subject URI
- p => the predicate URI
- o => the value of the object
- o_type => one of 'uri', 'bnode' or 'literal'
- o_lang => the language of the literal if any
- o_datatype => the data type URI of the literal if any
- Param:
- array args an associative array of parameters to use when constructing the changeset
after
public mixed $after = array()
before
public mixed $before = array()
subjectIndex
public mixed $subjectIndex = array()
Generated by PHPDoctor 2RC2