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


java.lang.Object
   com.hp.hpl.jena.util.ResourceUtils

ResourceUtils
public class ResourceUtils (Code)

General utility methods that operate on RDF resources, but which are not specific to a given model.


author:
   Ian Dickinson, HP Labs
author:
   (email)
version:
   CVS $Id: ResourceUtils.java,v 1.16 2008/01/02 12:07:44 andy_seaborne Exp $




Method Summary
public static  ListmaximalLowerElements(Collection resources, Property rel, boolean inverse)
    

Answer the maximal lower elements of the given collection, given the partial ordering rel.

public static  ListmaximalLowerElements(Iterator resources, Property rel, boolean inverse)
    

Given a collection of resources, and a relation defining a partial order over those resources, answer the sub-collection that contains only those elements that appear in the maximal generator of the relation.

public static  Listpartition(List l, Property p)
    

Answer a list of lists, which is a partition of the given input list of resources.

public static  ModelreachableClosure(Resource root)
    

Answer a model that contains all of the resources reachable from a given resource by any property, transitively.

public static  ListremoveEquiv(List l, Property p, Resource ref)
    

Remove from the given list l of Resource Resources , any Resource that is equivalent to the reference resource ref under the relation p.

public static  ResourcerenameResource(Resource old, String uri)
    

Answer a new resource that occupies the same position in the graph as the current resource old, but that has the given URI.




Method Detail
maximalLowerElements
public static List maximalLowerElements(Collection resources, Property rel, boolean inverse)(Code)

Answer the maximal lower elements of the given collection, given the partial ordering rel. See ResourceUtils.maximalLowerElements(Iterator,Property,boolean) for details.


Parameters:
  resources - A collection of resources
Parameters:
  rel - A property defining a partial-ordering on resources
Parameters:
  inverse - If true, we invert the given property (by reversing the orderof the arguments), which allows us to use eg subClassOf as a partial order operator for both sub-class and super-class relationships The collection that contains only those resources are notgreater than another resource under the partial order.



maximalLowerElements
public static List maximalLowerElements(Iterator resources, Property rel, boolean inverse)(Code)

Given a collection of resources, and a relation defining a partial order over those resources, answer the sub-collection that contains only those elements that appear in the maximal generator of the relation. Specifically, a resource x is excluded from the return value if there is another resource y in the input collection such that y Rel x holds.


Parameters:
  resources - An iterator over a collection of resources
Parameters:
  rel - A property defining a partial-ordering on resources
Parameters:
  inverse - If true, we invert the given property (by reversing the orderof the arguments), which allows us to use eg subClassOf as a partial order operator for both sub-class and super-class relationships The list that contains only those resources are notgreater than another resource under the partial order.



partition
public static List partition(List l, Property p)(Code)

Answer a list of lists, which is a partition of the given input list of resources. The equivalence relation is the predicate p. So, two resources a and b will be in the same partition iff (a p b) && (b p a).


Parameters:
  l - A list of resources
Parameters:
  p - An equivalence predicate A list of lists which are the partitions of l under p



reachableClosure
public static Model reachableClosure(Resource root)(Code)

Answer a model that contains all of the resources reachable from a given resource by any property, transitively. The returned graph is the sub-graph of the parent graph of root, whose root node is the given root. Cycles are permitted in the sub-graph.


Parameters:
  root - The root node of the sub-graph to extract A model containing all reachable RDFNodes from root by any property.



removeEquiv
public static List removeEquiv(List l, Property p, Resource ref)(Code)

Remove from the given list l of Resource Resources , any Resource that is equivalent to the reference resource ref under the relation p. Typically, p will be owl:subClassOf or owl:subPropertyOf or some similar predicate. A resource R is defined to be equivalent to ref iff R p ref is true and ref p R is true.

The equivalent resources are removed from list l in place, the return value is the list of removed resources.


Parameters:
  l - A list of resources from which the resources equivalent to ref will be removed
Parameters:
  p - An equivalence predicate
Parameters:
  ref - A reference resource A list of the resources removed from the parameter list l



renameResource
public static Resource renameResource(Resource old, String uri)(Code)

Answer a new resource that occupies the same position in the graph as the current resource old, but that has the given URI. In the process, the existing statements referring to old are removed. Since Jena does not allow the identity of a resource to change, this is the closest approximation to a rename operation that works.

Notes: This method does minimal checking, so renaming a resource to its own URI is unpredictable. Furthermore, it is a general and simple approach, and in given applications it may be possible to do this operation more efficiently. Finally, if res is a property, existing statements that use the property will not be renamed, nor will occurrences of res in other models.


Parameters:
  old - An existing resource in a given model
Parameters:
  uri - A new URI for resource old, or null to rename old to a bNode A new resource that occupies the same position in the graph as old, but whichhas the new given URI.



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.