Class PrintableStringSyntaxChecker

All Implemented Interfaces:
Serializable, SchemaObject

public final class PrintableStringSyntaxChecker extends SyntaxChecker
A SyntaxChecker which verifies that a value is a Printable String according to RFC 4517.

From RFC 4517 :

PrintableString    = 1*PrintableCharacter
PrintableCharacter = ALPHA | DIGIT | SQUOTE | LPAREN | RPAREN |
                         PLUS | COMMA | HYPHEN | DOT | EQUALS |
                         SLASH | COLON | QUESTION | SPACE
                         
SLASH   = %x2F                ; forward slash ("/")
COLON   = %x3A                ; colon (":")
QUESTION= %x3F                ; question mark ("?")
From RFC 4512 :
ALPHA   = %x41-5A | %x61-7A   ; "A"-"Z" / "a"-"z"
DIGIT   = %x30 | LDIGIT       ; "0"-"9"
LDIGIT  = %x31-39             ; "1"-"9"
SQUOTE  = %x27                ; single quote ("'")
LPAREN  = %x28                ; left paren ("(")
RPAREN  = %x29                ; right paren (")")
PLUS    = %x2B                ; plus sign ("+")
COMMA   = %x2C                ; comma (",")
HYPHEN  = %x2D                ; hyphen ("-")
DOT     = %x2E                ; period (".")
EQUALS  = %x3D                ; equals sign ("=")
SPACE   = %x20                ; space (" ")
Author:
Apache Directory Project
See Also:
  • Field Details

  • Method Details

    • builder

      public static PrintableStringSyntaxChecker.Builder builder()
      Returns:
      An instance of the Builder for this class
    • isValidSyntax

      public boolean isValidSyntax(Object value)
      Determines if the attribute's value conforms to the attribute syntax.
      Overrides:
      isValidSyntax in class SyntaxChecker
      Parameters:
      value - the value of some attribute with the syntax
      Returns:
      true if the value is in the valid syntax, false otherwise