Class Schema

java.lang.Object
com.cedarpolicy.model.schema.Schema

public final class Schema extends Object
Represent a schema.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Schema(com.fasterxml.jackson.databind.JsonNode schemaJson)
    Build a Schema from a json node.
    Schema(String schemaJson)
    Build a Schema from a string containing the JSON source for the model.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Equals.
    int
    Hash.
    Readable string representation.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • Schema

      public Schema(String schemaJson) throws IOException
      Build a Schema from a string containing the JSON source for the model. This constructor will fail with an exception if the string does not parse as JSON, but it does not check that the parsed JSON object represents a valid schema.
      Parameters:
      schemaJson - List of EntityTypes.
      Throws:
      IOException - When any errors are encountered while parsing the authorization model json string into json node.
    • Schema

      public Schema(com.fasterxml.jackson.databind.JsonNode schemaJson)
      Build a Schema from a json node. This does not check that the parsed JSON object represents a valid schema.
      Parameters:
      schemaJson - List of EntityTypes.
  • Method Details

    • equals

      public boolean equals(Object o)
      Equals.
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Hash.
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Readable string representation.
      Overrides:
      toString in class Object