Class BaseExporter<V,​E>

    • Constructor Detail

      • BaseExporter

        public BaseExporter​(Function<V,​String> vertexIdProvider)
        Constructor
        Parameters:
        vertexIdProvider - the vertex id provider to use. Cannot be null.
    • Method Detail

      • getGraphIdProvider

        public Optional<Supplier<String>> getGraphIdProvider()
        Get the graph id provider.
        Returns:
        the graph id provider as an Optional.
      • setGraphIdProvider

        public void setGraphIdProvider​(Supplier<String> graphIdProvider)
        Set the graph id provider.
        Parameters:
        graphIdProvider - the graph id provider
      • setGraphAttributeProvider

        public void setGraphAttributeProvider​(Supplier<Map<String,​Attribute>> graphAttributeProvider)
        Set the graph attribute provider.
        Parameters:
        graphAttributeProvider - the graph attribute provider
      • getVertexIdProvider

        public Function<V,​String> getVertexIdProvider()
        Get vertex id provider.
        Returns:
        the vertex id provider
      • setVertexIdProvider

        public void setVertexIdProvider​(Function<V,​String> vertexIdProvider)
        Set the vertex id provider
        Parameters:
        vertexIdProvider - the vertex id provider
      • setVertexAttributeProvider

        public void setVertexAttributeProvider​(Function<V,​Map<String,​Attribute>> vertexAttributeProvider)
        Set the vertex attribute provider
        Parameters:
        vertexAttributeProvider - the vertex attribute provider
      • setEdgeIdProvider

        public void setEdgeIdProvider​(Function<E,​String> edgeIdProvider)
        Set edge id provider
        Parameters:
        edgeIdProvider - the edge id provider
      • setEdgeAttributeProvider

        public void setEdgeAttributeProvider​(Function<E,​Map<String,​Attribute>> edgeAttributeProvider)
        Set the edge attribute provider.
        Parameters:
        edgeAttributeProvider - the edge attribute provider
      • getGraphId

        protected Optional<String> getGraphId()
        Get the graph id if present
        Returns:
        an Optional of the graph id
      • getVertexId

        protected String getVertexId​(V v)
        Get the vertex id
        Parameters:
        v - the vertex
        Returns:
        the id of the vertex
      • getEdgeId

        protected Optional<String> getEdgeId​(E e)
        Get an optional of the edge id
        Parameters:
        e - the edge
        Returns:
        the edge id
      • getVertexAttributes

        protected Optional<Map<String,​Attribute>> getVertexAttributes​(V v)
        Get vertex attributes
        Parameters:
        v - the vertex v
        Returns:
        the vertex attributes as an Optional
      • getVertexAttribute

        protected Optional<Attribute> getVertexAttribute​(V v,
                                                         String key)
        Get an optional of a vertex attribute
        Parameters:
        v - the vertex v
        key - the attribute key
        Returns:
        the attribute as an Optional
      • getEdgeAttributes

        protected Optional<Map<String,​Attribute>> getEdgeAttributes​(E e)
        Get edge attributes
        Parameters:
        e - the edge e
        Returns:
        the edge attributes as an Optional
      • getEdgeAttribute

        protected Optional<Attribute> getEdgeAttribute​(E e,
                                                       String key)
        Get an optional of an edge attribute
        Parameters:
        e - the edge e
        key - the attribute key
        Returns:
        the attribute as an Optional
      • getGraphAttribute

        protected Optional<Attribute> getGraphAttribute​(String key)
        Get an optional of a graph attribute
        Parameters:
        key - the attribute key
        Returns:
        the attribute as an Optional