001: /**
002: * generated by http://RDFReactor.semweb4j.org ($Id: CodeGenerator.java 1046 2008-01-26 14:38:26Z max.at.xam.de $) on 26.01.08 15:47
003: */package com.example;
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 manages access to these properties:
016: * <ul>
017: * <li> Uuu2 </li>
018: * </ul>
019: *
020: * This class was generated by <a href="http://RDFReactor.semweb4j.org">RDFReactor</a> on 26.01.08 15:47
021: */
022: public class III extends Thing {
023:
024: /** urn:ex:III */
025: public static final URI RDFS_CLASS = new URIImpl("urn:ex:III",
026: false);
027:
028: /** urn:ex:uuu2 */
029: public static final URI UUU2 = new URIImpl("urn:ex:uuu2", false);
030:
031: /** all property-URIs with this class as domain */
032: public static final URI[] MANAGED_URIS = { new URIImpl(
033: "urn:ex:uuu2", false) };
034:
035: // protected constructors needed for inheritance
036:
037: /**
038: * Returns a Java wrapper over an RDF object, identified by URI.
039: * Creating two wrappers for the same instanceURI is legal.
040: * @param model RDF2GO Model implementation, see http://rdf2go.semweb4j.org
041: * @param classURI URI of RDFS class
042: * @param instanceIdentifier Resource that identifies this instance
043: * @param write if true, the statement (this, rdf:type, TYPE) is written to the model
044: *
045: * [Generated from RDFReactor template rule #c1]
046: */
047: protected III(Model model, URI classURI,
048: org.ontoware.rdf2go.model.node.Resource instanceIdentifier,
049: boolean write) {
050: super (model, classURI, instanceIdentifier, write);
051: }
052:
053: // public constructors
054:
055: /**
056: * Returns a Java wrapper over an RDF object, identified by URI.
057: * Creating two wrappers for the same instanceURI is legal.
058: * @param model RDF2GO Model implementation, see http://rdf2go.ontoware.org
059: * @param instanceIdentifier an RDF2Go Resource identifying this instance
060: * @param write if true, the statement (this, rdf:type, TYPE) is written to the model
061: *
062: * [Generated from RDFReactor template rule #c2]
063: */
064: public III(Model model,
065: org.ontoware.rdf2go.model.node.Resource instanceIdentifier,
066: boolean write) {
067: super (model, RDFS_CLASS, instanceIdentifier, write);
068: }
069:
070: /**
071: * Returns a Java wrapper over an RDF object, identified by a URI, given as a String.
072: * Creating two wrappers for the same URI is legal.
073: * @param model RDF2GO Model implementation, see http://rdf2go.ontoware.org
074: * @param uriString a URI given as a String
075: * @param write if true, the statement (this, rdf:type, TYPE) is written to the model
076: * @throws ModelRuntimeException if URI syntax is wrong
077: *
078: * [Generated from RDFReactor template rule #c7]
079: */
080: public III(Model model, String uriString, boolean write)
081: throws ModelRuntimeException {
082: super (model, RDFS_CLASS, new URIImpl(uriString, false), write);
083: }
084:
085: /**
086: * Returns a Java wrapper over an RDF object, identified by a blank node.
087: * Creating two wrappers for the same blank node is legal.
088: * @param model RDF2GO Model implementation, see http://rdf2go.ontoware.org
089: * @param bnode BlankNode of this instance
090: * @param write if true, the statement (this, rdf:type, TYPE) is written to the model
091: *
092: * [Generated from RDFReactor template rule #c8]
093: */
094: public III(Model model, BlankNode bnode, boolean write) {
095: super (model, RDFS_CLASS, bnode, write);
096: }
097:
098: /**
099: * Returns a Java wrapper over an RDF object, identified by
100: * a randomly generated URI.
101: * Creating two wrappers results in different URIs.
102: * @param model RDF2GO Model implementation, see http://rdf2go.ontoware.org
103: * @param write if true, the statement (this, rdf:type, TYPE) is written to the model
104: *
105: * [Generated from RDFReactor template rule #c9]
106: */
107: public III(Model model, boolean write) {
108: super (model, RDFS_CLASS, model.newRandomUniqueURI(), write);
109: }
110:
111: ///////////////////////////////////////////////////////////////////
112: // typing
113:
114: /**
115: * Create a new instance of this class in the model.
116: * That is, create the statement (instanceResource, RDF.type, urn:ex:III).
117: * @param model an RDF2Go model
118: * @param instanceResource an RDF2Go resource
119: *
120: * [Generated from RDFReactor template rule #class1]
121: */
122: public static void createInstance(Model model,
123: org.ontoware.rdf2go.model.node.Resource instanceResource) {
124: Base.createInstance(model, RDFS_CLASS, instanceResource);
125: }
126:
127: /**
128: * @param model an RDF2Go model
129: * @param instanceResource an RDF2Go resource
130: * @return true if instanceResource is an instance of this class in the model
131: *
132: * [Generated from RDFReactor template rule #class2]
133: */
134: public static boolean hasInstance(Model model,
135: org.ontoware.rdf2go.model.node.Resource instanceResource) {
136: return Base.hasInstance(model, RDFS_CLASS, instanceResource);
137: }
138:
139: /**
140: * @param model an RDF2Go model
141: * @return all instances of this class in Model 'model' as RDF resources
142: *
143: * [Generated from RDFReactor template rule #class3]
144: */
145: public static ClosableIterator<org.ontoware.rdf2go.model.node.Resource> getAllInstances(
146: Model model) {
147: return Base.getAllInstances(model, RDFS_CLASS,
148: org.ontoware.rdf2go.model.node.Resource.class);
149: }
150:
151: /**
152: * @param model an RDF2Go model
153: * @return all instances of this class in Model 'model' as a ReactorResult,
154: * which can conveniently be converted to iterator, list or array.
155: *
156: * [Generated from RDFReactor template rule #class3-as]
157: */
158: public static ReactorResult<? extends III> getAllInstance_as(
159: Model model) {
160: return Base.getAllInstances_as(model, RDFS_CLASS, III.class);
161: }
162:
163: /**
164: * Delete all rdf:type from this instance. Other triples are not affected.
165: * @param model an RDF2Go model
166: * @param instanceResource an RDF2Go resource
167: *
168: * [Generated from RDFReactor template rule #class4]
169: */
170: public static void deleteInstance(Model model,
171: org.ontoware.rdf2go.model.node.Resource instanceResource) {
172: Base.deleteInstance(model, RDFS_CLASS, instanceResource);
173: }
174:
175: ///////////////////////////////////////////////////////////////////
176: // property access methods
177:
178: /**
179: * @param model an RDF2Go model
180: * @param objectValue
181: * @return all A's as RDF resources, that have a relation 'Uuu1' to this III instance
182: *
183: * [Generated from RDFReactor template rule #getallinverse1static]
184: */
185: public static ClosableIterator<org.ontoware.rdf2go.model.node.Resource> getAllUuu1_Inverse(
186: Model model, Object objectValue) {
187: return Base.getAll_Inverse(model, GGG.UUU1, objectValue);
188: }
189:
190: /**
191: * Get all values of property Uuu2 as an Iterator over RDF2Go nodes
192: * @param model an RDF2Go model
193: * @param resource an RDF2Go resource
194: * @return a ClosableIterator of RDF2Go Nodes
195: *
196: * [Generated from RDFReactor template rule #get7static]
197: */
198: public static ClosableIterator<org.ontoware.rdf2go.model.node.Node> getAllUuu2_asNode(
199: Model model,
200: org.ontoware.rdf2go.model.node.Resource instanceResource) {
201: return (ClosableIterator<org.ontoware.rdf2go.model.node.Node>) Base
202: .getAll_asNode(model, instanceResource, UUU2);
203: }
204:
205: /**
206: * Get all values of property Uuu2 as a ReactorResult of RDF2Go nodes
207: * @param model an RDF2Go model
208: * @param resource an RDF2Go resource
209: * @return a List of RDF2Go Nodes
210: *
211: * [Generated from RDFReactor template rule #get7static-reactor-result]
212: */
213: public static ReactorResult<org.ontoware.rdf2go.model.node.Node> getAllUuu2_asNode_(
214: Model model,
215: org.ontoware.rdf2go.model.node.Resource instanceResource) {
216: return (ReactorResult<org.ontoware.rdf2go.model.node.Node>) Base
217: .getAll_as(model, instanceResource, UUU2,
218: org.ontoware.rdf2go.model.node.Node.class);
219: }
220:
221: /**
222: * Get all values of property Uuu2 as an Iterator over RDF2Go nodes
223: * @return a ClosableIterator of RDF2Go Nodes
224: *
225: * [Generated from RDFReactor template rule #get8dynamic]
226: */
227: public ClosableIterator<org.ontoware.rdf2go.model.node.Node> getAllUuu2_asNode() {
228: return (ClosableIterator<org.ontoware.rdf2go.model.node.Node>) Base
229: .getAll_asNode(this .model, this .getResource(), UUU2);
230: }
231:
232: /**
233: * Get all values of property Uuu2 as a ReactorResult of RDF2Go nodes
234: * @return a List of RDF2Go Nodes
235: *
236: * [Generated from RDFReactor template rule #get8dynamic-reactor-result]
237: */
238: public ReactorResult<org.ontoware.rdf2go.model.node.Node> getAllUuu2_asNode_() {
239: return (ReactorResult<org.ontoware.rdf2go.model.node.Node>) Base
240: .getAll_as(this .model, this .getResource(), UUU2,
241: org.ontoware.rdf2go.model.node.Node.class);
242: }
243:
244: /**
245: * Get all values of property Uuu2 as ReactorResult of java.lang.Integer
246: * @param model an RDF2Go model
247: * @param resource an RDF2Go resource
248: * @return a ClosableIterator of java.lang.Integer
249: *
250: * [Generated from RDFReactor template rule #get9static]
251: */
252: public static ReactorResult<java.lang.Integer> getAllUuu2_asjava_lang_Integer(
253: Model model,
254: org.ontoware.rdf2go.model.node.Resource instanceResource) {
255: return Base.getAll_as(model, instanceResource, UUU2,
256: java.lang.Integer.class);
257: }
258:
259: /**
260: * Get all values of property Uuu2 as ReactorResult of java.lang.Integer
261: * @return a ClosableIterator of java.lang.Integer
262: *
263: * [Generated from RDFReactor template rule #get10dynamic]
264: */
265: public ReactorResult<java.lang.Integer> getAllUuu2_asjava_lang_Integer() {
266: return Base.getAll_as(this .model, this .getResource(), UUU2,
267: java.lang.Integer.class);
268: }
269:
270: /**
271: * Get all values of property Uuu2 as ReactorResult of java.lang.Integer
272: * @param model an RDF2Go model
273: * @param resource an RDF2Go resource
274: * @return a ClosableIterator of JJJ
275: *
276: * [Generated from RDFReactor template rule #get9static]
277: */
278: public static ReactorResult<JJJ> getAllUuu2_asJJJ(Model model,
279: org.ontoware.rdf2go.model.node.Resource instanceResource) {
280: return Base.getAll_as(model, instanceResource, UUU2, JJJ.class);
281: }
282:
283: /**
284: * Get all values of property Uuu2 as ReactorResult of JJJ
285: * @return a ClosableIterator of JJJ
286: *
287: * [Generated from RDFReactor template rule #get10dynamic]
288: */
289: public ReactorResult<JJJ> getAllUuu2_asJJJ() {
290: return Base.getAll_as(this .model, this .getResource(), UUU2,
291: JJJ.class);
292: }
293:
294: /**
295: * Get all values of property Uuu2 * @param model an RDF2Go model
296: * @param resource an RDF2Go resource
297: * @return a ClosableIterator of $type
298: *
299: * [Generated from RDFReactor template rule #get11static]
300: */
301: public static ClosableIterator<java.lang.Integer> getAllUuu2(
302: Model model,
303: org.ontoware.rdf2go.model.node.Resource instanceResource) {
304: return Base.getAll(model, instanceResource, UUU2,
305: java.lang.Integer.class);
306: }
307:
308: /**
309: * Get all values of property Uuu2 as a ReactorResult of java.lang.Integer
310: * @param model an RDF2Go model
311: * @param resource an RDF2Go resource
312: * @return a ReactorResult of $type which can conveniently be converted to iterator, list or array
313: *
314: * [Generated from RDFReactor template rule #get11static-reactorresult]
315: */
316: public static ReactorResult<java.lang.Integer> getAllUuu2_as(
317: Model model,
318: org.ontoware.rdf2go.model.node.Resource instanceResource) {
319: return Base.getAll_as(model, instanceResource, UUU2,
320: java.lang.Integer.class);
321: }
322:
323: /**
324: * Get all values of property Uuu2 * @return a ClosableIterator of $type
325: *
326: * [Generated from RDFReactor template rule #get12dynamic]
327: */
328: public ClosableIterator<java.lang.Integer> getAllUuu2() {
329: return Base.getAll(this .model, this .getResource(), UUU2,
330: java.lang.Integer.class);
331: }
332:
333: /**
334: * Get all values of property Uuu2 as a ReactorResult of java.lang.Integer
335: * @return a ReactorResult of $type which can conveniently be converted to iterator, list or array
336: *
337: * [Generated from RDFReactor template rule #get12dynamic-reactorresult]
338: */
339: public ReactorResult<java.lang.Integer> getAllUuu2_as() {
340: return Base.getAll_as(this .model, this .getResource(), UUU2,
341: java.lang.Integer.class);
342: }
343:
344: /**
345: * Adds a value to property Uuu2 as an RDF2Go node
346: * @param model an RDF2Go model
347: * @param resource an RDF2Go resource
348: * @param value the value to be added
349: *
350: * [Generated from RDFReactor template rule #add1static]
351: */
352: public static void addUuu2(Model model,
353: org.ontoware.rdf2go.model.node.Resource instanceResource,
354: org.ontoware.rdf2go.model.node.Node value) {
355: Base.add(model, instanceResource, UUU2, value);
356: }
357:
358: /**
359: * Adds a value to property Uuu2 as an RDF2Go node
360: * @param value the value to be added
361: *
362: * [Generated from RDFReactor template rule #add1dynamic]
363: */
364: public void addUuu2(org.ontoware.rdf2go.model.node.Node value) {
365: Base.add(this .model, this .getResource(), UUU2, value);
366: }
367:
368: /**
369: * Adds a value to property Uuu2 from an instance of java.lang.Integer
370: * @param model an RDF2Go model
371: * @param resource an RDF2Go resource
372: *
373: * [Generated from RDFReactor template rule #add3static]
374: */
375: public static void addUuu2(Model model,
376: org.ontoware.rdf2go.model.node.Resource instanceResource,
377: java.lang.Integer value) {
378: Base.add(model, instanceResource, UUU2, value);
379: }
380:
381: /**
382: * Adds a value to property Uuu2 from an instance of java.lang.Integer
383: *
384: * [Generated from RDFReactor template rule #add4dynamic]
385: */
386: public void addUuu2(java.lang.Integer value) {
387: Base.add(this .model, this .getResource(), UUU2, value);
388: }
389:
390: /**
391: * Adds a value to property Uuu2 from an instance of JJJ
392: * @param model an RDF2Go model
393: * @param resource an RDF2Go resource
394: *
395: * [Generated from RDFReactor template rule #add3static]
396: */
397: public static void addUuu2(Model model,
398: org.ontoware.rdf2go.model.node.Resource instanceResource,
399: JJJ value) {
400: Base.add(model, instanceResource, UUU2, value);
401: }
402:
403: /**
404: * Adds a value to property Uuu2 from an instance of JJJ
405: *
406: * [Generated from RDFReactor template rule #add4dynamic]
407: */
408: public void addUuu2(JJJ value) {
409: Base.add(this .model, this .getResource(), UUU2, value);
410: }
411:
412: /**
413: * Sets a value of property Uuu2 from an RDF2Go node.
414: * First, all existing values are removed, then this value is added.
415: * Cardinality constraints are not checked, but this method exists only for properties with
416: * no minCardinality or minCardinality == 1.
417: * @param model an RDF2Go model
418: * @param resource an RDF2Go resource
419: * @param value the value to be set
420: *
421: * [Generated from RDFReactor template rule #set1static]
422: */
423: public static void setUuu2(Model model,
424: org.ontoware.rdf2go.model.node.Resource instanceResource,
425: org.ontoware.rdf2go.model.node.Node value) {
426: Base.set(model, instanceResource, UUU2, value);
427: }
428:
429: /**
430: * Sets a value of property Uuu2 from an RDF2Go node.
431: * First, all existing values are removed, then this value is added.
432: * Cardinality constraints are not checked, but this method exists only for properties with
433: * no minCardinality or minCardinality == 1.
434: * @param value the value to be added
435: *
436: * [Generated from RDFReactor template rule #set1dynamic]
437: */
438: public void setUuu2(org.ontoware.rdf2go.model.node.Node value) {
439: Base.set(this .model, this .getResource(), UUU2, value);
440: }
441:
442: /**
443: * Sets a value of property Uuu2 from an instance of java.lang.Integer
444: * First, all existing values are removed, then this value is added.
445: * Cardinality constraints are not checked, but this method exists only for properties with
446: * no minCardinality or minCardinality == 1.
447: * @param model an RDF2Go model
448: * @param resource an RDF2Go resource
449: * @param value the value to be added
450: *
451: * [Generated from RDFReactor template rule #set3static]
452: */
453: public static void setUuu2(Model model,
454: org.ontoware.rdf2go.model.node.Resource instanceResource,
455: java.lang.Integer value) {
456: Base.set(model, instanceResource, UUU2, value);
457: }
458:
459: /**
460: * Sets a value of property Uuu2 from an instance of java.lang.Integer
461: * First, all existing values are removed, then this value is added.
462: * Cardinality constraints are not checked, but this method exists only for properties with
463: * no minCardinality or minCardinality == 1.
464: * @param value the value to be added
465: *
466: * [Generated from RDFReactor template rule #set4dynamic]
467: */
468: public void setUuu2(java.lang.Integer value) {
469: Base.set(this .model, this .getResource(), UUU2, value);
470: }
471:
472: /**
473: * Sets a value of property Uuu2 from an instance of JJJ
474: * First, all existing values are removed, then this value is added.
475: * Cardinality constraints are not checked, but this method exists only for properties with
476: * no minCardinality or minCardinality == 1.
477: * @param model an RDF2Go model
478: * @param resource an RDF2Go resource
479: * @param value the value to be added
480: *
481: * [Generated from RDFReactor template rule #set3static]
482: */
483: public static void setUuu2(Model model,
484: org.ontoware.rdf2go.model.node.Resource instanceResource,
485: JJJ value) {
486: Base.set(model, instanceResource, UUU2, value);
487: }
488:
489: /**
490: * Sets a value of property Uuu2 from an instance of JJJ
491: * First, all existing values are removed, then this value is added.
492: * Cardinality constraints are not checked, but this method exists only for properties with
493: * no minCardinality or minCardinality == 1.
494: * @param value the value to be added
495: *
496: * [Generated from RDFReactor template rule #set4dynamic]
497: */
498: public void setUuu2(JJJ value) {
499: Base.set(this .model, this .getResource(), UUU2, value);
500: }
501:
502: /**
503: * Removes a value of property Uuu2 as an RDF2Go node
504: * @param model an RDF2Go model
505: * @param resource an RDF2Go resource
506: * @param value the value to be removed
507: *
508: * [Generated from RDFReactor template rule #remove1static]
509: */
510: public static void removeUuu2(Model model,
511: org.ontoware.rdf2go.model.node.Resource instanceResource,
512: org.ontoware.rdf2go.model.node.Node value) {
513: Base.remove(model, instanceResource, UUU2, value);
514: }
515:
516: /**
517: * Removes a value of property Uuu2 as an RDF2Go node
518: * @param value the value to be removed
519: *
520: * [Generated from RDFReactor template rule #remove1dynamic]
521: */
522: public void removeUuu2(org.ontoware.rdf2go.model.node.Node value) {
523: Base.remove(this .model, this .getResource(), UUU2, value);
524: }
525:
526: /**
527: * Removes a value of property Uuu2 given as an instance of java.lang.Integer
528: * @param model an RDF2Go model
529: * @param resource an RDF2Go resource
530: * @param value the value to be removed
531: *
532: * [Generated from RDFReactor template rule #remove3static]
533: */
534: public static void removeUuu2(Model model,
535: org.ontoware.rdf2go.model.node.Resource instanceResource,
536: java.lang.Integer value) {
537: Base.remove(model, instanceResource, UUU2, value);
538: }
539:
540: /**
541: * Removes a value of property Uuu2 given as an instance of java.lang.Integer
542: * @param value the value to be removed
543: *
544: * [Generated from RDFReactor template rule #remove4dynamic]
545: */
546: public void removeUuu2(java.lang.Integer value) {
547: Base.remove(this .model, this .getResource(), UUU2, value);
548: }
549:
550: /**
551: * Removes a value of property Uuu2 given as an instance of JJJ
552: * @param model an RDF2Go model
553: * @param resource an RDF2Go resource
554: * @param value the value to be removed
555: *
556: * [Generated from RDFReactor template rule #remove3static]
557: */
558: public static void removeUuu2(Model model,
559: org.ontoware.rdf2go.model.node.Resource instanceResource,
560: JJJ value) {
561: Base.remove(model, instanceResource, UUU2, value);
562: }
563:
564: /**
565: * Removes a value of property Uuu2 given as an instance of JJJ
566: * @param value the value to be removed
567: *
568: * [Generated from RDFReactor template rule #remove4dynamic]
569: */
570: public void removeUuu2(JJJ value) {
571: Base.remove(this .model, this .getResource(), UUU2, value);
572: }
573:
574: /**
575: * Removes all values of property Uuu2 * @param model an RDF2Go model
576: * @param resource an RDF2Go resource
577: *
578: * [Generated from RDFReactor template rule #removeall1static]
579: */
580: public static void removeAllUuu2(Model model,
581: org.ontoware.rdf2go.model.node.Resource instanceResource) {
582: Base.removeAll(model, instanceResource, UUU2);
583: }
584:
585: /**
586: * Removes all values of property Uuu2 *
587: * [Generated from RDFReactor template rule #removeall1dynamic]
588: */
589: public void addUuu2() {
590: Base.removeAll(this.model, this.getResource(), UUU2);
591: }
592: }
|