Interface EdgeInfo

  • All Superinterfaces:
    com.alibaba.fastffi.CXXPointer, com.alibaba.fastffi.FFIPointer, com.alibaba.fastffi.FFIType

    public interface EdgeInfo
    extends com.alibaba.fastffi.CXXPointer
    EdgeInfo is a class that stores metadata information about an edge.
    • Method Detail

      • getSrcLabel

        StdString getSrcLabel()
        Get the label of the source vertex.
        Returns:
        The label of the source vertex.
      • getEdgeLabel

        StdString getEdgeLabel()
        Get the label of the edge.
        Returns:
        The label of the edge.
      • getDstLabel

        StdString getDstLabel()
        Get the label of the destination vertex.
        Returns:
        The label of the destination vertex.
      • getChunkSize

        @com.alibaba.fastffi.FFINameAlias("GetChunkSize"),@com.alibaba.fastffi.CXXValue long getChunkSize()
        Get the number of edges in each edge chunk.
        Returns:
        The number of edges in each edge chunk.
      • getSrcChunkSize

        @com.alibaba.fastffi.FFINameAlias("GetSrcChunkSize"),@com.alibaba.fastffi.CXXValue long getSrcChunkSize()
        Get the number of source vertices in each vertex chunk.
        Returns:
        The number of source vertices in each vertex chunk.
      • getDstChunkSize

        @com.alibaba.fastffi.FFINameAlias("GetDstChunkSize"),@com.alibaba.fastffi.CXXValue long getDstChunkSize()
        Get the number of destination vertices in each vertex chunk.
        Returns:
        The number of destination vertices in each vertex chunk.
      • getPrefix

        StdString getPrefix()
        Get the path prefix of the edge.
        Returns:
        The path prefix of the edge.
      • isDirected

        @com.alibaba.fastffi.FFINameAlias("IsDirected") boolean isDirected()
        Returns whether the edge is directed.
        Returns:
        True if the edge is directed, false otherwise.
      • getVersion

        StdSharedPtr<InfoVersion> getVersion()
        Get the version info of the edge.
        Returns:
        The version info of the edge.
      • hasAdjacentListType

        @com.alibaba.fastffi.FFINameAlias("HasAdjacentListType") boolean hasAdjacentListType​(AdjListType adjListType)
        Return whether the edge info contains the adjacency list information.
        Parameters:
        adjListType - The adjacency list type.
        Returns:
        True if the edge info contains the adjacency list information, false otherwise.
      • hasPropertyGroup

        @com.alibaba.fastffi.FFINameAlias("HasPropertyGroup") boolean hasPropertyGroup​(StdSharedPtr<PropertyGroup> propertyGroup)
        Returns whether the edge info contains the given property group for the specified adjacency list type.
        Parameters:
        propertyGroup - Property group to check.
        Returns:
        True if the edge info contains the property group, false otherwise.
      • hasPropertyGroup

        @com.alibaba.fastffi.FFINameAlias("HasProperty") boolean hasPropertyGroup​(StdString property)
        Returns whether the edge info contains the given property for any adjacency list type.
        Parameters:
        property - Property name to check.
        Returns:
        True if the edge info contains the property, false otherwise.
      • getPropertyGroup

        StdSharedPtr<PropertyGroup> getPropertyGroup​(StdString property)
        Get the property group containing the given property.
        Parameters:
        property - Property name.
        Returns:
        Property group may be nullptr if the property is not found.
      • getVerticesNumFilePath

        Result<StdString> getVerticesNumFilePath​(AdjListType adjListType)
        Get the file path for the number of vertices.
        Parameters:
        adjListType - The adjacency list type.
        Returns:
        A Result object containing the file path for the number of edges, or a Status object indicating an error.
      • getEdgesNumFilePath

        Result<StdString> getEdgesNumFilePath​(@com.alibaba.fastffi.FFITypeAlias("graphar::IdType") long vertexChunkIndex,
                                              AdjListType adjListType)
        Get the file path for the number of edges.
        Parameters:
        vertexChunkIndex - the vertex chunk index
        adjListType - The adjacency list type.
        Returns:
        A Result object containing the file path for the number of edges, or a Status object indicating an error.
      • getAdjListFilePath

        Result<StdString> getAdjListFilePath​(@com.alibaba.fastffi.FFITypeAlias("graphar::IdType") long vertexChunkIndex,
                                             @com.alibaba.fastffi.FFITypeAlias("graphar::IdType") long edgeChunkIndex,
                                             AdjListType adjListType)
        Get the file path of adj list topology chunk
        Parameters:
        vertexChunkIndex - the vertex chunk index
        edgeChunkIndex - index of edge adj list chunk of the vertex chunk
        adjListType - The adjacency list type.
      • getAdjListPathPrefix

        Result<StdString> getAdjListPathPrefix​(AdjListType adjListType)
        Get the path prefix of the adjacency list topology chunk for the given adjacency list type.
        Parameters:
        adjListType - The adjacency list type.
        Returns:
        A Result object containing the directory, or a Status object indicating an error.
      • getAdjListOffsetFilePath

        Result<StdString> getAdjListOffsetFilePath​(@com.alibaba.fastffi.FFITypeAlias("graphar::IdType") long vertexChunkIndex,
                                                   AdjListType adjListType)
        Get the adjacency list offset chunk file path of vertex chunk the offset chunks is aligned with the vertex chunks
        Parameters:
        vertexChunkIndex - index of vertex chunk
        adjListType - The adjacency list type.
      • getOffsetPathPrefix

        Result<StdString> getOffsetPathPrefix​(AdjListType adjListType)
        Get the path prefix of the adjacency list offset chunk for the given adjacency list type.
        Parameters:
        adjListType - The adjacency list type.
        Returns:
        A Result object containing the path prefix, or a Status object indicating an error.
      • getPropertyFilePath

        Result<StdString> getPropertyFilePath​(StdSharedPtr<PropertyGroup> propertyGroup,
                                              AdjListType adjListType,
                                              @com.alibaba.fastffi.FFINameAlias("graphar::IdType") long vertexChunkIndex,
                                              @com.alibaba.fastffi.FFITypeAlias("graphar::IdType") long edgeChunkIndex)
        Get the chunk file path of adj list property group the property group chunks is aligned with the adj list topology chunks
        Parameters:
        propertyGroup - property group
        adjListType - adj list type that the property group belongs to
        vertexChunkIndex - the vertex chunk index
        edgeChunkIndex - index of edge property group chunk of the vertex chunk
      • getPropertyGroupPathPrefix

        Result<StdString> getPropertyGroupPathPrefix​(StdSharedPtr<PropertyGroup> propertyGroup,
                                                     AdjListType adjListType)
        Get the path prefix of the property group chunk for the given adjacency list type.
        Parameters:
        propertyGroup - property group.
        adjListType - The adjacency list type.
        Returns:
        A Result object containing the path prefix, or a Status object indicating an error.
      • getPropertyType

        Result<StdSharedPtr<DataType>> getPropertyType​(StdString propertyName)
        Get the data type of the specified property.
        Parameters:
        propertyName - The name of the property.
        Returns:
        A Result object containing the data type of the property, or a KeyError Status object if the property is not found.
      • isPrimaryKey

        @com.alibaba.fastffi.FFINameAlias("IsPrimaryKey"),@com.alibaba.fastffi.CXXValue boolean isPrimaryKey​(StdString propertyName)
        Returns whether the specified property is a primary key.
        Parameters:
        propertyName - The name of the property.
        Returns:
        A Result object containing a bool indicating whether the property is a primary key, or a KeyError Status object if the property is not found.
      • save

        Status save​(StdString fileName)
        Saves the edge info to a YAML file.
        Parameters:
        fileName - The name of the file to save to.
        Returns:
        A Status object indicating success or failure.
      • dump

        Result<StdString> dump()
        Returns the edge info as a YAML formatted string.
        Returns:
        A Result object containing the YAML string, or a Status object indicating an error.
      • isValidated

        @com.alibaba.fastffi.FFINameAlias("IsValidated") boolean isValidated()
        Returns whether the edge info is validated.
        Returns:
        True if the edge info is valid, False otherwise.