This is about education, research and development

Here you will find things from work or university.

 

(Just found out that Scribd doesn't support Openoffice Math... what a petty!)

 


ABCDarian.org A website for quering and storing documents in the ABCDE format using RDF Studienarbeitsbericht Patrick Tunkl University of Mannheim 813454 for: Knowledge Representation and Knowledge Management Research Group Prof. H. Stuckenschmidt April 8, 2009 1 Contents 1 Technologies 1.1 The ABCDE-Format . . . . . . . . . . . . . . . . . . . . . . . A 1.2 LTEX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A 1.3 ABCDE in LTEX . . . . . . . . . . . . . . . . . . . . . . . . . . 3 3 3 3 4 4 4 5 5 6 6 7 7 8 9 9 11 1.3.1 Annotations . . . . . . . . . . . . . . . . . . . . . . . . 1.3.2 Background, Contribution and Discussion . . . . . . . 1.3.3 Entities . . . . . . . . . . . . . . . . . . . . . . . . . . 1.3.4 What about the abstract? . . . . . . . . . . . . . . . . 1.4 RDF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.5 SPARQL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Task 3 ABCDarian 3.1 What was done in this student research project . . . . . . . . 3.2 Use cases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.3 How to run ABCDarian . . . . . . . . . . . . . . . . . . . . . . 3.4 Progress of ABCDarian . . . . . . . . . . . . . . . . . . . . . 4 ABCDarian Technology 4.1 ABCDarian Namespace . . . . . . . . . . . . . . . . . . . . . 11 4.2 ABCDarian API . . . . . . . . . . . . . . . . . . . . . . . . . . 12 5 Else 6 Attachments 12 14 2 1 Technologies 1.1 The ABCDE-Format One of the major problems with scientific papers is the fact that they are not machine readable in the meaning of understanding what the text is about. The ABCDE Format is an approach to make documents more machine readable by using semantic web technologies making the document more easy to be mined, integrated and consumed by semantic web browsers. A 1.2 LTEX A LTEXis a collection of Macros for TEX, wich is a kind of text processing software for desktop publishing. In difference to other text processors like A Word oder Writer, LTEXand TeX are not WYSIWYG, to create a document you type a kind of sourcecode - the text with latex commands in a simple textfile with can be written wich every simple editor (Berndt (2008))Here is an example: The last word is written \tiny{small} In this sentence the word “small" is written small. Those commands can also be nested. A 1.3 ABCDE in LTEX A Technically an document in the ABCDE-Format is a LTEXfile. But in an ABCDE document there ist some extra annotation which has to be conform to the ABCDE-Latex-Stylesheet. So all Latex files can by transformed into the ABCDE-Format by adding some Latex-Commands.1 An ABCDE-Document is characterized by a special standardized marking of these sections/items: 1 ABCDE is no new fileformat, just and aditional annotation. 3 A Annotations B Background C Contribution D Discussion E Entities The idea behind ABCDE is to let the author mark his document to provide the rich semantic structure. (For more information on ABCDE see: Waard und Tel (2005)2 ) 1.3.1 Annotations Each annotation contains a set of Metadata following the Dublin Core standard (http://dublincore.org/documents/dces/). The minimal required fields are: Title, Creator, Identifier and Date. 1.3.2 Background, Contribution and Discussion Background, Contribution and Discussion are sections of the text which are marked by the commands \background, \contribution and \discussion. A document can have several background-sections and so on. the ABCDEsectioning doesn’t replace the “written” sections, it’s just a logical sectioning. 1.3.3 Entities In addition to the DC-Annotations, other resources in the paper like websites, references, personal names and so on (identified as footnotes in the text) shall also be marked as an Triple (entity, entity URI, type of link (reference, website, person)), so that they can be easily be mined and turned into RDF. 2 http://people.cs.uu.nl/anita/papers/abcde0405.pdf 4 1.3.4 What about the abstract? There is no abstract in an ABCDE-Document because of the Core-Sentences. The core sentences in the document are marked with the \core{...} command and can than be automatically printed at the beginning of the document instead (or in addition to) the abstract. 1.4 RDF Object http://abcdarian.org/file/9023 Pradicate http://abcdarian.org/element/0.1/corsentence Subject „This is a main issue of this dokument“ Figure 1: RDF-Triple RDF is the short term for “Resource Description Framework”, it’s a metadata data model, a way to describe logical coherences from the real world in a machine readable way (Hjelm (2001)). RDF makes it easier for humans to describe and understand, because the data coherance has the apperance of a normal sentence: Subject - Predicate - Object This one chunk of information is called a triple, an language example would be: “The text is colored black”. In this case, “The text” is the subject, “black” the object, and “is colored” the logical link between them, the predi5 cate. In RDF the subject is a resource: a website, an FTP server, or even something out of the real world like a library. The only important thing is: it has to have an URI, an Uniform Resource Identifier, something that describes this and only this resource. In most cases this will be a URL. In spoken language the predicate has the task to describe something, this is the same in RDF, and this is also the big advantage of RDF to other data models: the logical link between two objects is not just a pointer but can be described itself. To work standardized with RDF the predicates should be defined, as they are in Dublin Core standard. The object is the value. 1.5 SPARQL SPARQL (Simple Protocol and RDF Query Language) is a query language for RDF. It’s syntax is kept similar to known query languages, so if to user knows MySQL f.e., he will get used to SPARQL quick (see Hitzler (2008), S.202 ff). Although it is as simple as MySQL, SPARQL queries can be mightier because of the predicate logic of RDF. This simple query finds all capital cities in Africa and the country they are in: PREFIX abc: SELECT ?capital ?country WHERE { ?x abc:cityname ?capital ; abc:isCapitalOf ?y . ?y abc:countryname ?country ; abc:isInContinent abc:Africa . } 2 Task The assignment of this student research project was to build a web application in witch the user can upload a .tex file (witch is in the ABCDE-format) to an RDF-Database, so that all semantic marked information is seberated and accessable in the DB. The RDF database should be queriable by using 6 an OQL Query language like SparQL. A big drawback of this approach is that you need the .tex file to upload, because this is the only source witch can be parsed as an abcde-formated file. If you work with papers from other people you often can only find the final PDF’s, so this database is mostly to be fed by the writers of papers. 3 ABCDarian 3.1 What was done in this student research project The technologies to solve this problem where Java, J2EE, JSF, XHTML, PHP and RDF(SPARQL). The project was written mainly in Java using Eclipse. The whole application runs on a Tomcat servlet container, especially the Sesame libs have to be provided for the RDF functionality. The frontend is rendered by Tomcat from XHTML files which are glued to the JavaBeans. Library management and configuration was solved by using Maven2. There are 4 parsers (Annotation, CoreSentence, BCD, Entity) which convert the .tex file to string, cut this strin into peaces and search for semantically marked parts using regular expressions, depending on the type of parser. The persistence methods write data-triples (subject, predicate, object) to an RDF-Database. The librarys used here are the Sesame Libs from the OpenRDF Project3 . Sesame 1.x used MySQL as the underlaying database system and put the RDF logic on top of it, wich was the easier way to handle the RDFDB.(Broekstra u. a. (2002)) Sesame 2.1.2 however - which was used in this project - uses it’s own files as RDF-databases, so in this project an own simple file/db-handling solution was implemented. I hope that in the future OpenRDF will provide a more sophisticated solution for the DB-handling or switch back to MySQL because the self-implemented file handling has a lot 3 http://www.openrdf.org/ 7 of possible bugs and errors. The Query is held quite simple, it just transforms a string from the frontend input into a query against a selected RDF-Database and return the answer to the frontend. There is no syntax-checking anywhere. Figure 2: The login screen 3.2 Use cases Search for information 1. The user enters a OQL-Query in the text field, selects the Query Language and to RDF-DB. 2. The Query will be executed and the result displayed. Upload a document 1. The user selects a .tex file from his harddrive to be uploaded and the query method depending on which semantic part of the document should be uploaded (Annotations, BCD, Entitys or CoreSentences). 2. The result of the parser will be displayed, it will be automaticaly shown as RDF-compatible triples (for more information on this, see section below). 8 3. The user selects to create a new or an existing DB from the dropdown menu. 4. The data will be written to the database. Figure 3: The main site 3.3 How to run ABCDarian To run ABCDarian on a webserver or computer you have to set an environment variable called ABCDARIAN_HOME in witch the place to save the databases is defined. After that you can simply deploy the .war file. 3.4 Progress of ABCDarian The basic structure of the application is given and an actual version should be reachable at www.abcdarian.org. The frontend with file-upload and query is up and running. RDF-DF-File handling works but is still very simple and there are some known issues 9 Figure 4: The result page 10 (f.e. null-pointer-exception when all databases are erased). Two of the Parsers (CoreSentence and Annotation) are implemented, the other three are not. Results may still contain .tex markup code, because till now only clear A structured LTEXmarkup (escape sign \ + command + braces) is recognized. Also the braces logic is been taken care of. If there is a command in wich different symbols can be used (f.e. the \verb command) there may be some .tex markup left in the code. For this reason, a “Verb-Cleaner” method was implemented and is ready to be included, but has some issues with special encodings on linux systems. Also the ABCDarian Namespace (see section below) should be standardized via permanent links at purl.org like the DC-Namespace. 4 ABCDarian Technology 4.1 ABCDarian Namespace In an ABCDE-Formated .tex-file, only the Annotations and the Entities are ready for RDF because they are already triples of the form “subject-predicateobject”. For all the other sections there has to be an own Namespace to put the RDF-Triples together. (See SparQL Reference: http://www.dajobe.org/2005/04-sparql/SPARQLreference-1.7.pdf for more information). F.e. the ABCDarian RDF-Triple for a CoseSentence is: Subject: The document the Coresentence belongs to. Example: http://abcdarian.org/file/0.8500926890906536892 Predicate: An URI from the ABCDarian Namespace. Example: http://abcdarian.org/element/0.1/coresentence Object: The CoreSentence itself. Example: This is a main issue of this document. 11 4.2 ABCDarian API The ABCDarian Javadoc API can be found attached to the end of this document. 5 Else For testing the application Gerald Tel was so kind to give me the .tex file of his paper about the ABCDE-Format. Thank you very much for that. 12 References [Aduna B.V. 2006] ADUNA B.V.: User Guide for Sesame: Updated for Sesame release 1.2.6. 2006. – URL http://www.openrdf.org/doc/ sesame/users/userguide.html [Berndt 2008] BERNDT, Tobias: LATEX: Der typographische Einstieg. München : Addison - Wesley, 2008 (Open source library). – ISBN 9783827326591 [Broekstra u. a. 2002] BROEKSTRA, Jeen ; KAMPMAN, Arjohn ; HARMELEN, van F. ; INTERNATIONAL SEMANTIC WEB CONFERENCE 2002 (Hrsg.): Sesame: A Generic Architecture for Storing and Querying RDF and RDF Schema. 2002 [Christophides 2008] CHRISTOPHIDES, Vassilis: Semantic web, ontologies and databases: VLDB Workshop, SWDB-ODBIS 2007, Vienna, Austria, September 24, 2007 ; revised selected papers. 2008. – URL http://dx.doi.org/10.1007/978-3-540-70960-2 [Hitzler 2008] HITZLER, Pascal: Semantic Web: Grundlagen. 1. Aufl. Berlin : Springer, 2008 (eXamen.press). – ISBN 9783540339939 [Hjelm 2001] HJELM, Johan: Creating the semantic web with RDF: Professional developer’s guide. New York, NY : Wiley, 2001 (Professional developer’s guide series). – ISBN 0471402591 [Powers 2003] POWERS, Shelley: Practical RDF: [solving problems with the resource description framework]. 1. ed. Beijing : O’Reilly, 2003. – ISBN 0596002637 [Waard und Tel 2005] WAARD, Anita ; TEL, Gerard: The ABCDE Format: Enabling Semantic Conference Proceedings. (2005) 13 6 Attachments 14 Package org.ABCDarian Page 1 of 48 org.ABCDarian.Main org.ABCDarian Class Main java.lang.Object | +-org.ABCDarian.Main public class Main extends java.lang.Object Constructor Summary public Main() Method Summary static void main(java.lang.String[] args) Methods inherited from class java.lang.Object clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait Constructors Main public Main() Methods main public static void main(java.lang.String[] args) Page 2 of 48 org.ABCDarian.SesameTest org.ABCDarian Class SesameTest java.lang.Object | +-org.ABCDarian.SesameTest public class SesameTest extends java.lang.Object And old class to test how sesame works. this is not needed for abcdarian, it's only to see how an RDF-query looks like Constructor Summary public SesameTest() Method Summary void static void void createTestDatabase() main(java.lang.String[] args) storeTestData() Methods inherited from class java.lang.Object clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait Constructors SesameTest public SesameTest() Methods main public static void main(java.lang.String[] args) throws java.lang.Exception Page 3 of 48 org.ABCDarian.SesameTest (continued from last page) createTestDatabase public void createTestDatabase() throws org.openrdf.repository.RepositoryException, org.openrdf.rio.RDFParseException, java.io.IOException storeTestData public void storeTestData() throws org.openrdf.rio.RDFParseException, org.openrdf.repository.RepositoryException, java.io.IOException Page 4 of 48 Package org.ABCDarian.beans Page 5 of 48 org.ABCDarian.beans.ParserResult org.ABCDarian.beans Class ParserResult java.lang.Object | +-org.ABCDarian.beans.ParserResult public class ParserResult extends java.lang.Object This class is a data bean containing the RDF-triple. Getter and Setter for key, predicate and value. See Also: SesameTest Constructor Summary public ParserResult() Method Summary java.lang.String java.lang.String java.lang.String void void void getKey() getPredicate() getValue() setKey(java.lang.String key) setPredicate(java.lang.String predicate) setValue(java.lang.String value) Methods inherited from class java.lang.Object clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait Constructors ParserResult public ParserResult() Methods Page 6 of 48 org.ABCDarian.beans.ParserResult (continued from last page) getKey public java.lang.String getKey() setKey public void setKey(java.lang.String key) getValue public java.lang.String getValue() setValue public void setValue(java.lang.String value) getPredicate public java.lang.String getPredicate() setPredicate public void setPredicate(java.lang.String predicate) Page 7 of 48 Package org.ABCDarian.dao Page 8 of 48 org.ABCDarian.dao.DbManager org.ABCDarian.dao Class DbManager java.lang.Object | +-org.ABCDarian.dao.DbManager public class DbManager extends java.lang.Object Method Summary void java.io.File[] finalize() getAllDatabases() Database Folders relative to org.openrdf.repositor y.sail.SailRepository java.io.File getCurrentRepository(java.lang.String dbFileName) Select or create a new DB If no name is entered, a temporary DB will be created. getDatabaseFile(java.lang.String dbFileName) Gets the DB by using the name as string. static DbManager getInstance() Methods inherited from class java.lang.Object clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait Methods getInstance public final static DbManager getInstance() finalize protected void finalize() throws java.lang.Throwable Page 9 of 48 org.ABCDarian.dao.DbManager (continued from last page) getCurrentRepository public org.openrdf.repository.sail.SailRepository getCurrentRepository(java.lang.String dbFileName) throws org.openrdf.repository.RepositoryException, org.openrdf.rio.RDFParseException, java.io.IOException Select or create a new DB If no name is entered, a temporary DB will be created. Parameters: dbFileName - is the name of the DB to select/create Returns: the DB (selected or created) getAllDatabases public java.io.File[] getAllDatabases() Database Folders relative to Returns: a File array with all database folders. getDatabaseFile public java.io.File getDatabaseFile(java.lang.String dbFileName) Gets the DB by using the name as string. Parameters: dbFileName - is the name of the DB as a string Returns: the DB file Page 10 of 48 org.ABCDarian.dao.Persistance org.ABCDarian.dao Class Persistance java.lang.Object | +-org.ABCDarian.dao.Persistance public class Persistance extends java.lang.Object Contains methods to write Data (RDF-triples) to RDF-DBs and to query RDF-DBs Field Summary public baseURI Constructor Summary public Persistance() Method Summary void executeQuery(java.lang.String dbName, java.lang.String queryString) Query an RDF-Database. static Persistance getInstance() Singleton-stuff static void void o(java.lang.String o) writeStringData(org.openrdf.repository.sail.SailRepository repo, java.lang.String subjectString, java.lang.String predicateString, java.lang.String objectString) Writes a RDF-triple to an RDF-DB Subject, Predicate and object are strings wich are being converted to URIs and literals Methods inherited from class java.lang.Object clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait Fields baseURI public java.lang.String baseURI Constructors Page 11 of 48 org.ABCDarian.dao.Persistance (continued from last page) Persistance public Persistance() Methods o public static void o(java.lang.String o) writeStringData public void writeStringData(org.openrdf.repository.sail.SailRepository repo, java.lang.String subjectString, java.lang.String predicateString, java.lang.String objectString) throws org.openrdf.rio.RDFParseException, org.openrdf.repository.RepositoryException, java.io.IOException Writes a RDF-triple to an RDF-DB Subject, Predicate and object are strings wich are being converted to URIs and literals Parameters: repo - is the DB to be written to subjectString - is the Subject of the RDF-triple predicateString - is the predicate of the RDF-triple objectString - is the object of the RDF-triple executeQuery public void executeQuery(java.lang.String dbName, java.lang.String queryString) throws java.lang.Exception Query an RDF-Database. The query string will not be checked for syntax here. Parameters: dbName - the Name of the RDF-DB queryString - the query to be sent to the RDF-DB Throws: Exception getInstance public static Persistance getInstance() Singleton-stuff Page 12 of 48 org.ABCDarian.dao.RDFormater org.ABCDarian.dao Class RDFormater java.lang.Object | +-org.ABCDarian.dao.RDFormater public class RDFormater extends java.lang.Object Constructor Summary public RDFormater() Method Summary java.lang.String java.lang.String java.lang.String static RDFormater generateAbcadrianURI(java.lang.String element) generateSubjectURI(java.lang.String subject) generateURI(java.lang.String item) getInstance() Singleton-stuff static void main(java.lang.String[] args) Methods inherited from class java.lang.Object clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait Constructors RDFormater public RDFormater() Methods generateURI public java.lang.String generateURI(java.lang.String item) Parameters: Page 13 of 48 org.ABCDarian.dao.RDFormater (continued from last page) item - the string which shall be converted to an ABCDarian-namespace conform URI Returns: the namespace conform string "http://abcdarian.org/..." generateSubjectURI public java.lang.String generateSubjectURI(java.lang.String subject) Parameters: subject - the string which shall be converted to an ABCDarian-namespace conform subject URI Returns: the namespace conform subject string "http://abcdarian.org/file/..." generateAbcadrianURI public java.lang.String generateAbcadrianURI(java.lang.String element) Parameters: element - the string which shall be converted to an ABCDarian-namespace conform predicate URI Returns: abcdarianPredicateURI String "http://abcdarian.org/element/0.1/..." getInstance public static RDFormater getInstance() Singleton-stuff main public static void main(java.lang.String[] args) Page 14 of 48 org.ABCDarian.dao.RDFQuery org.ABCDarian.dao Class RDFQuery java.lang.Object | +-org.ABCDarian.dao.RDFQuery public class RDFQuery extends java.lang.Object Constructor Summary public RDFQuery() Method Summary static RDFQuery getInstance() Singleton-stuff static void java.lang.String main(java.lang.String[] args) sparqlQuery(java.lang.String dfFilePath, java.lang.String queryString) Post a SPARQL-query against a DB Attention: no syntax checking will be done here Methods inherited from class java.lang.Object clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait Constructors RDFQuery public RDFQuery() Methods sparqlQuery public java.lang.String sparqlQuery(java.lang.String dfFilePath, java.lang.String queryString) throws java.lang.Exception Post a SPARQL-query against a DB Attention: no syntax checking will be done here Parameters: dfFilePath - the location of the repository queryString - is the SPARQL query as a string Page 15 of 48 org.ABCDarian.dao.RDFQuery (continued from last page) Returns: the answer from the RDF-repository getInstance public static RDFQuery getInstance() Singleton-stuff main public static void main(java.lang.String[] args) Page 16 of 48 org.ABCDarian.dao.UserDAO org.ABCDarian.dao Class UserDAO java.lang.Object | +-org.ABCDarian.dao.UserDAO public class UserDAO extends java.lang.Object User-Management. For now it only checks a certain Email-password combinations Constructor Summary public UserDAO() Method Summary boolean checkLogin(java.lang.String email, java.lang.String password) Checks login data static UserDAO getInstance() Methods inherited from class java.lang.Object clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait Constructors UserDAO public UserDAO() Methods getInstance public final static UserDAO getInstance() checkLogin public boolean checkLogin(java.lang.String email, java.lang.String password) Checks login data Page 17 of 48 org.ABCDarian.dao.UserDAO (continued from last page) Parameters: email password Returns: true if login is correct Page 18 of 48 Package org.ABCDarian.impl Page 19 of 48 org.ABCDarian.impl.AnnotaionsParser org.ABCDarian.impl Class AnnotaionsParser java.lang.Object | +-org.ABCDarian.impl.AnnotaionsParser public class AnnotaionsParser extends java.lang.Object Class containing the parser for DC-annotations Field Summary public static final IDENT Value: ap public static final NAME Value: AnnotationsParser Constructor Summary public AnnotaionsParser() Method Summary java.util.List annotationsParser(java.io.File texFile) This method extracs the DC-Annotaions from a ABCDE-annotated .tex-file To do that, it converts the .tex file into a huge string, then divides this string into parts beginning with \dublincore - wich is the markup for an DC-element - and then converts these into single lines. static void main(java.lang.String[] args) local test method for the annotations-parser static void o(java.lang.String output) Methods inherited from class java.lang.Object clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait Fields IDENT public static final java.lang.String IDENT Constant value: ap Page 20 of 48 org.ABCDarian.impl.AnnotaionsParser NAME public static final java.lang.String NAME Constant value: AnnotationsParser Constructors AnnotaionsParser public AnnotaionsParser() Methods o public static void o(java.lang.String output) annotationsParser public java.util.List annotationsParser(java.io.File texFile) throws java.io.FileNotFoundException This method extracs the DC-Annotaions from a ABCDE-annotated .tex-file To do that, it converts the .tex file into a huge string, then divides this string into parts beginning with \dublincore - wich is the markup for an DC-element - and then converts these into single lines. There is also a part wich cares about the bracket logic (latex commands can be nested), but it does not care about verbatim (\verb). That is OK, because what is behind verb shall be in the result, only the "\verb+" and "+" later should be cleaned => TODO: verbCleaner Parameters: texFile - the .tex file wich shall be parsed Returns: Throws: FileNotFoundException - if file is not there See Also: Main UploadAndParseAction main public static void main(java.lang.String[] args) local test method for the annotations-parser Parameters: args Page 21 of 48 org.ABCDarian.impl.CoreParser org.ABCDarian.impl Class CoreParser java.lang.Object | +-org.ABCDarian.impl.CoreParser public class CoreParser extends java.lang.Object Field Summary public static final IDENT Value: cp public static final NAME Value: CoreSentenceParser Constructor Summary public CoreParser() Method Summary java.util.List coreParser(java.io.File texFile) This method extracts the core sentences from an ABCDE-annotated .tex file It converts the .tex file into a huge string, cuts it into pieces beginning with \core (the ABCDE-markup for a core sentences)and makes single lines out of them. static CoreParser static void static void getInstance() main(java.lang.String[] args) o(java.lang.String output) Methods inherited from class java.lang.Object clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait Fields IDENT public static final java.lang.String IDENT Constant value: cp Page 22 of 48 org.ABCDarian.impl.CoreParser NAME public static final java.lang.String NAME Constant value: CoreSentenceParser Constructors CoreParser public CoreParser() Methods o public static void o(java.lang.String output) coreParser public java.util.List coreParser(java.io.File texFile) throws java.io.FileNotFoundException This method extracts the core sentences from an ABCDE-annotated .tex file It converts the .tex file into a huge string, cuts it into pieces beginning with \core (the ABCDE-markup for a core sentences)and makes single lines out of them. It then extracts the core sentence while keeping the bracket-logic (there can be brackets with other latex commands be nested. TODO: the other latex-commands like \verb should be deleted, or in case of \footnote deleted with it's contend Parameters: texFile - the .tex file to be parsed Returns: a list containing the core sentences Throws: FileNotFoundException - if file is not there See Also: Main AnnotaionsParser getInstance public static CoreParser getInstance() main public static void main(java.lang.String[] args) Page 23 of 48 org.ABCDarian.impl.TexCleaner org.ABCDarian.impl Class TexCleaner java.lang.Object | +-org.ABCDarian.impl.TexCleaner public class TexCleaner extends java.lang.Object Contains methods to clean the parser results Constructor Summary public TexCleaner() Method Summary static void static java.lang.String main(java.lang.String[] args) verbCleaner(java.lang.String input) cleans \verb markup (latex) from strings Methods inherited from class java.lang.Object clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait Constructors TexCleaner public TexCleaner() Methods verbCleaner public static java.lang.String verbCleaner(java.lang.String input) cleans \verb markup (latex) from strings Parameters: input - is the string wich shall be cleaned vorm latex \verb markup Returns: the cleaned string Page 24 of 48 org.ABCDarian.impl.TexCleaner (continued from last page) main public static void main(java.lang.String[] args) Page 25 of 48 Package org.ABCDarian.jsf Page 26 of 48 org.ABCDarian.jsf.DataController org.ABCDarian.jsf Class DataController java.lang.Object | +-org.ABCDarian.jsf.DataController public class DataController extends java.lang.Object JSF DataController Constructor Summary public DataController() Shows all available DBs Method Summary java.lang.String javax.faces.model.Sel ectItem[] java.lang.String java.lang.String java.lang.String java.lang.String void void void void java.lang.String executeSPARQLQuery() getAllAvailableDatabases() getCurrentResult() getSelectedDB() getSparqlquery() getXterm() setCurrentResult(java.lang.String currentResult) setSelectedDB(java.lang.String selectedDB) setSparqlquery(java.lang.String sparqlquery) setXterm(java.lang.String xterm) writeDataAction() Methods inherited from class java.lang.Object clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait Constructors Page 27 of 48 org.ABCDarian.jsf.DataController (continued from last page) DataController public DataController() Shows all available DBs See Also: DbManager Methods writeDataAction public java.lang.String writeDataAction() throws org.openrdf.repository.RepositoryException, org.openrdf.rio.RDFParseException, java.io.IOException executeSPARQLQuery public java.lang.String executeSPARQLQuery() Returns: See Also: RDFQuery getXterm public java.lang.String getXterm() setXterm public void setXterm(java.lang.String xterm) getSelectedDB public java.lang.String getSelectedDB() setSelectedDB public void setSelectedDB(java.lang.String selectedDB) Page 28 of 48 org.ABCDarian.jsf.DataController (continued from last page) getAllAvailableDatabases public javax.faces.model.SelectItem[] getAllAvailableDatabases() getSparqlquery public java.lang.String getSparqlquery() setSparqlquery public void setSparqlquery(java.lang.String sparqlquery) getCurrentResult public java.lang.String getCurrentResult() setCurrentResult public void setCurrentResult(java.lang.String currentResult) Page 29 of 48 org.ABCDarian.jsf.LoginController org.ABCDarian.jsf Class LoginController java.lang.Object | +-org.ABCDarian.jsf.LoginController public class LoginController extends java.lang.Object Constructor Summary public LoginController() Method Summary java.lang.String static LoginController java.lang.String boolean java.lang.String void void void getEmail() getLoginController() enabling the LoginController everywhere getPassword() isLoggedIn() loginAction() setEmail(java.lang.String email) setLoggedIn(boolean isLoggedIn) setPassword(java.lang.String password) Methods inherited from class java.lang.Object clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait Constructors LoginController public LoginController() Methods Page 30 of 48 org.ABCDarian.jsf.LoginController (continued from last page) loginAction public java.lang.String loginAction() Returns: See Also: UserDAO getLoginController public static LoginController getLoginController() enabling the LoginController everywhere getEmail public java.lang.String getEmail() setEmail public void setEmail(java.lang.String email) getPassword public java.lang.String getPassword() setPassword public void setPassword(java.lang.String password) isLoggedIn public boolean isLoggedIn() setLoggedIn public void setLoggedIn(boolean isLoggedIn) Page 31 of 48 org.ABCDarian.jsf.LoginControllerPhaseListener org.ABCDarian.jsf Class LoginControllerPhaseListener java.lang.Object | +-org.ABCDarian.jsf.LoginControllerPhaseListener All Implemented Interfaces: javax.faces.event.PhaseListener public class LoginControllerPhaseListener extends java.lang.Object implements javax.faces.event.PhaseListener ÃÂberprüft ob ein User eingeloggt ist und sendet einen Redirect auf die Login Seite falls dem nicht so ist ... Checks weather a user is loggeds in and redirects to login if not Constructor Summary public LoginControllerPhaseListener() Method Summary void afterPhase(javax.faces.event.PhaseEvent event) Wird bei jeder JSF-Phase aufgerufen um zu überprüfen ob der User eingeloggt ist. void javax.faces.event.Pha seId beforePhase(javax.faces.event.PhaseEvent arg0) getPhaseId() Methods inherited from class java.lang.Object clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait Methods inherited from interface javax.faces.event.PhaseListener afterPhase, beforePhase, getPhaseId Constructors LoginControllerPhaseListener public LoginControllerPhaseListener() Methods Page 32 of 48 org.ABCDarian.jsf.LoginControllerPhaseListener (continued from last page) afterPhase public void afterPhase(javax.faces.event.PhaseEvent event) Wird bei jeder JSF-Phase aufgerufen um zu überprüfen ob der User eingeloggt ist. beforePhase public void beforePhase(javax.faces.event.PhaseEvent arg0) getPhaseId public javax.faces.event.PhaseId getPhaseId() Page 33 of 48 org.ABCDarian.jsf.MainController org.ABCDarian.jsf Class MainController java.lang.Object | +-org.ABCDarian.jsf.MainController public class MainController extends java.lang.Object Field Summary public static final ABCDARIAN_HOME Value: ABCDARIAN_HOME Constructor Summary public MainController() Method Summary void javax.faces.model.Sel ectItem[] java.lang.String java.util.List java.lang.String java.lang.String org.apache.myfaces.cu stom.fileupload.Uploa dedFile java.lang.String void actionPerformed(javax.faces.event.ActionEvent e) getAllParserMethodSelectItems() getCurrentName() getCurrentResult() getRootPath() getSelectedParserMethod() getUploadFile() myAnnotaions() setAllParserMethodSelectItems(javax.faces.model.SelectItem[] allParserMethodSelectItems) setCurrentName(java.lang.String currentName) setCurrentResult(java.util.List currentResult) setSelectedParserMethod(java.lang.String selectedParserMethod) void void void Page 34 of 48 org.ABCDarian.jsf.MainController void setUploadFile(org.apache.myfaces.custom.fileupload.UploadedFile uploadFile) uploadAndParseAction() java.lang.String JSF method for uploading and parsing a file void validateMyField(javax.faces.context.FacesContext ctx, javax.faces.component.UIComponent src, java.lang.Object value) valueChanged(javax.faces.event.ValueChangeEvent e) void Methods inherited from class java.lang.Object clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait Fields ABCDARIAN_HOME public static final java.lang.String ABCDARIAN_HOME Constant value: ABCDARIAN_HOME Constructors MainController public MainController() Methods uploadAndParseAction public java.lang.String uploadAndParseAction() JSF method for uploading and parsing a file myAnnotaions public java.lang.String myAnnotaions() validateMyField public void validateMyField(javax.faces.context.FacesContext ctx, javax.faces.component.UIComponent src, java.lang.Object value) Page 35 of 48 org.ABCDarian.jsf.MainController valueChanged public void valueChanged(javax.faces.event.ValueChangeEvent e) actionPerformed public void actionPerformed(javax.faces.event.ActionEvent e) getRootPath public java.lang.String getRootPath() getCurrentName public java.lang.String getCurrentName() setCurrentName public void setCurrentName(java.lang.String currentName) getUploadFile public org.apache.myfaces.custom.fileupload.UploadedFile getUploadFile() setUploadFile public void setUploadFile(org.apache.myfaces.custom.fileupload.UploadedFile uploadFile) getSelectedParserMethod public java.lang.String getSelectedParserMethod() setSelectedParserMethod public void setSelectedParserMethod(java.lang.String selectedParserMethod) Page 36 of 48 org.ABCDarian.jsf.MainController (continued from last page) getAllParserMethodSelectItems public javax.faces.model.SelectItem[] getAllParserMethodSelectItems() setAllParserMethodSelectItems public void setAllParserMethodSelectItems(javax.faces.model.SelectItem[] allParserMethodSelectItems) getCurrentResult public java.util.List getCurrentResult() setCurrentResult public void setCurrentResult(java.util.List currentResult) Page 37 of 48 Package org.ABCDarian.parser Page 38 of 48 org.ABCDarian.parser.Parser org.ABCDarian.parser Class Parser java.lang.Object | +-org.ABCDarian.parser.Parser Deprecated. public class Parser extends java.lang.Object ATTENTION!!! This Class is out of date and in for information only. DO NOT USE! ATTENTION!!! This Class is out of date and in for information only. DO NOT USE! Constructor Summary public Parser() Deprecated. Method Summary void latexMarkupExtractor(int suchTyp, java.io.File file) Deprecated. static void main(java.lang.String[] args) Deprecated. static void parseData(java.io.File file) Deprecated. static java.lang.String regexp(int suchTyp, java.lang.String fileString) Deprecated. Methods inherited from class java.lang.Object clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait Constructors Parser public Parser() Deprecated. Methods Page 39 of 48 org.ABCDarian.parser.Parser (continued from last page) parseData public static void parseData(java.io.File file) throws java.io.IOException Deprecated. latexMarkupExtractor public void latexMarkupExtractor(int suchTyp, java.io.File file) throws java.io.IOException Deprecated. regexp public static java.lang.String regexp(int suchTyp, java.lang.String fileString) Deprecated. This is where the frog jumps into the blender. Parameters: suchTyp - is the parser wich the user selected. fileString - is the string Returns: the final parsed results main public static void main(java.lang.String[] args) Deprecated. Page 40 of 48 org.ABCDarian.parser.TexParser org.ABCDarian.parser Class TexParser java.lang.Object | +-org.ABCDarian.parser.TexParser Deprecated. public class TexParser extends java.lang.Object ATTENTION!!! This Class is out of date and in for information only. DO NOT USE! ATTENTION!!! This Class is out of date and in for information only. DO NOT USE! Constructor Summary public TexParser(java.io.File texFile) Deprecated. Method Summary static void main(java.lang.String[] args) Deprecated. void parse() Deprecated. Methods inherited from class java.lang.Object clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait Constructors TexParser public TexParser(java.io.File texFile) Deprecated. Methods parse public void parse() throws java.io.IOException Deprecated. Page 41 of 48 org.ABCDarian.parser.TexParser main public static void main(java.lang.String[] args) throws java.io.IOException Deprecated. Page 42 of 48 org.ABCDarian.parser.TexToken org.ABCDarian.parser Class TexToken java.lang.Object | +-org.ABCDarian.parser.TexToken Deprecated. public class TexToken extends java.lang.Object ATTENTION!!! This Class is out of date and in for information only. DO NOT USE! ATTENTION!!! This Class is out of date and in for information only. DO NOT USE! Constructor Summary public TexToken() Deprecated. Method Summary java.lang.String getAttribute() Deprecated. java.lang.String getAttributes() Deprecated. java.util.List getChildtoken() Deprecated. java.lang.String getName() Deprecated. java.lang.String getParameter() Deprecated. java.util.Map getParameters() Deprecated. TexToken getParentToken() Deprecated. void setAttribute(java.lang.String attribute) Deprecated. void setAttributes(java.lang.String attributes) Deprecated. void setChildtoken(java.util.List childtoken) Deprecated. void setName(java.lang.String name) Deprecated. Page 43 of 48 org.ABCDarian.parser.TexToken void setParameter(java.lang.String parameter) Deprecated. void setParameters(java.util.Map parameters) Deprecated. void setParentToken(TexToken parentToken) Deprecated. java.lang.String toString() Deprecated. Methods inherited from class java.lang.Object clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait Constructors TexToken public TexToken() Deprecated. Methods setParameter public void setParameter(java.lang.String parameter) Deprecated. setAttribute public void setAttribute(java.lang.String attribute) Deprecated. getName public java.lang.String getName() Deprecated. setName public void setName(java.lang.String name) Page 44 of 48 org.ABCDarian.parser.TexToken (continued from last page) Deprecated. getParameters public java.util.Map getParameters() Deprecated. setParameters public void setParameters(java.util.Map parameters) Deprecated. getAttributes public java.lang.String getAttributes() Deprecated. setAttributes public void setAttributes(java.lang.String attributes) Deprecated. getChildtoken public java.util.List getChildtoken() Deprecated. setChildtoken public void setChildtoken(java.util.List childtoken) Deprecated. toString public java.lang.String toString() Deprecated. Page 45 of 48 org.ABCDarian.parser.TexToken getParentToken public TexToken getParentToken() Deprecated. setParentToken public void setParentToken(TexToken parentToken) Deprecated. getParameter public java.lang.String getParameter() Deprecated. getAttribute public java.lang.String getAttribute() Deprecated. Page 46 of 48 Package org.ABCDarian.util Page 47 of 48 org.ABCDarian.util.O org.ABCDarian.util Class O java.lang.Object | +-org.ABCDarian.util.O public class O extends java.lang.Object Simple method to shorten often-used System.out.println to O.O (for debugging) Constructor Summary public O() Method Summary static void o(java.lang.String o) Methods inherited from class java.lang.Object clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait Constructors O public O() Methods o public static void o(java.lang.String o) Page 48 of 48