001: /**
002: * 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
003: */package org.ontoware.rdfreactor.schema.rdfs;
004:
005: import org.ontoware.aifbcommons.collection.ClosableIterator;
006: import org.ontoware.rdf2go.exception.ModelRuntimeException;
007: import org.ontoware.rdf2go.model.Model;
008: import org.ontoware.rdf2go.model.node.BlankNode;
009: import org.ontoware.rdf2go.model.node.URI;
010: import org.ontoware.rdf2go.model.node.impl.URIImpl;
011: import org.ontoware.rdfreactor.runtime.Base;
012: import org.ontoware.rdfreactor.runtime.ReactorResult;
013:
014: /**
015: * This class was generated by <a href="http://RDFReactor.semweb4j.org">RDFReactor</a> on 26.01.08 12:44
016: */
017: public class Ontology extends Resource {
018:
019: /** http://www.w3.org/2002/07/owl#Ontology */
020: public static final URI RDFS_CLASS = new URIImpl(
021: "http://www.w3.org/2002/07/owl#Ontology", false);
022:
023: /** all property-URIs with this class as domain */
024: public static final URI[] MANAGED_URIS = {
025:
026: };
027:
028: // protected constructors needed for inheritance
029:
030: /**
031: * Returns a Java wrapper over an RDF object, identified by URI.
032: * Creating two wrappers for the same instanceURI is legal.
033: * @param model RDF2GO Model implementation, see http://rdf2go.semweb4j.org
034: * @param classURI URI of RDFS class
035: * @param instanceIdentifier Resource that identifies this instance
036: * @param write if true, the statement (this, rdf:type, TYPE) is written to the model
037: *
038: * [Generated from RDFReactor template rule #c1]
039: */
040: protected Ontology(Model model, URI classURI,
041: org.ontoware.rdf2go.model.node.Resource instanceIdentifier,
042: boolean write) {
043: super (model, classURI, instanceIdentifier, write);
044: }
045:
046: // public constructors
047:
048: /**
049: * Returns a Java wrapper over an RDF object, identified by URI.
050: * Creating two wrappers for the same instanceURI is legal.
051: * @param model RDF2GO Model implementation, see http://rdf2go.ontoware.org
052: * @param instanceIdentifier an RDF2Go Resource identifying this instance
053: * @param write if true, the statement (this, rdf:type, TYPE) is written to the model
054: *
055: * [Generated from RDFReactor template rule #c2]
056: */
057: public Ontology(Model model,
058: org.ontoware.rdf2go.model.node.Resource instanceIdentifier,
059: boolean write) {
060: super (model, RDFS_CLASS, instanceIdentifier, write);
061: }
062:
063: /**
064: * Returns a Java wrapper over an RDF object, identified by a URI, given as a String.
065: * Creating two wrappers for the same URI is legal.
066: * @param model RDF2GO Model implementation, see http://rdf2go.ontoware.org
067: * @param uriString a URI given as a String
068: * @param write if true, the statement (this, rdf:type, TYPE) is written to the model
069: * @throws ModelRuntimeException if URI syntax is wrong
070: *
071: * [Generated from RDFReactor template rule #c7]
072: */
073: public Ontology(Model model, String uriString, boolean write)
074: throws ModelRuntimeException {
075: super (model, RDFS_CLASS, new URIImpl(uriString, false), write);
076: }
077:
078: /**
079: * Returns a Java wrapper over an RDF object, identified by a blank node.
080: * Creating two wrappers for the same blank node is legal.
081: * @param model RDF2GO Model implementation, see http://rdf2go.ontoware.org
082: * @param bnode BlankNode of this instance
083: * @param write if true, the statement (this, rdf:type, TYPE) is written to the model
084: *
085: * [Generated from RDFReactor template rule #c8]
086: */
087: public Ontology(Model model, BlankNode bnode, boolean write) {
088: super (model, RDFS_CLASS, bnode, write);
089: }
090:
091: /**
092: * Returns a Java wrapper over an RDF object, identified by
093: * a randomly generated URI.
094: * Creating two wrappers results in different URIs.
095: * @param model RDF2GO Model implementation, see http://rdf2go.ontoware.org
096: * @param write if true, the statement (this, rdf:type, TYPE) is written to the model
097: *
098: * [Generated from RDFReactor template rule #c9]
099: */
100: public Ontology(Model model, boolean write) {
101: super (model, RDFS_CLASS, model.newRandomUniqueURI(), write);
102: }
103:
104: ///////////////////////////////////////////////////////////////////
105: // typing
106:
107: /**
108: * Create a new instance of this class in the model.
109: * That is, create the statement (instanceResource, RDF.type, http://www.w3.org/2002/07/owl#Ontology).
110: * @param model an RDF2Go model
111: * @param instanceResource an RDF2Go resource
112: *
113: * [Generated from RDFReactor template rule #class1]
114: */
115: public static void createInstance(Model model,
116: org.ontoware.rdf2go.model.node.Resource instanceResource) {
117: Base.createInstance(model, RDFS_CLASS, instanceResource);
118: }
119:
120: /**
121: * @param model an RDF2Go model
122: * @param instanceResource an RDF2Go resource
123: * @return true if instanceResource is an instance of this class in the model
124: *
125: * [Generated from RDFReactor template rule #class2]
126: */
127: public static boolean hasInstance(Model model,
128: org.ontoware.rdf2go.model.node.Resource instanceResource) {
129: return Base.hasInstance(model, RDFS_CLASS, instanceResource);
130: }
131:
132: /**
133: * @param model an RDF2Go model
134: * @return all instances of this class in Model 'model' as RDF resources
135: *
136: * [Generated from RDFReactor template rule #class3]
137: */
138: public static ClosableIterator<org.ontoware.rdf2go.model.node.Resource> getAllInstances(
139: Model model) {
140: return Base.getAllInstances(model, RDFS_CLASS,
141: org.ontoware.rdf2go.model.node.Resource.class);
142: }
143:
144: /**
145: * @param model an RDF2Go model
146: * @return all instances of this class in Model 'model' as a ReactorResult,
147: * which can conveniently be converted to iterator, list or array.
148: *
149: * [Generated from RDFReactor template rule #class3-as]
150: */
151: public static ReactorResult<? extends Ontology> getAllInstance_as(
152: Model model) {
153: return Base.getAllInstances_as(model, RDFS_CLASS,
154: Ontology.class);
155: }
156:
157: /**
158: * Delete all rdf:type from this instance. Other triples are not affected.
159: * @param model an RDF2Go model
160: * @param instanceResource an RDF2Go resource
161: *
162: * [Generated from RDFReactor template rule #class4]
163: */
164: public static void deleteInstance(Model model,
165: org.ontoware.rdf2go.model.node.Resource instanceResource) {
166: Base.deleteInstance(model, RDFS_CLASS, instanceResource);
167: }
168:
169: ///////////////////////////////////////////////////////////////////
170: // property access methods
171:
172: }
|