The graphar-info module is part of the pure Java implementation of GraphAr.
The java-info module offers a lightweight, zero-dependencies yet powerful solution for GraphAr metadata management. It is responsible for:
To build the graphar-info module, you need:
Build the module with Maven:
mvn clean install
Here's a simple example of how to use the graphar-info module:
For more usage examples and detailed information, please refer to Getting Started with Info Module.
import org.apache.graphar.info.GraphInfo; import org.apache.graphar.info.loader.GraphInfoLoader; import org.apache.graphar.info.loader.impl.LocalFileSystemStreamGraphInfoLoader; // Load graph info from a YAML file GraphInfoLoader loader = new LocalFileSystemStreamGraphInfoLoader(); GraphInfo graphInfo = loader.loadGraphInfo(Paths.get("path/to/graph.yml").toUri()); // Access graph metadata String graphName = graphInfo.getName(); List<VertexInfo> vertices = graphInfo.getVertexInfos(); List<EdgeInfo> edges = graphInfo.getEdgeInfos(); // Access vertex metadata VertexInfo personVertex = vertices.get(0); String vertexType = personVertex.getType(); long chunkSize = personVertex.getChunkSize(); // Access edge metadata EdgeInfo knowsEdge = edges.get(0); String edgeType = knowsEdge.getEdgeType(); boolean isDirected = knowsEdge.isDirected();
The graphar-info module has minimal dependencies:
Under active development