in maven-projects/java/src/main/java/org/apache/graphar/graphinfo/GraphInfo.java [117:279]
Result<@CXXReference PropertyGroup> getVertexPropertyGroup(
@CXXReference StdString label, @CXXReference StdString property);
/**
* Get the property group of edge by label, property and adj list type
*
* @param srcLabel source vertex label
* @param edgeLabel edge label
* @param dstLabel destination vertex label
* @param property edge property that belongs to the group
* @param adjListType adj list type of edge
*/
@FFINameAlias("GetEdgePropertyGroup")
@CXXValue
Result<@CXXReference PropertyGroup> getEdgePropertyGroup(
@CXXReference StdString srcLabel,
@CXXReference StdString edgeLabel,
@CXXReference StdString dstLabel,
@CXXReference StdString property,
@CXXValue AdjListType adjListType);
/**
* Adds a vertex info to the GraphInfo instance.
*
* @param vertexInfo The vertex info to add.
* @return A Status object indicating the success or failure of the operation. Returns
* InvalidOperation if the vertex info is already contained.
*/
@FFINameAlias("AddVertex")
@CXXValue
Status addVertex(@CXXReference VertexInfo vertexInfo);
/**
* Adds an edge info to the GraphInfo instance.
*
* @param edgeInfo The edge info to add.
* @return A Status object indicating the success or failure of the operation. Returns
* `InvalidOperation` if the edge info is already contained.
*/
@FFINameAlias("AddEdge")
@CXXValue
Status addEdge(@CXXReference EdgeInfo edgeInfo);
/**
* Add a vertex info path to graph info instance.
*
* @param path The vertex info path to add
*/
@FFINameAlias("AddVertexInfoPath")
void addVertexInfoPath(@CXXReference StdString path);
/**
* Add an edge info path to graph info instance.
*
* @param path The edge info path to add
*/
@FFINameAlias("AddEdgeInfoPath")
void addEdgeInfoPath(@CXXReference StdString path);
/**
* Get the name of the graph.
*
* @return The name of the graph.
*/
@FFINameAlias("GetName")
@CXXValue
StdString getName();
/**
* Get the absolute path prefix of the chunk files.
*
* @return The absolute path prefix of the chunk files.
*/
@FFINameAlias("GetPrefix")
@CXXValue
StdString getPrefix();
/**
* Get the vertex infos of graph info
*
* @return vertex infos of graph info
*/
@FFINameAlias("GetVertexInfos")
@FFIConst
@CXXReference
StdMap<StdString, @CXXReference VertexInfo> getVertexInfos();
/**
* Get the edge infos of graph info
*
* @return edge infos of graph info
*/
@FFINameAlias("GetEdgeInfos")
@FFIConst
@CXXReference
StdMap<StdString, @CXXReference EdgeInfo> getEdgeInfos();
/**
* Saves the graph info to a YAML file.
*
* @param path The name of the file to save to.
* @return A Status object indicating success or failure.
*/
@FFINameAlias("Save")
@CXXValue
Status save(@FFIConst @CXXReference StdString path);
/**
* Returns the graph info as a YAML formatted string.
*
* @return A Result object containing the YAML string, or a Status object indicating an error.
*/
@FFINameAlias("Dump")
@CXXValue
Result<StdString> dump();
/**
* Returns whether the graph info is validated.
*
* @return True if the graph info is valid, False otherwise.
*/
@FFINameAlias("IsValidated")
boolean isValidated();
@FFINameAlias("GetVertexInfo")
@FFIConst
@CXXValue
Result<@CXXReference VertexInfo> getVertexInfo(@CXXReference StdString label);
@FFINameAlias("GetEdgeInfo")
@FFIConst
@CXXValue
Result<@CXXReference EdgeInfo> getEdgeInfo(
@CXXReference StdString srcLabel,
@CXXReference StdString edgeLabel,
@CXXReference StdString dstLabel);
@FFINameAlias("GetVersion")
@CXXReference
InfoVersion getInfoVersion();
@FFIFactory
interface Factory {
/**
* Constructs a GraphInfo instance.
*
* @param graphName The name of the graph.
* @param version The version of the graph info.
* @param prefix The absolute path prefix to store chunk files of the graph.
*/
GraphInfo create(
@CXXReference StdString graphName,
@CXXReference InfoVersion version,
@CXXReference StdString prefix);
/**
* Constructs a GraphInfo instance.
*
* @param graphName The name of the graph.
* @param version The version of the graph info.
*/
GraphInfo create(@CXXReference StdString graphName, @CXXReference InfoVersion version);
}