|SimpleGraph System API wrapper
is an open source project that allows to wrap Systems APIs in a way that graph algorithms and storage can be applied. As an implementation Apache Tinkerpop/Gremlin is used.
SimpleGraph uses the Hub and Spoke and Adapter patterns heavily.
There are currently 21 Modules available for SimpleGraph. Each module wraps an "external" API to make the functions and data behind that API available for graph processing with Apache Tinkerpop / Gremlin.
Module Hub and Spoke
|ical4j library for parsing and building iCalendar data models
|makes Calendar data available via ical4j
|makes VCard data available
|Apache POI XSSF/HSSF
|makes Microsoft Excel workbooks accessible via the Apache POI API
|makes your FileSystem accessible via the Java FileSystem API
|GeoJSON support for Google gson library
|makes GeoJSON data available
|GitHub GraphQL Api v4
|makes GitHub content accessible to Graph processing.
|makes HTML files accessible via HTML Cleaner parser
|makes JSON parse results accessible to Graph processing.
|makes Java code parse results accessible to Graph processing.
|E-Mail access for rfc822 and MIME formatted Mailbox files (e.g. Thunderbird)
|makes Mail data available via Apache Mime4J
|supplies a simple wrapper for a graph with nodes that have key/value pairs in form of HashMaps. We would not really need this since Apache Tinkerpop/Gremlin already supplies us with properties per node/vertex.
Still this system is useful as a helper system and to illustrate the wrapping concepts and possibilities of SimpleGraph
|makes MediaWiki site content accessible to Graph processing.
|makes Portable Document Format (PDF) files accessible via the Apache PDFBox® API
|Apache POI XSLF/HSLF
|makes Microsoft PowerPoint presentations accessible via the Apache POI API
|SemanticMedia Wiki API
|makes Semantic MediaWiki accessible via the SMW API
|SNMP4J Simple Network Monitoring Protocol SNMP Java API
|makes Simple Network Monitoring Protocol accessible via SNMP4J
|Java Database Connectivity (JDBC) API
|makes relational SQL databases accessible via the Java JDBC API.
|makes BITPlan's SiDIF educational TripleStore accessible
|makes WikiData data available via the Wikidata-Toolki API
|Apache POI XWPF/HWPF
|makes Microsoft Word Documents accessible via the Apache POI API
|makes XML dom parse results accessible to Graph processing.
Solving IT Problems across System boundaries can get very difficult. There may be a wealth of APIs which first looks helpful but given the diversity of approaches it a daunting task will need to be tackled to get reasonable results. More often than not projects are not even started since the cost/benefit ratio is not good enough. SimpleGraph aims to supply a unified graph API access to Systems for which this makes sense. In fact for most systems it makes sense to have a graph API. Quite a few problems will get much easier to solve if the subdivision of the problem is done with the goal to apply graph algorithms. See What happens if you see the world as a graph?
Mix and Match Office and other data
Let's assume we have a business that works in the following manner:
- There are pricelist for product categories in Microsoft Excel files
- Product specifications are in PDF Format - the files are referenced in the Excel files
- Invoices are written in Microsoft Word
- There is an address book of customers in VCard format
- Orders are handled via e-mail (that is automatically produced by the companies shop website)
- Monthly reports are created with PowerPoint
The monthly reports should in the future be modified to give geographical information. Basically a revenue/region sales count per product/region information is wanted.
The 1000 dollar question - can this report be created efficiently semi-manually with reasonable software effort? Sadly it sounds more like 10.000 or 100.000 dollar question.
There are at least 6 different systems involved. SimpleGraph simplifies accessing all 6 systems.
The AirRoutes example is taken from Practical Gremlin: An Apache TinkerPop Tutorial by Kelvin Lawrence see also https://github.com/krlawrence/graph.
JUnit Test case
We'd like to read in the air-routes graph described above and create an Excel Work book from it. see TestExcelSystem.java
Java Source Code
ExcelSystem es = new ExcelSystem();
Graph graph = TestTinkerPop3.getAirRoutes();
GraphTraversalSource g = graph.traversal();
Workbook wb = es.createWorkBook(g);
View the resulting File:Air-routes.xlsx Excel file to see what the tabular version of the graph looks like.