com.fasterxml.jackson.databind.jsonSchema.types
Class UnionTypeSchema

java.lang.Object
  extended by com.fasterxml.jackson.databind.jsonSchema.types.JsonSchema
      extended by com.fasterxml.jackson.databind.jsonSchema.types.UnionTypeSchema

public class UnionTypeSchema
extends JsonSchema

This class represents a JsonSchema as a Union Type Schema: "An array of two or more simple type definitions. Each item in the array MUST be a simple type definition or a schema. The instance value is valid if it is of the same type as one of the simple type definitions, or valid by one of the schemas, in the array."

Author:
jphelan

Nested Class Summary
 
Nested classes/interfaces inherited from class com.fasterxml.jackson.databind.jsonSchema.types.JsonSchema
JsonSchema.JsonSchemaIdResolver
 
Constructor Summary
UnionTypeSchema()
           
 
Method Summary
 UnionTypeSchema asUnionTypeSchema()
          Attempt to return this JsonSchema as an UnionTypeSchema
 boolean equals(Object obj)
           
 ValueTypeSchema[] getElements()
          elements
 com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatTypes getType()
           
 boolean isUnionTypeSchema()
          determine if this JsonSchema is an UnionTypeSchema.
 void setElements(ValueTypeSchema[] elements)
          elements
 
Methods inherited from class com.fasterxml.jackson.databind.jsonSchema.types.JsonSchema
asAnySchema, asArraySchema, asBooleanSchema, asContainerSchema, asIntegerSchema, asNullSchema, asNumberSchema, asObjectSchema, asSimpleTypeSchema, asStringSchema, asValueSchemaSchema, get$ref, get$schema, getDisallow, getExtends, getId, getRequired, isAnySchema, isArraySchema, isBooleanSchema, isContainerTypeSchema, isIntegerSchema, isNullSchema, isNumberSchema, isObjectSchema, isSimpleTypeSchema, isStringSchema, isValueTypeSchema, minimalForFormat, set$ref, set$schema, setDisallow, setExtends, setId, setRequired
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UnionTypeSchema

public UnionTypeSchema()
Method Detail

asUnionTypeSchema

public UnionTypeSchema asUnionTypeSchema()
Description copied from class: JsonSchema
Attempt to return this JsonSchema as an UnionTypeSchema

Overrides:
asUnionTypeSchema in class JsonSchema
Returns:
this as a UnionTypeSchema if possible, or null otherwise

equals

public boolean equals(Object obj)
Overrides:
equals in class JsonSchema

getElements

public ValueTypeSchema[] getElements()
elements

Returns:
the elements

getType

public com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatTypes getType()
Specified by:
getType in class JsonSchema

isUnionTypeSchema

public boolean isUnionTypeSchema()
Description copied from class: JsonSchema
determine if this JsonSchema is an UnionTypeSchema.

Overrides:
isUnionTypeSchema in class JsonSchema
Returns:
true if this JsonSchema is an UnionTypeSchema, false otherwise

setElements

public void setElements(ValueTypeSchema[] elements)
elements

Parameters:
elements - the elements to set


Copyright © 2012 fasterxml.com. All Rights Reserved.