/**
* generated by http://RDFReactor.semweb4j.org ($Id: CodeGenerator.java 870 2007-11-07 17:30:59Z max.at.xam.de $) on 26.01.08 12:44
*/
package org.ontoware.rdfreactor.schema.rdfs;
import org.ontoware.aifbcommons.collection.ClosableIterator;
import org.ontoware.rdf2go.exception.ModelRuntimeException;
import org.ontoware.rdf2go.model.Model;
import org.ontoware.rdf2go.model.node.BlankNode;
import org.ontoware.rdf2go.model.node.URI;
import org.ontoware.rdf2go.model.node.impl.URIImpl;
import org.ontoware.rdfreactor.runtime.Base;
import org.ontoware.rdfreactor.runtime.ReactorResult;
/**
* This class manages access to these properties:
* <ul>
* <li> First </li>
* <li> Rest </li>
* </ul>
*
* This class was generated by <a href="http://RDFReactor.semweb4j.org">RDFReactor</a> on 26.01.08 12:44
*/
public class List extends Resource {
/**
*
*/
private static final long serialVersionUID = 1L;
/** http://www.w3.org/1999/02/22-rdf-syntax-ns#List */
@SuppressWarnings("hiding")
public static final URI RDFS_CLASS = new URIImpl("http://www.w3.org/1999/02/22-rdf-syntax-ns#List", false);
/** http://www.w3.org/1999/02/22-rdf-syntax-ns#first */
public static final URI FIRST = new URIImpl("http://www.w3.org/1999/02/22-rdf-syntax-ns#first",false);
/** http://www.w3.org/1999/02/22-rdf-syntax-ns#rest */
public static final URI REST = new URIImpl("http://www.w3.org/1999/02/22-rdf-syntax-ns#rest",false);
/** all property-URIs with this class as domain */
@SuppressWarnings("hiding")
public static final URI[] MANAGED_URIS = {
new URIImpl("http://www.w3.org/1999/02/22-rdf-syntax-ns#first",false),
new URIImpl("http://www.w3.org/1999/02/22-rdf-syntax-ns#rest",false)
};
// protected constructors needed for inheritance
/**
* Returns a Java wrapper over an RDF object, identified by URI.
* Creating two wrappers for the same instanceURI is legal.
* @param model RDF2GO Model implementation, see http://rdf2go.semweb4j.org
* @param classURI URI of RDFS class
* @param instanceIdentifier Resource that identifies this instance
* @param write if true, the statement (this, rdf:type, TYPE) is written to the model
*
* [Generated from RDFReactor template rule #c1]
*/
protected List ( Model model, URI classURI, org.ontoware.rdf2go.model.node.Resource instanceIdentifier, boolean write ) {
super(model, classURI, instanceIdentifier, write);
}
// public constructors
/**
* Returns a Java wrapper over an RDF object, identified by URI.
* Creating two wrappers for the same instanceURI is legal.
* @param model RDF2GO Model implementation, see http://rdf2go.ontoware.org
* @param instanceIdentifier an RDF2Go Resource identifying this instance
* @param write if true, the statement (this, rdf:type, TYPE) is written to the model
*
* [Generated from RDFReactor template rule #c2]
*/
public List ( Model model, org.ontoware.rdf2go.model.node.Resource instanceIdentifier, boolean write ) {
super(model, RDFS_CLASS, instanceIdentifier, write);
}
/**
* Returns a Java wrapper over an RDF object, identified by a URI, given as a String.
* Creating two wrappers for the same URI is legal.
* @param model RDF2GO Model implementation, see http://rdf2go.ontoware.org
* @param uriString a URI given as a String
* @param write if true, the statement (this, rdf:type, TYPE) is written to the model
* @throws ModelRuntimeException if URI syntax is wrong
*
* [Generated from RDFReactor template rule #c7]
*/
public List ( Model model, String uriString, boolean write) throws ModelRuntimeException {
super(model, RDFS_CLASS, new URIImpl(uriString,false), write);
}
/**
* Returns a Java wrapper over an RDF object, identified by a blank node.
* Creating two wrappers for the same blank node is legal.
* @param model RDF2GO Model implementation, see http://rdf2go.ontoware.org
* @param bnode BlankNode of this instance
* @param write if true, the statement (this, rdf:type, TYPE) is written to the model
*
* [Generated from RDFReactor template rule #c8]
*/
public List ( Model model, BlankNode bnode, boolean write ) {
super(model, RDFS_CLASS, bnode, write);
}
/**
* Returns a Java wrapper over an RDF object, identified by
* a randomly generated URI.
* Creating two wrappers results in different URIs.
* @param model RDF2GO Model implementation, see http://rdf2go.ontoware.org
* @param write if true, the statement (this, rdf:type, TYPE) is written to the model
*
* [Generated from RDFReactor template rule #c9]
*/
public List ( Model model, boolean write ) {
super(model, RDFS_CLASS, model.newRandomUniqueURI(), write);
}
///////////////////////////////////////////////////////////////////
// typing
/**
* Create a new instance of this class in the model.
* That is, create the statement (instanceResource, RDF.type, http://www.w3.org/1999/02/22-rdf-syntax-ns#List).
* @param model an RDF2Go model
* @param instanceResource an RDF2Go resource
*
* [Generated from RDFReactor template rule #class1]
*/
public static void createInstance(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource) {
Base.createInstance(model, RDFS_CLASS, instanceResource);
}
/**
* @param model an RDF2Go model
* @param instanceResource an RDF2Go resource
* @return true if instanceResource is an instance of this class in the model
*
* [Generated from RDFReactor template rule #class2]
*/
public static boolean hasInstance(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource) {
return Base.hasInstance(model, RDFS_CLASS, instanceResource);
}
/**
* @param model an RDF2Go model
* @return all instances of this class in Model 'model' as RDF resources
*
* [Generated from RDFReactor template rule #class3]
*/
public static ClosableIterator<org.ontoware.rdf2go.model.node.Resource> getAllInstances(Model model) {
return Base.getAllInstances(model, RDFS_CLASS, org.ontoware.rdf2go.model.node.Resource.class);
}
/**
* @param model an RDF2Go model
* @return all instances of this class in Model 'model' as a ReactorResult,
* which can conveniently be converted to iterator, list or array.
*
* [Generated from RDFReactor template rule #class3-as]
*/
public static ReactorResult<? extends List> getAllInstance_as(Model model) {
return Base.getAllInstances_as(model, RDFS_CLASS, List.class );
}
/**
* Delete all rdf:type from this instance. Other triples are not affected.
* @param model an RDF2Go model
* @param instanceResource an RDF2Go resource
*
* [Generated from RDFReactor template rule #class4]
*/
public static void deleteInstance(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource) {
Base.deleteInstance(model, RDFS_CLASS, instanceResource);
}
///////////////////////////////////////////////////////////////////
// property access methods
/**
* @param model an RDF2Go model
* @param objectValue
* @return all A's as RDF resources, that have a relation 'Rest' to this List instance
*
* [Generated from RDFReactor template rule #getallinverse1static]
*/
public static ClosableIterator<org.ontoware.rdf2go.model.node.Resource> getAllRest_Inverse( Model model, Object objectValue) {
return Base.getAll_Inverse(model, List.REST, objectValue);
}
/**
* Get all values of property First as an Iterator over RDF2Go nodes
* @param model an RDF2Go model
* @param resource an RDF2Go resource
* @return a ClosableIterator of RDF2Go Nodes
*
* [Generated from RDFReactor template rule #get7static]
*/
public static ClosableIterator<org.ontoware.rdf2go.model.node.Node> getAllFirst_asNode(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource) {
return Base.getAll_asNode(model, instanceResource, FIRST);
}
/**
* Get all values of property First as a ReactorResult of RDF2Go nodes
* @param model an RDF2Go model
* @param resource an RDF2Go resource
* @return a List of RDF2Go Nodes
*
* [Generated from RDFReactor template rule #get7static-reactor-result]
*/
public static ReactorResult<org.ontoware.rdf2go.model.node.Node> getAllFirst_asNode_(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource) {
return Base.getAll_as(model, instanceResource, FIRST, org.ontoware.rdf2go.model.node.Node.class);
}
/**
* Get all values of property First as an Iterator over RDF2Go nodes
* @return a ClosableIterator of RDF2Go Nodes
*
* [Generated from RDFReactor template rule #get8dynamic]
*/
public ClosableIterator<org.ontoware.rdf2go.model.node.Node> getAllFirst_asNode() {
return Base.getAll_asNode(this.model, this.getResource(), FIRST);
}
/**
* Get all values of property First as a ReactorResult of RDF2Go nodes
* @return a List of RDF2Go Nodes
*
* [Generated from RDFReactor template rule #get8dynamic-reactor-result]
*/
public ReactorResult<org.ontoware.rdf2go.model.node.Node> getAllFirst_asNode_() {
return Base.getAll_as(this.model, this.getResource(), FIRST, org.ontoware.rdf2go.model.node.Node.class);
}
/**
* Get all values of property First * @param model an RDF2Go model
* @param resource an RDF2Go resource
* @return a ClosableIterator of $type
*
* [Generated from RDFReactor template rule #get11static]
*/
public static ClosableIterator<Resource> getAllFirst(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource) {
return Base.getAll(model, instanceResource, FIRST, Resource.class);
}
/**
* Get all values of property First as a ReactorResult of Resource
* @param model an RDF2Go model
* @param resource an RDF2Go resource
* @return a ReactorResult of $type which can conveniently be converted to iterator, list or array
*
* [Generated from RDFReactor template rule #get11static-reactorresult]
*/
public static ReactorResult<Resource> getAllFirst_as(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource) {
return Base.getAll_as(model, instanceResource, FIRST, Resource.class);
}
/**
* Get all values of property First * @return a ClosableIterator of $type
*
* [Generated from RDFReactor template rule #get12dynamic]
*/
public ClosableIterator<Resource> getAllFirst() {
return Base.getAll(this.model, this.getResource(), FIRST, Resource.class);
}
/**
* Get all values of property First as a ReactorResult of Resource
* @return a ReactorResult of $type which can conveniently be converted to iterator, list or array
*
* [Generated from RDFReactor template rule #get12dynamic-reactorresult]
*/
public ReactorResult<Resource> getAllFirst_as() {
return Base.getAll_as(this.model, this.getResource(), FIRST, Resource.class);
}
/**
* Adds a value to property First as an RDF2Go node
* @param model an RDF2Go model
* @param resource an RDF2Go resource
* @param value the value to be added
*
* [Generated from RDFReactor template rule #add1static]
*/
public static void addFirst( Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value) {
Base.add(model, instanceResource, FIRST, value);
}
/**
* Adds a value to property First as an RDF2Go node
* @param value the value to be added
*
* [Generated from RDFReactor template rule #add1dynamic]
*/
public void addFirst( org.ontoware.rdf2go.model.node.Node value) {
Base.add(this.model, this.getResource(), FIRST, value);
}
/**
* Adds a value to property First from an instance of Resource
* @param model an RDF2Go model
* @param resource an RDF2Go resource
*
* [Generated from RDFReactor template rule #add3static]
*/
public static void addFirst(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, Resource value) {
Base.add(model, instanceResource, FIRST, value);
}
/**
* Adds a value to property First from an instance of Resource
*
* [Generated from RDFReactor template rule #add4dynamic]
*/
public void addFirst(Resource value) {
Base.add(this.model, this.getResource(), FIRST, value);
}
/**
* Sets a value of property First from an RDF2Go node.
* First, all existing values are removed, then this value is added.
* Cardinality constraints are not checked, but this method exists only for properties with
* no minCardinality or minCardinality == 1.
* @param model an RDF2Go model
* @param resource an RDF2Go resource
* @param value the value to be set
*
* [Generated from RDFReactor template rule #set1static]
*/
public static void setFirst( Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value) {
Base.set(model, instanceResource, FIRST, value);
}
/**
* Sets a value of property First from an RDF2Go node.
* First, all existing values are removed, then this value is added.
* Cardinality constraints are not checked, but this method exists only for properties with
* no minCardinality or minCardinality == 1.
* @param value the value to be added
*
* [Generated from RDFReactor template rule #set1dynamic]
*/
public void setFirst( org.ontoware.rdf2go.model.node.Node value) {
Base.set(this.model, this.getResource(), FIRST, value);
}
/**
* Sets a value of property First from an instance of Resource
* First, all existing values are removed, then this value is added.
* Cardinality constraints are not checked, but this method exists only for properties with
* no minCardinality or minCardinality == 1.
* @param model an RDF2Go model
* @param resource an RDF2Go resource
* @param value the value to be added
*
* [Generated from RDFReactor template rule #set3static]
*/
public static void setFirst(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, Resource value) {
Base.set(model, instanceResource, FIRST, value);
}
/**
* Sets a value of property First from an instance of Resource
* First, all existing values are removed, then this value is added.
* Cardinality constraints are not checked, but this method exists only for properties with
* no minCardinality or minCardinality == 1.
* @param value the value to be added
*
* [Generated from RDFReactor template rule #set4dynamic]
*/
public void setFirst(Resource value) {
Base.set(this.model, this.getResource(), FIRST, value);
}
/**
* Removes a value of property First as an RDF2Go node
* @param model an RDF2Go model
* @param resource an RDF2Go resource
* @param value the value to be removed
*
* [Generated from RDFReactor template rule #remove1static]
*/
public static void removeFirst( Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value) {
Base.remove(model, instanceResource, FIRST, value);
}
/**
* Removes a value of property First as an RDF2Go node
* @param value the value to be removed
*
* [Generated from RDFReactor template rule #remove1dynamic]
*/
public void removeFirst( org.ontoware.rdf2go.model.node.Node value) {
Base.remove(this.model, this.getResource(), FIRST, value);
}
/**
* Removes a value of property First given as an instance of Resource
* @param model an RDF2Go model
* @param resource an RDF2Go resource
* @param value the value to be removed
*
* [Generated from RDFReactor template rule #remove3static]
*/
public static void removeFirst(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, Resource value) {
Base.remove(model, instanceResource, FIRST, value);
}
/**
* Removes a value of property First given as an instance of Resource
* @param value the value to be removed
*
* [Generated from RDFReactor template rule #remove4dynamic]
*/
public void removeFirst(Resource value) {
Base.remove(this.model, this.getResource(), FIRST, value);
}
/**
* Removes all values of property First * @param model an RDF2Go model
* @param resource an RDF2Go resource
*
* [Generated from RDFReactor template rule #removeall1static]
*/
public static void removeAllFirst( Model model, org.ontoware.rdf2go.model.node.Resource instanceResource) {
Base.removeAll(model, instanceResource, FIRST);
}
/**
* Removes all values of property First *
* [Generated from RDFReactor template rule #removeall1dynamic]
*/
public void addFirst() {
Base.removeAll(this.model, this.getResource(), FIRST);
}
/**
* Get all values of property Rest as an Iterator over RDF2Go nodes
* @param model an RDF2Go model
* @param resource an RDF2Go resource
* @return a ClosableIterator of RDF2Go Nodes
*
* [Generated from RDFReactor template rule #get7static]
*/
public static ClosableIterator<org.ontoware.rdf2go.model.node.Node> getAllRest_asNode(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource) {
return Base.getAll_asNode(model, instanceResource, REST);
}
/**
* Get all values of property Rest as a ReactorResult of RDF2Go nodes
* @param model an RDF2Go model
* @param resource an RDF2Go resource
* @return a List of RDF2Go Nodes
*
* [Generated from RDFReactor template rule #get7static-reactor-result]
*/
public static ReactorResult<org.ontoware.rdf2go.model.node.Node> getAllRest_asNode_(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource) {
return Base.getAll_as(model, instanceResource, REST, org.ontoware.rdf2go.model.node.Node.class);
}
/**
* Get all values of property Rest as an Iterator over RDF2Go nodes
* @return a ClosableIterator of RDF2Go Nodes
*
* [Generated from RDFReactor template rule #get8dynamic]
*/
public ClosableIterator<org.ontoware.rdf2go.model.node.Node> getAllRest_asNode() {
return Base.getAll_asNode(this.model, this.getResource(), REST);
}
/**
* Get all values of property Rest as a ReactorResult of RDF2Go nodes
* @return a List of RDF2Go Nodes
*
* [Generated from RDFReactor template rule #get8dynamic-reactor-result]
*/
public ReactorResult<org.ontoware.rdf2go.model.node.Node> getAllRest_asNode_() {
return Base.getAll_as(this.model, this.getResource(), REST, org.ontoware.rdf2go.model.node.Node.class);
}
/**
* Get all values of property Rest * @param model an RDF2Go model
* @param resource an RDF2Go resource
* @return a ClosableIterator of $type
*
* [Generated from RDFReactor template rule #get11static]
*/
public static ClosableIterator<List> getAllRest(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource) {
return Base.getAll(model, instanceResource, REST, List.class);
}
/**
* Get all values of property Rest as a ReactorResult of List
* @param model an RDF2Go model
* @param resource an RDF2Go resource
* @return a ReactorResult of $type which can conveniently be converted to iterator, list or array
*
* [Generated from RDFReactor template rule #get11static-reactorresult]
*/
public static ReactorResult<List> getAllRest_as(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource) {
return Base.getAll_as(model, instanceResource, REST, List.class);
}
/**
* Get all values of property Rest * @return a ClosableIterator of $type
*
* [Generated from RDFReactor template rule #get12dynamic]
*/
public ClosableIterator<List> getAllRest() {
return Base.getAll(this.model, this.getResource(), REST, List.class);
}
/**
* Get all values of property Rest as a ReactorResult of List
* @return a ReactorResult of $type which can conveniently be converted to iterator, list or array
*
* [Generated from RDFReactor template rule #get12dynamic-reactorresult]
*/
public ReactorResult<List> getAllRest_as() {
return Base.getAll_as(this.model, this.getResource(), REST, List.class);
}
/**
* Adds a value to property Rest as an RDF2Go node
* @param model an RDF2Go model
* @param resource an RDF2Go resource
* @param value the value to be added
*
* [Generated from RDFReactor template rule #add1static]
*/
public static void addRest( Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value) {
Base.add(model, instanceResource, REST, value);
}
/**
* Adds a value to property Rest as an RDF2Go node
* @param value the value to be added
*
* [Generated from RDFReactor template rule #add1dynamic]
*/
public void addRest( org.ontoware.rdf2go.model.node.Node value) {
Base.add(this.model, this.getResource(), REST, value);
}
/**
* Adds a value to property Rest from an instance of List
* @param model an RDF2Go model
* @param resource an RDF2Go resource
*
* [Generated from RDFReactor template rule #add3static]
*/
public static void addRest(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, List value) {
Base.add(model, instanceResource, REST, value);
}
/**
* Adds a value to property Rest from an instance of List
*
* [Generated from RDFReactor template rule #add4dynamic]
*/
public void addRest(List value) {
Base.add(this.model, this.getResource(), REST, value);
}
/**
* Sets a value of property Rest from an RDF2Go node.
* First, all existing values are removed, then this value is added.
* Cardinality constraints are not checked, but this method exists only for properties with
* no minCardinality or minCardinality == 1.
* @param model an RDF2Go model
* @param resource an RDF2Go resource
* @param value the value to be set
*
* [Generated from RDFReactor template rule #set1static]
*/
public static void setRest( Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value) {
Base.set(model, instanceResource, REST, value);
}
/**
* Sets a value of property Rest from an RDF2Go node.
* First, all existing values are removed, then this value is added.
* Cardinality constraints are not checked, but this method exists only for properties with
* no minCardinality or minCardinality == 1.
* @param value the value to be added
*
* [Generated from RDFReactor template rule #set1dynamic]
*/
public void setRest( org.ontoware.rdf2go.model.node.Node value) {
Base.set(this.model, this.getResource(), REST, value);
}
/**
* Sets a value of property Rest from an instance of List
* First, all existing values are removed, then this value is added.
* Cardinality constraints are not checked, but this method exists only for properties with
* no minCardinality or minCardinality == 1.
* @param model an RDF2Go model
* @param resource an RDF2Go resource
* @param value the value to be added
*
* [Generated from RDFReactor template rule #set3static]
*/
public static void setRest(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, List value) {
Base.set(model, instanceResource, REST, value);
}
/**
* Sets a value of property Rest from an instance of List
* First, all existing values are removed, then this value is added.
* Cardinality constraints are not checked, but this method exists only for properties with
* no minCardinality or minCardinality == 1.
* @param value the value to be added
*
* [Generated from RDFReactor template rule #set4dynamic]
*/
public void setRest(List value) {
Base.set(this.model, this.getResource(), REST, value);
}
/**
* Removes a value of property Rest as an RDF2Go node
* @param model an RDF2Go model
* @param resource an RDF2Go resource
* @param value the value to be removed
*
* [Generated from RDFReactor template rule #remove1static]
*/
public static void removeRest( Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value) {
Base.remove(model, instanceResource, REST, value);
}
/**
* Removes a value of property Rest as an RDF2Go node
* @param value the value to be removed
*
* [Generated from RDFReactor template rule #remove1dynamic]
*/
public void removeRest( org.ontoware.rdf2go.model.node.Node value) {
Base.remove(this.model, this.getResource(), REST, value);
}
/**
* Removes a value of property Rest given as an instance of List
* @param model an RDF2Go model
* @param resource an RDF2Go resource
* @param value the value to be removed
*
* [Generated from RDFReactor template rule #remove3static]
*/
public static void removeRest(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, List value) {
Base.remove(model, instanceResource, REST, value);
}
/**
* Removes a value of property Rest given as an instance of List
* @param value the value to be removed
*
* [Generated from RDFReactor template rule #remove4dynamic]
*/
public void removeRest(List value) {
Base.remove(this.model, this.getResource(), REST, value);
}
/**
* Removes all values of property Rest * @param model an RDF2Go model
* @param resource an RDF2Go resource
*
* [Generated from RDFReactor template rule #removeall1static]
*/
public static void removeAllRest( Model model, org.ontoware.rdf2go.model.node.Resource instanceResource) {
Base.removeAll(model, instanceResource, REST);
}
/**
* Removes all values of property Rest *
* [Generated from RDFReactor template rule #removeall1dynamic]
*/
public void addRest() {
Base.removeAll(this.model, this.getResource(), REST);
}
}