Class mxGraphMlKey

java.lang.Object
com.mxgraph.io.graphml.mxGraphMlKey

public class mxGraphMlKey extends Object
Represents a Key element in the GML Structure.
  • Constructor Details

    • mxGraphMlKey

      public mxGraphMlKey(String keyId, mxGraphMlKey.keyForValues keyFor, String keyName, mxGraphMlKey.keyTypeValues keyType)
      Construct a key with the given parameters.
      Parameters:
      keyId - Key's ID
      keyFor - Scope of the key.
      keyName - Key Name
      keyType - Type of the values represented for this key.
    • mxGraphMlKey

      public mxGraphMlKey(Element keyElement)
      Construct a key from a xml key element.
      Parameters:
      keyElement - Xml key element.
  • Method Details

    • getKeyDefault

      public String getKeyDefault()
    • setKeyDefault

      public void setKeyDefault(String keyDefault)
    • getKeyFor

      public mxGraphMlKey.keyForValues getKeyFor()
    • setKeyFor

      public void setKeyFor(mxGraphMlKey.keyForValues keyFor)
    • getKeyId

      public String getKeyId()
    • setKeyId

      public void setKeyId(String keyId)
    • getKeyName

      public String getKeyName()
    • setKeyName

      public void setKeyName(String keyName)
    • getKeyType

      public mxGraphMlKey.keyTypeValues getKeyType()
    • setKeyType

      public void setKeyType(mxGraphMlKey.keyTypeValues keyType)
    • generateElement

      public Element generateElement(Document document)
      Generates a Key Element from this class.
      Parameters:
      document - Document where the key Element will be inserted.
      Returns:
      Returns the generated Elements.
    • enumForValue

      public mxGraphMlKey.keyForValues enumForValue(String value)
      Converts a String value in its corresponding enum value for the keyFor attribute.
      Parameters:
      value - Value in String representation.
      Returns:
      Returns the value in its enum representation.
    • stringForValue

      public String stringForValue(mxGraphMlKey.keyForValues value)
      Converts a enum value in its corresponding String value for the keyFor attribute.
      Parameters:
      value - Value in enum representation.
      Returns:
      Returns the value in its String representation.
    • enumTypeValue

      public mxGraphMlKey.keyTypeValues enumTypeValue(String value)
      Converts a String value in its corresponding enum value for the keyType attribute.
      Parameters:
      value - Value in String representation.
      Returns:
      Returns the value in its enum representation.
    • stringTypeValue

      public String stringTypeValue(mxGraphMlKey.keyTypeValues value)
      Converts a enum value in its corresponding string value for the keyType attribute.
      Parameters:
      value - Value in enum representation.
      Returns:
      Returns the value in its String representation.