Difference between revisions of "SimpleGraph-Core"
Line 1: | Line 1: | ||
− | Basically SimpleGraph core has the idea of Vertex and Edges being able to carry "payloads". Some of the payload data will be replicated as properties to be | + | Basically {{Link|target=SimpleGraph}}-core has the idea of Vertex and Edges being able to carry "payloads". Some of the payload data will be replicated as properties to be |
able to search for the payload and do something with it but the main thing is to have some kind of pointer/key that a certain SimpleGraph Module will be able work with to | able to search for the payload and do something with it but the main thing is to have some kind of pointer/key that a certain SimpleGraph Module will be able work with to | ||
allow working with the API for the payload. | allow working with the API for the payload. |
Revision as of 09:59, 17 October 2018
Basically SimpleGraph-core has the idea of Vertex and Edges being able to carry "payloads". Some of the payload data will be replicated as properties to be able to search for the payload and do something with it but the main thing is to have some kind of pointer/key that a certain SimpleGraph Module will be able work with to allow working with the API for the payload.
Going from a Vertex to a Payload (which is a JavaObject) is currently done with a property SimpleNode.SELF_LABEL see https://github.com/BITPlan/com.bitplan.simplegraph/blob/master/simplegraph-core/src/main/java/com/bitplan/simplegraph/core/SimpleNode.java
Object payLoad=v.property(SimpleNode.SELF_LABEL).value();
In some cases it might be necessary to find a Vertex for a Payload. Currently we use a work-around by putting the Java hashCode of a payload as a property "java.hashCode" into the corresponding Edge or Vertex. This way we can simply lookup the Java Object with
Vertex myVertex=g.V().has("java.hashCode",this.hashCode())
Example
Lets's assume we'd like to access some data about Gravitational Wave observations. A Source for general information on these events is WikiData where you can get a list of the events with a SPARQL query.
Each event is represented as a Vertex. The main info is the event name e.g. "GW150914" with that name you can lookup more detail on the event e.g. You'll find wikipedia articles for it or the source of linked opendata from the Ligo Observatory:
GW150914
- https://en.wikipedia.org/wiki/GW150914
- https://de.wikipedia.org/wiki/GW150914
- https://www.gw-openscience.org/events/GW150914/
Now you might be interested in some details that are not available via WikiData. https://www.gw-openscience.org/events/GW150914/ for instance has link to the orginal HDF5 datasets
from the two detectors Hanford and Livingston:
- https://www.gw-openscience.org/GW150914data/H-H1_LOSC_4_V2-1126259446-32.hdf5
- https://www.gw-openscience.org/GW150914data/L-L1_LOSC_4_V2-1126259446-32.hdf5
To read the data you'd now have to download a HDFView software to find the starttime of the event as GPS Time 1126259446 UTC 2015-09-14T09:50:29.
Let's simplify this process by using three modules from the SimpleGraphProject
- SimpleGraph-WikiData to get the general event data from WikiData with the link to Linked Open Data URL
- SimpleGraph-HTML to extract the link to the original hdf5 files from the observatories
- SimpleGraph-HDF5 to get to the event details and the original measurement data