001: /**
002: * generated by http://RDFReactor.semweb4j.org ($Id: CodeGenerator.java 785 2007-05-31 15:47:01Z voelkel $) on 01.06.07 18:30
003: */package org.rdfs.sioc;
004:
005: import org.ontoware.rdf2go.model.Model;
006: import org.ontoware.rdf2go.model.node.BlankNode;
007: import org.ontoware.rdf2go.model.node.URI;
008: import org.ontoware.rdf2go.model.node.impl.URIImpl;
009: import org.ontoware.rdf2go.exception.ModelRuntimeException;
010:
011: /**
012: * This class was generated by <a href="http://RDFReactor.semweb4j.org">RDFReactor</a> on 01.06.07 18:30
013: */
014: public class OnlineAccount extends Thing {
015:
016: /** http://xmlns.com/foaf/0.1/OnlineAccount */
017: public static final URI RDFS_CLASS = new URIImpl(
018: "http://xmlns.com/foaf/0.1/OnlineAccount", false);
019:
020: /** all property-URIs with this class as domain */
021: public static final URI[] MANAGED_URIS = {
022:
023: };
024:
025: // protected constructors needed for inheritance
026:
027: /**
028: * Returns a Java wrapper over an RDF object, identified by URI.
029: * Creating two wrappers for the same instanceURI is legal.
030: * @param model RDF2GO Model implementation, see http://rdf2go.semweb4j.org
031: * @param classURI URI of RDFS class
032: * @param instanceIdentifier Resource that identifies this instance
033: * @param write if true, the statement (this, rdf:type, TYPE) is written to the model
034: */
035: protected OnlineAccount(Model model, URI classURI,
036: org.ontoware.rdf2go.model.node.Resource instanceIdentifier,
037: boolean write) {
038: super (model, classURI, instanceIdentifier, write);
039: }
040:
041: // public constructors
042:
043: /**
044: * Returns a Java wrapper over an RDF object, identified by URI.
045: * Creating two wrappers for the same instanceURI is legal.
046: * @param model RDF2GO Model implementation, see http://rdf2go.ontoware.org
047: * @param instanceIdentifier an RDF2Go Resource identifying this instance
048: * @param write if true, the statement (this, rdf:type, TYPE) is written to the model
049: */
050: public OnlineAccount(Model model,
051: org.ontoware.rdf2go.model.node.Resource instanceIdentifier,
052: boolean write) {
053: super (model, RDFS_CLASS, instanceIdentifier, write);
054: }
055:
056: /**
057: * Returns a Java wrapper over an RDF object, identified by URI.
058: * Creating two wrappers for the same instanceURI is legal.
059: * The statement (this, rdf:type, TYPE) is written to the model
060: * @param model RDF2GO Model implementation, see http://rdf2go.ontoware.org
061: * @param uri URI of this instance
062: */
063: public OnlineAccount(Model model, URI uri) {
064: this (model, uri, true);
065: }
066:
067: /**
068: * Returns a Java wrapper over an RDF object, identified by URI.
069: * Creating two wrappers for the same instanceURI is legal.
070: * The statement (this, rdf:type, TYPE) is written to the model
071: * @param model RDF2GO Model implementation, see http://rdf2go.ontoware.org
072: * @param uriString A URI of this instance, represented as a String
073: * @throws ModelRuntimeException if URI syntax is wrong
074: */
075: public OnlineAccount(Model model, String uriString)
076: throws ModelRuntimeException {
077: this (model, new URIImpl(uriString), true);
078: }
079:
080: /**
081: * Returns a Java wrapper over an RDF object, identified by a blank node.
082: * Creating two wrappers for the same blank node is legal.
083: * The statement (this, rdf:type, TYPE) is written to the model
084: * @param model RDF2GO Model implementation, see http://rdf2go.ontoware.org
085: * @param bnode BlankNode of this instance
086: */
087: public OnlineAccount(Model model, BlankNode bnode) {
088: this (model, bnode, true);
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: * The statement (this, rdf:type, TYPE) is written to the model
096: * @param model RDF2GO Model implementation, see http://rdf2go.ontoware.org
097: */
098: public OnlineAccount(Model model) {
099: this (model, model.newRandomUniqueURI(), true);
100: }
101:
102: ///////////////////////////////////////////////////////////////////
103: // getters, setters, ...
104:
105: /**
106: * @param model RDF2Go model
107: * @param uri instance identifier
108: * @return an instance of OnlineAccount or null if none existst
109: * @throws Exception if Model causes problems
110: */
111: public static OnlineAccount getInstance(Model model, URI uri)
112: throws Exception {
113: return (OnlineAccount) getInstance(model, uri,
114: OnlineAccount.class);
115: }
116:
117: /**
118: * @param model
119: * @param uri
120: * @return true if uri is an instance of this class in the model
121: */
122: public static boolean hasInstance(Model model, URI uri) {
123: return hasInstance(model, uri, RDFS_CLASS);
124: }
125:
126: /**
127: * @return all instances of this class
128: */
129: public OnlineAccount[] getAllInstances() {
130: return (OnlineAccount[]) getAllInstances(super .model,
131: OnlineAccount.class);
132: }
133:
134: /**
135: * @return all instances of this class in the given Model
136: * @param model an RDF2Go model
137: */
138: public static OnlineAccount[] getAllInstances(Model model) {
139: return (OnlineAccount[]) getAllInstances(model,
140: OnlineAccount.class);
141: }
142:
143: }
|