com.github.fge.jsonschema.format.helpers
Class SharedHostNameAttribute

java.lang.Object
  extended by com.github.fge.jsonschema.format.AbstractFormatAttribute
      extended by com.github.fge.jsonschema.format.helpers.SharedHostNameAttribute
All Implemented Interfaces:
FormatAttribute

public final class SharedHostNameAttribute
extends AbstractFormatAttribute

Validator for the host-name format attribute.

Important note: the basis for host name format validation is RFC 1034. The RFC does not require that a host name have more than one domain name component. As such, foo is a valid hostname.

Guava's InternetDomainName is used for validation.


Constructor Summary
SharedHostNameAttribute(String fmt)
           
 
Method Summary
 void validate(ProcessingReport report, MessageBundle bundle, FullData data)
          Validate the instance against this format attribute
 
Methods inherited from class com.github.fge.jsonschema.format.AbstractFormatAttribute
newMsg, supportedTypes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SharedHostNameAttribute

public SharedHostNameAttribute(String fmt)
Method Detail

validate

public void validate(ProcessingReport report,
                     MessageBundle bundle,
                     FullData data)
              throws ProcessingException
Description copied from interface: FormatAttribute
Validate the instance against this format attribute

Parameters:
report - the report to use
bundle - the message bundle to use
data - the validation data
Throws:
ProcessingException - an exception occurs (normally, never for a format attribute)