Class GraphMLWriter.Builder

    • Method Detail

      • normalize

        public GraphMLWriter.Builder normalize​(boolean normalize)
        Normalized output is deterministic with respect to the order of elements and properties in the resulting XML document, and is compatible with line diff-based tools such as Git. Note: normalized output is sideEffects-intensive and is not appropriate for very large graphs.
        Parameters:
        normalize - whether to normalize the output.
      • vertexKeyTypes

        public GraphMLWriter.Builder vertexKeyTypes​(Map<String,​String> vertexKeyTypes)
        Map of the data types of the vertex keys. It is best to specify this Map if possible as the only other way to attain it is to iterate all vertices to find all the property keys.
      • edgeKeyTypes

        public GraphMLWriter.Builder edgeKeyTypes​(Map<String,​String> edgeKeyTypes)
        Map of the data types of the edge keys. It is best to specify this Map if possible as the only other way to attain it is to iterate all vertices to find all the property keys.
      • xmlSchemaLocation

        public GraphMLWriter.Builder xmlSchemaLocation​(String xmlSchemaLocation)
        Location of the GraphML schema which is defaulted to GraphMLTokens.DEFAULT_GRAPHML_SCHEMA_LOCATION.
      • edgeLabelKey

        public GraphMLWriter.Builder edgeLabelKey​(String edgeLabelKey)
        Set the name of the edge label in the GraphML. This value is defaulted to GraphMLTokens.LABEL_E. The value of Element.label() is written as a data element on the edge and the appropriate key element is added to define it in the GraphML. It is important that when reading this GraphML back in with the reader that this label key is set appropriately to properly read the edge labels.
        Parameters:
        edgeLabelKey - if the label of an edge will be handled by the data property.
      • vertexLabelKey

        public GraphMLWriter.Builder vertexLabelKey​(String vertexLabelKey)
        Set the name of the vertex label in the GraphML. This value is defaulted to GraphMLTokens.LABEL_V. The value of Element.label() is written as a data element on the vertex and the appropriate key element is added to define it in the GraphML. It is important that when reading this GraphML back in with the reader that this label key is set appropriately to properly read the vertex labels.
        Parameters:
        vertexLabelKey - if the label of an vertex will be handled by the data property.