Java Doc for Util.java in  » RSS-RDF » Jena-2.5.5 » com » hp » hpl » jena » reasoner » rulesys » 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 » RSS RDF » Jena 2.5.5 » com.hp.hpl.jena.reasoner.rulesys 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.hp.hpl.jena.reasoner.rulesys.Util

Util
public class Util (Code)
A small random collection of utility functions used by the rule systems.
author:
   Dave Reynolds
version:
   $Revision: 1.30 $ on $Date: 2008/01/02 12:07:48 $




Method Summary
public static  BooleancheckBinaryPredicate(Property predicate, Resource configuration)
     Helper method - extracts the truth of a boolean configuration predicate.
public static  intcompareInstants(Node n1, Node n2)
     Compare two time Instant nodes.
public static  intcompareNumbers(Node n1, Node n2)
     Compare two numeric nodes.
public static  booleanconvertBooleanPredicateArg(Property parameter, Object value)
     Convert the value of a boolean configuration parameter to a boolean value.
public static  intconvertIntegerPredicateArg(Property parameter, Object value)
     Convert the value of an integer configuration parameter to an int value.
public static  ListconvertList(Node root, RuleContext context)
    
public static  intgetIntValue(Node n)
    
public static  IntegergetIntegerPredicate(Property predicate, Resource configuration)
     Helper method - extracts the value of an integer configuration predicate.
public static  NodegetPropValue(Node root, Node prop, Finder context)
     Helper - returns the (singleton) value for the given property on the given root node in the data graph.
public static  NodegetPropValue(Node root, Node prop, Graph context)
     Helper - returns the (singleton) value for the given property on the given root node in the data graph.
public static  NodegetPropValue(Node root, Node prop, RuleContext context)
     Helper - returns the (singleton) value for the given property on the given root node in the data graph.
public static  booleanisInstant(Node n)
    
public static  booleanisNumeric(Node n)
    
public static  StringloadResourceFile(String filename)
     Open a resource file and read it all into a single string.
public static  Rule.ParserloadRuleParserFromResourceFile(String filename)
     Open a resource file and read it all into a single string.
public static  StringloadURLFile(String urlStr)
     Open a file defined by a URL and read all of it into a single string.
public static  NodemakeDoubleNode(double value)
    
public static  NodemakeIntNode(int value)
    
public static  NodemakeList(Node[] nodes, Graph graph)
     Construct an RDF list from the given array of nodes and assert it in the graph returning the head of the list.
public static  NodemakeLongNode(long value)
    
public static  voidupdateParameter(Resource config, Property parameter, Object value)
     Replace the value for a given parameter on the resource by a new value.



Method Detail
checkBinaryPredicate
public static Boolean checkBinaryPredicate(Property predicate, Resource configuration)(Code)
Helper method - extracts the truth of a boolean configuration predicate.
Parameters:
  predicate - the predicate to be tested
Parameters:
  configuration - the configuration node null if there is no setting otherwise a Boolean giving the setting value



compareInstants
public static int compareInstants(Node n1, Node n2)(Code)
Compare two time Instant nodes.
Parameters:
  n1 - the first time instant (XSDDateTime) valued literal node
Parameters:
  n2 - the second time instant (XSDDateTime) valued literal node -1 if n1 is less than n2, 0 if n1 equals n2 and +1 if n1 greater than n2
throws:
  ClassCastException - if either not is not numeric



compareNumbers
public static int compareNumbers(Node n1, Node n2)(Code)
Compare two numeric nodes.
Parameters:
  n1 - the first numeric valued literal node
Parameters:
  n2 - the second numeric valued literal node -1 if n1 is less than n2, 0 if n1 equals n2 and +1 if n1 greater than n2
throws:
  ClassCastException - if either node is not numeric



convertBooleanPredicateArg
public static boolean convertBooleanPredicateArg(Property parameter, Object value)(Code)
Convert the value of a boolean configuration parameter to a boolean value. Allows the value to be specified using a String or Boolean.
Parameters:
  parameter - the configuration property being set (to help with error messages)
Parameters:
  value - the parameter value the converted value
throws:
  IllegalParameterException - if the value can't be converted



convertIntegerPredicateArg
public static int convertIntegerPredicateArg(Property parameter, Object value)(Code)
Convert the value of an integer configuration parameter to an int value. Allows the value to be specified using a String or Number.
Parameters:
  parameter - the configuration property being set (to help with error messages)
Parameters:
  value - the parameter value the converted value
throws:
  IllegalParameterException - if the value can't be converted



convertList
public static List convertList(Node root, RuleContext context)(Code)
Convert an (assumed well formed) RDF list to a java list of Nodes
Parameters:
  root - the root node of the list
Parameters:
  context - the graph containing the list assertions



getIntValue
public static int getIntValue(Node n)(Code)
Return the integer value of a literal node



getIntegerPredicate
public static Integer getIntegerPredicate(Property predicate, Resource configuration)(Code)
Helper method - extracts the value of an integer configuration predicate.
Parameters:
  predicate - the predicate to be tested
Parameters:
  configuration - the configuration node null if there is no such configuration parameter otherwise the value as an integer



getPropValue
public static Node getPropValue(Node root, Node prop, Finder context)(Code)
Helper - returns the (singleton) value for the given property on the given root node in the data graph.



getPropValue
public static Node getPropValue(Node root, Node prop, Graph context)(Code)
Helper - returns the (singleton) value for the given property on the given root node in the data graph.



getPropValue
public static Node getPropValue(Node root, Node prop, RuleContext context)(Code)
Helper - returns the (singleton) value for the given property on the given root node in the data graph.



isInstant
public static boolean isInstant(Node n)(Code)
Check whether a Node is an Instant (DateTime) value



isNumeric
public static boolean isNumeric(Node n)(Code)
Check whether a Node is a numeric (integer) value



loadResourceFile
public static String loadResourceFile(String filename)(Code)
Open a resource file and read it all into a single string. Treats lines starting with # as comment lines, as per stringFromReader.



loadRuleParserFromResourceFile
public static Rule.Parser loadRuleParserFromResourceFile(String filename)(Code)
Open a resource file and read it all into a single string. Treats lines starting with # as comment lines, as per stringFromReader



loadURLFile
public static String loadURLFile(String urlStr) throws IOException(Code)
Open a file defined by a URL and read all of it into a single string. If the URL fails it will try a plain file name as well.



makeDoubleNode
public static Node makeDoubleNode(double value)(Code)
Construct a new double valued node



makeIntNode
public static Node makeIntNode(int value)(Code)
Construct a new integer valued node



makeList
public static Node makeList(Node[] nodes, Graph graph)(Code)
Construct an RDF list from the given array of nodes and assert it in the graph returning the head of the list.



makeLongNode
public static Node makeLongNode(long value)(Code)
Construct a new long valued node



updateParameter
public static void updateParameter(Resource config, Property parameter, Object value)(Code)
Replace the value for a given parameter on the resource by a new value.
Parameters:
  config - the resource whose values are to be updated
Parameters:
  parameter - a predicate defining the parameter to be set
Parameters:
  value - the new value



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.