|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectmaito.browsing.ResourceBrowser
public class ResourceBrowser
A class that can be used for creating a view into the data in the resource database. Data is retrieved through sql queries. After a query is executed the data is available through the getResources() and getRelations() methods. Queries can also be used for deleting data from the database.
| Constructor Summary | |
|---|---|
ResourceBrowser()
Creates a new ResourceBrowser instance. |
|
| Method Summary | |
|---|---|
void |
executeSQL(java.lang.String sql,
java.lang.String graph)
Executes an SQL query in the resource database. |
java.lang.String[] |
getFileFormats()
Returns all file formats that are supported by the FileExporter. |
java.lang.String[] |
getGraphs()
Returns all existing resource graphs. |
static void |
main(java.lang.String[] args)
|
Resource |
nextResource()
Returns the next Resource object produced by the latest query. |
boolean |
writeToFile(java.lang.String filename,
java.lang.String format)
Writes the current view into a file. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ResourceBrowser()
throws java.lang.RuntimeException
java.lang.RuntimeException - Thrown when a database connection cannot be created.| Method Detail |
|---|
public java.lang.String[] getGraphs()
public Resource nextResource()
throws java.sql.SQLException
java.sql.SQLExceptionpublic java.lang.String[] getFileFormats()
public void executeSQL(java.lang.String sql,
java.lang.String graph)
throws java.sql.SQLException
sql - The SQL query to be executed. The query must be syntactically correct SQL.
Table names must be in format: database.table.graph - The name of the database where the query is executed.
Must be one of the Strings returned by getGraphs().
java.sql.SQLException
public boolean writeToFile(java.lang.String filename,
java.lang.String format)
filename - The path and filename of the file.format - The format of the file. Must one of the supported formats.
public static void main(java.lang.String[] args)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||