|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.knowledgebooks.API
public class API
The API class is a facade wrapper class for the entire B_bundle product. It is inteneded to expose most of the functionality of the KB_bundle system with a minimal and easy to learn set of APIs.
The home page for the KB_bundle product ishttp://knowledgebooks.com
Copyright 2002-2008 by Mark Watson. All rights reserved.
This software is not public domain. It can be legally
used under either of the following licenses:
1. KnowledgeBooks.com Non Commercial Royality Free License
| Constructor Summary | |
|---|---|
API()
Default constructor stores persistent data in ./temp_data_dir |
|
API(java.lang.String top_data_dir_path,
boolean initialize_all_data)
Constructor stores persistent data in top_data_dir_path |
|
| Method Summary | |
|---|---|
java.lang.String |
abiwordToPlainText(java.lang.String s)
|
boolean |
addInfoSource(java.lang.String uri)
Add a text information resource to local data stores. |
void |
close()
Close database, triple store, and Lucene indices. |
java.lang.String |
doSparqlQuery(java.lang.String sparql)
All information resources added to the system are processed to generate RDF data that is automatically loaded into a local Sesame RDF repository. |
void |
exportAllDatabaseTables(java.lang.String output_dir_path)
Write out all local em=bedded relational daabase data, one file per table, to the specified directory path. |
void |
exportAllRdfAsN3(java.lang.String output_file_path)
Write out all local RDF data to a file in the N3 format. |
void |
exportAllRdfAsTriples(java.lang.String output_file_path)
Write out all local RDF data to a file in the NTriples format. |
java.lang.String |
htmlToPlainText(java.lang.String s)
|
static void |
main(java.lang.String[] args)
Main method for using KB_bundle as a command line utility program |
java.lang.String |
openofficeToPlainText(java.lang.String s)
|
java.lang.String |
pdfToPlainText(java.lang.String s)
|
java.lang.String |
powerpointToPlainText(java.lang.String s)
|
java.util.List<java.lang.String> |
searchAllTextForUris(java.lang.String lucene_query_string)
All information resources added to the system are indexed using Lucene. |
java.util.List<java.lang.String[]> |
searchAllTextForUrisAndMatchedText(java.lang.String lucene_query_string)
All information resources added to the system are indexed using Lucene. |
java.util.List<java.lang.String> |
tag(java.util.ArrayList<java.lang.String> tokens)
|
java.util.List<java.lang.String> |
tokenize(java.lang.String text)
|
java.lang.String |
wordToPlainText(java.lang.String s)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public API()
throws java.lang.Exception
java.lang.Exception
public API(java.lang.String top_data_dir_path,
boolean initialize_all_data)
throws java.lang.Exception
top_data_dir_path - changes default location for Sesame RDF, Lucene, and embedded database filesinitialize_all_data - boolean flag for discarding all previous Sesame RDF, Lucene, and embedded database data and re-initialize
java.lang.Exception| Method Detail |
|---|
public void close()
public boolean addInfoSource(java.lang.String uri)
uri - the URI can be either on the local file syste or on the web
public java.util.List<java.lang.String> searchAllTextForUris(java.lang.String lucene_query_string)
throws java.lang.Exception
lucene_query_string -
java.lang.Exception
public java.util.List<java.lang.String[]> searchAllTextForUrisAndMatchedText(java.lang.String lucene_query_string)
throws java.lang.Exception
lucene_query_string -
java.lang.Exception
public java.lang.String doSparqlQuery(java.lang.String sparql)
throws java.lang.Exception
sparql -
java.lang.Exceptionpublic void exportAllRdfAsN3(java.lang.String output_file_path)
output_file_path - public void exportAllRdfAsTriples(java.lang.String output_file_path)
output_file_path - public void exportAllDatabaseTables(java.lang.String output_dir_path)
output_dir_path - top root file directory path to contain individual files (one per table)public java.util.List<java.lang.String> tokenize(java.lang.String text)
public java.util.List<java.lang.String> tag(java.util.ArrayList<java.lang.String> tokens)
public java.lang.String wordToPlainText(java.lang.String s)
public java.lang.String pdfToPlainText(java.lang.String s)
public java.lang.String htmlToPlainText(java.lang.String s)
public java.lang.String openofficeToPlainText(java.lang.String s)
public java.lang.String powerpointToPlainText(java.lang.String s)
public java.lang.String abiwordToPlainText(java.lang.String s)
public static void main(java.lang.String[] args)
Command line options: -text_2_rdf input text file name output N3 format RDF file -summarize input text file name output summary text file
args - the command line arguments
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||