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


com.hp.hpl.jena.mem.faster.GraphMemFaster
   com.hp.hpl.jena.graph.impl.FileGraph

All known Subclasses:   com.hp.hpl.jena.graph.impl.FileGraphMaker,
FileGraph
public class FileGraph extends GraphMemFaster (Code)
A FileGraph is a memory-based graph that is optionally read in from a file when it is created, and is written back when it is closed. It supports (weak) transactions by using checkpoint files.
author:
   hedgehog

Inner Class :public interface NotifyOnClose

Field Summary
final public  Stringlang
     The language used to read and write the graph, guessed from the filename's suffix.
final protected  Modelmodel
     A model used to wrap the graph for the IO operations (since these are not yet available at the graph level).
final public  Filename
    
final protected  NotifyOnClosenotify
    
protected  TransactionHandlerth
    

Constructor Summary
public  FileGraph(File f, boolean create, boolean strict)
     See FileGraph( f, create, strict, Reifier.ReificationStyle ).
public  FileGraph(NotifyOnClose notify, File f, boolean create, boolean strict, ReificationStyle style)
     Construct a new FileGraph who's name is given by the specified File, If create is true, this is a new file, and any existing file will be destroyed; if create is false, this is an existing file, and its current contents will be loaded.
public  FileGraph(NotifyOnClose notify, File f, String lang, boolean create, boolean strict, ReificationStyle style)
     Construct a new FileGraph who's name is given by the specified File, If create is true, this is a new file, and any existing file will be destroyed; if create is false, this is an existing file, and its current contents will be loaded.
public  FileGraph(String s, boolean create)
     As for FileGraph(File,boolean), except the name is given as a String.

Method Summary
public  voidclose()
     Write out and then close this FileGraph.
public static  FileGraphcreate()
    
public  voiddelete()
     Delete the backing file.
public  TransactionHandlergetTransactionHandler()
    
public static  booleanisPlausibleGraphName(String name)
     Answer true iff the filename string given is plausibly the name of a graph, ie, may have RDF content.
protected  voidmustDelete(File f)
    
protected  voidmustRename(File from, File to)
    
protected  voidreadModel(Model m, boolean strict)
    
protected  voidreadModelFrom(Model m, boolean strict, File name)
    
protected  voidsaveContents(File targetName)
     The graph is written out to the named file in the language guessed from the suffix, and then the parent close is invoked.
protected  voidupdateFrom(File targetName, File intermediate)
     The file intermediate has the new file contents.

Field Detail
lang
final public String lang(Code)
The language used to read and write the graph, guessed from the filename's suffix.



model
final protected Model model(Code)
A model used to wrap the graph for the IO operations (since these are not yet available at the graph level).



name
final public File name(Code)
The File-name of this graph, used to name it in the filing system



notify
final protected NotifyOnClose notify(Code)



th
protected TransactionHandler th(Code)




Constructor Detail
FileGraph
public FileGraph(File f, boolean create, boolean strict)(Code)
See FileGraph( f, create, strict, Reifier.ReificationStyle ).



FileGraph
public FileGraph(NotifyOnClose notify, File f, boolean create, boolean strict, ReificationStyle style)(Code)
Construct a new FileGraph who's name is given by the specified File, If create is true, this is a new file, and any existing file will be destroyed; if create is false, this is an existing file, and its current contents will be loaded. The language code for the file is guessed from its suffix.
Parameters:
  f - the File naming the associated file-system file
Parameters:
  create - true to create a new one, false to read an existing one
Parameters:
  strict - true to throw exceptions for create: existing, open: not found
Parameters:
  style - the reification style for the graph



FileGraph
public FileGraph(NotifyOnClose notify, File f, String lang, boolean create, boolean strict, ReificationStyle style)(Code)
Construct a new FileGraph who's name is given by the specified File, If create is true, this is a new file, and any existing file will be destroyed; if create is false, this is an existing file, and its current contents will be loaded. The language code for the file is supplied.
Parameters:
  f - the File naming the associated file-system file
Parameters:
  lang - the language string for the file
Parameters:
  create - true to create a new one, false to read an existing one
Parameters:
  strict - true to throw exceptions for create: existing, open: not found
Parameters:
  style - the reification style for the graph



FileGraph
public FileGraph(String s, boolean create)(Code)
As for FileGraph(File,boolean), except the name is given as a String.




Method Detail
close
public void close()(Code)
Write out and then close this FileGraph.



create
public static FileGraph create()(Code)



delete
public void delete()(Code)
Delete the backing file. Primarily intended for test cleanup.



getTransactionHandler
public TransactionHandler getTransactionHandler()(Code)



isPlausibleGraphName
public static boolean isPlausibleGraphName(String name)(Code)
Answer true iff the filename string given is plausibly the name of a graph, ie, may have RDF content. We appeal to FileUtils - if it can guess an RDF language name, we deliver true, otherwise false.
Parameters:
  name - the leaf component of a filename true if it is likely to be an RDF file



mustDelete
protected void mustDelete(File f)(Code)



mustRename
protected void mustRename(File from, File to)(Code)



readModel
protected void readModel(Model m, boolean strict)(Code)



readModelFrom
protected void readModelFrom(Model m, boolean strict, File name)(Code)



saveContents
protected void saveContents(File targetName)(Code)
The graph is written out to the named file in the language guessed from the suffix, and then the parent close is invoked. The write-out goes to an intermediate file first, which is then renamed to the correct name, to try and ensure that the output is either done completely or not at all.



updateFrom
protected void updateFrom(File targetName, File intermediate)(Code)
The file intermediate has the new file contents. We want to move them to the current file. renameTo doesn't have a powerful enough semantics, so we anticipate failure and attempt to bypass it ...

If the rename works, that's fine. If it fails, we delete the old file if it exists, and try again.




Methods inherited from com.hp.hpl.jena.mem.faster.GraphMemFaster
public void clear()(Code)(Java Doc)
public Applyer createApplyer(ProcessedTriple pt)(Code)(Java Doc)
protected GraphStatisticsHandler createStatisticsHandler()(Code)(Java Doc)
protected TripleStore createTripleStore()(Code)(Java Doc)
protected void destroy()(Code)(Java Doc)
public boolean graphBaseContains(Triple t)(Code)(Java Doc)
public ExtendedIterator graphBaseFind(TripleMatch m)(Code)(Java Doc)
public int graphBaseSize()(Code)(Java Doc)
protected boolean hasReifications()(Code)(Java Doc)
public static boolean matchesReification(QueryTriple pt)(Code)(Java Doc)
public void performAdd(Triple t)(Code)(Java Doc)
public void performDelete(Triple t)(Code)(Java Doc)
public QueryHandler queryHandler()(Code)(Java Doc)
protected Applyer withReification(Applyer plain, QueryTriple pt)(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.