Java Doc for ReactorBaseImpl.java in  » Search-Engine » semweb4j » org » ontoware » rdfreactor » runtime » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Search Engine » semweb4j » org.ontoware.rdfreactor.runtime 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.ontoware.rdfreactor.runtime.ReactorBaseImpl

All known Subclasses:   org.ontoware.rdfreactor.runtime.example.Person,
ReactorBaseImpl
public class ReactorBaseImpl implements ReactorBase(Code)
ReactorBaseImpl is the base class for instances of classes from the RDFS/OWL schema generated by the code generator.
If a class inheriting from ReactorBaseImpl is instantiated, it represents an instance of a class from an RDFS/OWL schema. The properties of this class instance are stored in an RDF model using RDF2Go (via the static Bridge object) as triples of the form: (this.instanceIdentifier, key, value).
Besides methods for putting, getting and removing properties, the Map Interface is also supported for handling of all properties of this instance in one Map, backed by the actual RDF2Go model.
RDF Reactor uses the following naming: resource - instance of an RDF schema class, identified by the resource ID (an URI or BlankNode), almost all statements about the resource use the resource ID as the object property - a property belongs to a resource, represented by the predicate of a statement about a resource value - value of a property of a resource, represented by the object of the statement with the property as predicate and the resource ID as the subject
author:
   $Author: xamde $
version:
   $Id: ReactorBaseImpl.java,v 1.24 2006/12/05 19:47:28 xamde Exp $


Field Summary
protected  URIclassURI
    
protected  Modelmodel
    

Constructor Summary
public  ReactorBaseImpl(Model model, URI classURI, Resource instanceIdentifier, boolean write)
     Constructor: create a ReactorBaseImpl for the RDFS/OWL schema class identified by classURI, with instanceIdentifier as the identifing URL or BlankNode.
public  ReactorBaseImpl(Model model, URI classURI, Resource instanceIdentifier)
     Constructor: create a ReactorBaseImpl for the RDFS/OWL schema class identified by classURI, with instanceIdentifier as the identifing URL or BlankNode.

Method Summary
public  booleanadd(URI property, Object object)
     Adds a statement (this, prop, o).
public  booleanadd(URI property, Object object, int maxCard)
    
public  ObjectcastTo(Class targetType)
     Cast .this object to the given target Java type.
public  voiddelete()
    
public  booleanequals(Object other)
    
public  Objectget(URI prop, Class returnType)
     Returns the first x in (this, prop, x) if such a statement is in the model.
public  Object[]getAll(URI prop, Class returnType)
     Returns an array of x with (this, prop, x) if such statements are in the model.
public static  Object[]getAllInstances(Model model, Class javaClass)
     Return all instances of the given class.
public static  IteratorgetAllInstancesAsIterator(Model model, Class javaClass, URI classURI)
     Return all instances of the given class as a SubjectResultIterator object.
Parameters:
  model - -underlying RDF2Go model
Parameters:
  javaClass - -the java class representing the class the instances whichshould be returned
Parameters:
  classURI - -URI of the (RDFS/OWL) class.
public  Set<Object>getAll_AsSet(URI prop, Class returnType)
     Get all values for the given property of this resource instance as a Set.
public  Object[]getAll_Inverse(URI property, Node o, Class returnType)
     Get all resources having the given property and value.
public static  ObjectgetInstance(Model model, URI uri, Class javaClass)
    
public  ModelgetModel()
    
public  URIgetRDFSClassURI()
    
public  ResourcegetResource()
    
public static  booleanhasInstance(Model model, URI uri, URI classURI)
    
public  booleanhasValue(URI prop, Object value)
    
public  booleanhasValue(URI prop)
    
public  inthashCode()
    
public  booleanin(Model model)
    
public  booleanisInstanceof(URI classURI)
     Check if .this object is an instance of the given RDFS/OWL class URI.
public  booleanisInstanceof(Class javaClass)
     Check if .this object is an instance of the given Java class.
public  booleanremove(URI prop, Object o)
     Tries to remove a statement (this, prop, o).
public  booleanremove(URI prop, Object o, int minCard)
    
public  booleanremoveAll(URI prop)
    
public  voidset(URI prop, Object o)
     Removes all statements (this, prop, x) and set one anew: (this, prop, o).
public  voidsetAll(URI prop, Object[] o)
     Removes all statements (this, prop, x) and sets anew: (this, prop, o[0]), (this, prop, o[1]), ...
public  voidsetAll(URI prop, Object[] o, int maxCard)
     Removes all statements (this, prop, x) and sets anew: (this, prop, o[0]), (this, prop, o[1]), ...
public  StringtoString()
     implement
See Also:   Object
See Also:    methods a string representation of the instance identifier (URI or blanknode).
public  booleanupdate(URI prop, Object oldValue, Object newValue)
     Looks for a statement (this, prop, oldValue) and replaces it by a new statement (this, prop, newValue).

Field Detail
classURI
protected URI classURI(Code)
the URI of the RDFS class from which this object is an instance



model
protected Model model(Code)
the underlying RDF2Go model in which the triples representing the properties of this object are saved




Constructor Detail
ReactorBaseImpl
public ReactorBaseImpl(Model model, URI classURI, Resource instanceIdentifier, boolean write)(Code)
Constructor: create a ReactorBaseImpl for the RDFS/OWL schema class identified by classURI, with instanceIdentifier as the identifing URL or BlankNode. model,the underlying RDF2Go model classURI,URI of the RDFS/OWL class from which this object is aninstance instanceIdentifier,has to be an URI or URL or BlankNode
Parameters:
  write - if true, the triple (this, rdf:type, classURI) is written tothe model (in addition to any other triples denotingproperties of the instance)



ReactorBaseImpl
public ReactorBaseImpl(Model model, URI classURI, Resource instanceIdentifier)(Code)
Constructor: create a ReactorBaseImpl for the RDFS/OWL schema class identified by classURI, with instanceIdentifier as the identifing URL or BlankNode. Dont write (this, rdf:type, classURI) for this instance to the model. model,the underlying RDF2Go model classURI,URI of the RDFS/OWL class from which this object is aninstance instanceIdentifier,has to be an URI or URL or BlankNode




Method Detail
add
public boolean add(URI property, Object object)(Code)
Adds a statement (this, prop, o). Returns false if this statement has already been in model. True otherwise.
Parameters:
  property - -URI of the property
Parameters:
  object - -value of the property true if value was already in the model



add
public boolean add(URI property, Object object, int maxCard) throws CardinalityException(Code)
Adds a statement (this, prop, o) if the number of statements matching (this, prop, x) is less then maxCard
Parameters:
  property - -URI of the property
Parameters:
  object - -value of the property
Parameters:
  maxCard - -number of occurences of (this, prop, x) allowed in the model true if value was already preset
throws:
  CardinalityException - if the resource already has more then maxCard values for theproperty



castTo
public Object castTo(Class targetType)(Code)
Cast .this object to the given target Java type.
Parameters:
  targetType - -Java type to which to cast this object converted object



delete
public void delete()(Code)
Delete all statements of the form (this, *,*)



equals
public boolean equals(Object other)(Code)
implement
See Also:   Object
See Also:    methods



get
public Object get(URI prop, Class returnType) throws RDFDataException(Code)
Returns the first x in (this, prop, x) if such a statement is in the model. Null otherwise. If there are several x the first is returned (depending on the underlying RDF store). This method is useful for functional properties.
Parameters:
  prop - -URI of the property
Parameters:
  returnType - -desired Java return type null or object typed as returnType
throws:
  RDFDataException -



getAll
public Object[] getAll(URI prop, Class returnType)(Code)
Returns an array of x with (this, prop, x) if such statements are in the model. Null otherwise.
Parameters:
  prop - -URI of the property
Parameters:
  returnType - -desired Java return type all values, array can be empty, never null



getAllInstances
public static Object[] getAllInstances(Model model, Class javaClass)(Code)
Return all instances of the given class.
Parameters:
  model - -underlying RDF2Go model
Parameters:
  javaClass - -the java class representing the class the instances whichshould be returned array of all instances of the given java class in the model



getAllInstancesAsIterator
public static Iterator getAllInstancesAsIterator(Model model, Class javaClass, URI classURI)(Code)
Return all instances of the given class as a SubjectResultIterator object.
Parameters:
  model - -underlying RDF2Go model
Parameters:
  javaClass - -the java class representing the class the instances whichshould be returned
Parameters:
  classURI - -URI of the (RDFS/OWL) class. currently not used SubjectResultIterator over the resulting instances



getAll_AsSet
public Set<Object> getAll_AsSet(URI prop, Class returnType)(Code)
Get all values for the given property of this resource instance as a Set.
Parameters:
  prop - -URI of the property
Parameters:
  returnType - -desired Java return type Set of all values for the given property



getAll_Inverse
public Object[] getAll_Inverse(URI property, Node o, Class returnType)(Code)
Get all resources having the given property and value. Return x matching (x, property, o).
Parameters:
  property - -URI of the property
Parameters:
  o - -value of the property
Parameters:
  returnType - -desired Java return type array of desired returnType representing the found resources



getInstance
public static Object getInstance(Model model, URI uri, Class javaClass) throws Exception(Code)



getModel
public Model getModel()(Code)



getRDFSClassURI
public URI getRDFSClassURI()(Code)
the URI of the RDFS schema class of which this object is aninstance



getResource
public Resource getResource()(Code)
implements
See Also:   ReactorEntity



hasInstance
public static boolean hasInstance(Model model, URI uri, URI classURI)(Code)



hasValue
public boolean hasValue(URI prop, Object value)(Code)

Parameters:
  prop -
Parameters:
  value - true if the model contains the statement (this, prop, value)



hasValue
public boolean hasValue(URI prop)(Code)

Parameters:
  prop - true if the model contains any statement (this, prop, *)



hashCode
public int hashCode()(Code)
implement
See Also:   Object
See Also:    methods



in
public boolean in(Model model)(Code)



isInstanceof
public boolean isInstanceof(URI classURI) throws ModelRuntimeException(Code)
Check if .this object is an instance of the given RDFS/OWL class URI.
Parameters:
  classURI - -URI of the RDFS/OWL class true if .this is an instance of the given classURI



isInstanceof
public boolean isInstanceof(Class javaClass) throws ModelRuntimeException(Code)
Check if .this object is an instance of the given Java class.
Parameters:
  javaClass - -given Java class true if .this is an instance of the given Java Class in the model



remove
public boolean remove(URI prop, Object o)(Code)
Tries to remove a statement (this, prop, o).
Parameters:
  prop - -URI of the property
Parameters:
  o - -value of the property true, if value was present



remove
public boolean remove(URI prop, Object o, int minCard) throws CardinalityException(Code)
Tries to remove a statement (this, prop, o) if the number of statements matching (this, prop, x) in the model is less then minCard
Parameters:
  prop - -URI of the property
Parameters:
  o - -value of the property
Parameters:
  minCard - -number of occurences of (this, prop, x) needed in the model true if value was found
throws:
  CardinalityException - if resource has less then minCard values for the property



removeAll
public boolean removeAll(URI prop)(Code)
remove all (this, rdf:type, prop) statements prop,Object of a Triple



set
public void set(URI prop, Object o)(Code)
Removes all statements (this, prop, x) and set one anew: (this, prop, o).
Parameters:
  prop - -URI of the property
Parameters:
  o - -new value for the property



setAll
public void setAll(URI prop, Object[] o) throws ModelRuntimeException(Code)
Removes all statements (this, prop, x) and sets anew: (this, prop, o[0]), (this, prop, o[1]), ...
Parameters:
  prop - -URI of the property
Parameters:
  o - -array of new values for the property



setAll
public void setAll(URI prop, Object[] o, int maxCard) throws ModelRuntimeException, CardinalityException(Code)
Removes all statements (this, prop, x) and sets anew: (this, prop, o[0]), (this, prop, o[1]), ... But only if the number of objects in o[] is less than or equal to maxCard.
Parameters:
  prop - -URI of the property
Parameters:
  o - -array of new values of the property
Parameters:
  maxCard - -the maximum number of triples allowed to match (this, prop, x)
throws:
  CardinalityException -
throws:
  CardinalityException - if the size of o[] is larger then maxCard



toString
public String toString()(Code)
implement
See Also:   Object
See Also:    methods a string representation of the instance identifier (URI or blanknode). Representations are dependant on the used RDF2Go adaptor.



update
public boolean update(URI prop, Object oldValue, Object newValue)(Code)
Looks for a statement (this, prop, oldValue) and replaces it by a new statement (this, prop, newValue). If the first cannot be found, false is returned, true otherwise.
Parameters:
  prop - -URI of the property
Parameters:
  oldValue - -old value of the property
Parameters:
  newValue - -new value of the property true if old value was found



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.