org.apache.tinkerpop.gremlin.structure.io.graphml

## Class GraphMLWriter.Builder

- java.lang.Object
- - org.apache.tinkerpop.gremlin.structure.io.graphml.GraphMLWriter.Builder

- All Implemented Interfaces:
    GraphWriter.WriterBuilder<GraphMLWriter>
  Enclosing class:
    GraphMLWriter

      public static final class GraphMLWriter.Builder
      extends Object
      implements GraphWriter.WriterBuilder<GraphMLWriter>

- - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `GraphMLWriter` | `create()` Creates the `GraphWriter` implementation given options provided to the `GraphWriter.WriterBuilder` implementation.
    `GraphMLWriter.Builder` | `edgeKeyTypes(Map<String,String> edgeKeyTypes)` Map of the data types of the edge keys.
    `GraphMLWriter.Builder` | `edgeLabelKey(String edgeLabelKey)` Set the name of the edge label in the GraphML.
    `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.
    `GraphMLWriter.Builder` | `vertexKeyTypes(Map<String,String> vertexKeyTypes)` Map of the data types of the vertex keys.
    `GraphMLWriter.Builder` | `vertexLabelKey(String vertexLabelKey)` Set the name of the vertex label in the GraphML.
    `GraphMLWriter.Builder` | `xmlSchemaLocation(String xmlSchemaLocation)` Location of the GraphML schema which is defaulted to `GraphMLTokens.DEFAULT_GRAPHML_SCHEMA_LOCATION`.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### 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.

    - #### create

          public GraphMLWriter create()

      Description copied from interface: `GraphWriter.WriterBuilder`
      Creates the `GraphWriter` implementation given options provided to the `GraphWriter.WriterBuilder` implementation.
      Specified by:
        `create` in interface `GraphWriter.WriterBuilder<GraphMLWriter>`

Copyright © 2013–2019 Apache Software Foundation. All rights reserved.