Interface VertexInfo

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

    public interface VertexInfo
    extends com.alibaba.fastffi.CXXPointer
    VertexInfo is a class that stores metadata information about a vertex.
    • Method Detail

      • addPropertyGroup

        Result<StdSharedPtr<VertexInfo>> addPropertyGroup​(StdSharedPtr<PropertyGroup> propertyGroup)
        Adds a property group to the vertex info.
        Parameters:
        propertyGroup - The PropertyGroup object to add.
        Returns:
        A Status object indicating success or failure.
      • getLabel

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

        @com.alibaba.fastffi.FFINameAlias("GetChunkSize") long getChunkSize()
        Get the chunk size of the vertex.
        Returns:
        The chunk size of the vertex.
      • getPrefix

        StdString getPrefix()
        Get the path prefix of the vertex.
        Returns:
        The path prefix of the vertex.
      • getVersion

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

        StdVector<StdSharedPtr<PropertyGroup>> getPropertyGroups()
        Get the property groups of the vertex.
        Returns:
        A vector of PropertyGroup objects for the vertex.
      • getPropertyGroup

        StdSharedPtr<PropertyGroup> getPropertyGroup​(StdString propertyName)
        Get the property group that contains the specified property.
        Parameters:
        propertyName - The name of the property.
        Returns:
        A Result object containing the PropertyGroup object, or a KeyError Status object if the property is not found.
      • hasProperty

        @com.alibaba.fastffi.FFINameAlias("HasProperty") boolean hasProperty​(StdString propertyName)
        Get whether the vertex info contains the specified property.
        Parameters:
        propertyName - The name of the property.
        Returns:
        True if the property exists in the vertex info, False otherwise.
      • save

        Status save​(StdString fileName)
        Saves the vertex 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 vertex info as a YAML formatted string.
        Returns:
        A Result object containing the YAML string, or a Status object indicating an error.
      • 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.
      • hasPropertyGroup

        @com.alibaba.fastffi.FFINameAlias("HasPropertyGroup") boolean hasPropertyGroup​(StdSharedPtr<PropertyGroup> propertyGroup)
        Returns whether the vertex info contains the specified property group.
        Parameters:
        propertyGroup - The PropertyGroup object to check for.
        Returns:
        True if the property group exists in the vertex info, False otherwise.
      • getFilePath

        Result<StdString> getFilePath​(StdSharedPtr<PropertyGroup> propertyGroup,
                                      @com.alibaba.fastffi.CXXValue,@com.alibaba.fastffi.FFITypeAlias("graphar::IdType") long chunkIndex)
        Get the file path for the specified property group and chunk index.
        Parameters:
        propertyGroup - The PropertyGroup object to get the file path for.
        chunkIndex - The chunk index.
        Returns:
        A Result object containing the file path, or a KeyError Status object if the property group is not found in the vertex info.
      • getPathPrefix

        Result<StdString> getPathPrefix​(StdSharedPtr<PropertyGroup> propertyGroup)
        Get the path prefix for the specified property group.
        Parameters:
        propertyGroup - The PropertyGroup object to get the path prefix for.
        Returns:
        A Result object containing the path prefix, or a KeyError Status object if the property group is not found in the vertex info.
      • getVerticesNumFilePath

        Result<StdString> getVerticesNumFilePath()
        Get the file path for the number of vertices.
        Returns:
        The file path for the number of vertices.
      • isValidated

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

        static Result<StdSharedPtr<VertexInfo>> load​(StdSharedPtr<Yaml> yaml)
        Loads vertex info from a YAML object.
        Parameters:
        yaml - A shared pointer to a Yaml object containing the YAML string.
        Returns:
        A Result object containing the VertexInfo object, or a Status object indicating an error.