| | |
| | | |
| | | private boolean allowMalformedNamesAndOptions; |
| | | |
| | | private boolean allowMalformedJPEGPhotos; |
| | | |
| | | // A schema which should be copied into this builder on any mutation. |
| | | private Schema copyOnWriteSchema = null; |
| | | |
| | |
| | | } |
| | | |
| | | /** |
| | | * Specifies whether or not the JPEG Photo syntax should allow values |
| | | * which do not conform to the JFIF or Exif specifications. |
| | | * <p> |
| | | * By default this compatibility option is set to {@code true}. |
| | | * |
| | | * @param allowMalformedJPEGPhotos |
| | | * {@code true} if the JPEG Photo syntax should allow |
| | | * values which do not conform to the JFIF or Exif |
| | | * specifications. |
| | | * @return A reference to this {@code SchemaBuilder}. |
| | | */ |
| | | public SchemaBuilder allowMalformedJPEGPhotos( |
| | | final boolean allowMalformedJPEGPhotos) { |
| | | lazyInitBuilder(); |
| | | |
| | | this.allowMalformedJPEGPhotos = allowMalformedJPEGPhotos; |
| | | return this; |
| | | } |
| | | |
| | | /** |
| | | * Specifies whether or not the Telephone Number syntax should allow values |
| | | * which do not conform to the E.123 international telephone number format. |
| | | * <p> |
| | |
| | | |
| | | final Schema schema = |
| | | new Schema(localSchemaName, allowMalformedNamesAndOptions, |
| | | allowNonStandardTelephoneNumbers, allowZeroLengthDirectoryStrings, |
| | | numericOID2Syntaxes, numericOID2MatchingRules, numericOID2MatchingRuleUses, |
| | | allowMalformedJPEGPhotos, allowNonStandardTelephoneNumbers, |
| | | allowZeroLengthDirectoryStrings, numericOID2Syntaxes, |
| | | numericOID2MatchingRules, numericOID2MatchingRuleUses, |
| | | numericOID2AttributeTypes, numericOID2ObjectClasses, numericOID2NameForms, |
| | | numericOID2ContentRules, id2StructureRules, name2MatchingRules, |
| | | name2MatchingRuleUses, name2AttributeTypes, name2ObjectClasses, |
| | |
| | | // Lazy initialization. |
| | | if (numericOID2Syntaxes == null) { |
| | | allowMalformedNamesAndOptions = true; |
| | | allowMalformedJPEGPhotos = true; |
| | | allowNonStandardTelephoneNumbers = true; |
| | | allowZeroLengthDirectoryStrings = false; |
| | | |
| | |
| | | addSchema0(copyOnWriteSchema, true); |
| | | |
| | | allowMalformedNamesAndOptions = copyOnWriteSchema.allowMalformedNamesAndOptions(); |
| | | allowMalformedJPEGPhotos = copyOnWriteSchema.allowMalformedJPEGPhotos(); |
| | | allowNonStandardTelephoneNumbers = copyOnWriteSchema.allowNonStandardTelephoneNumbers(); |
| | | allowZeroLengthDirectoryStrings = copyOnWriteSchema.allowZeroLengthDirectoryStrings(); |
| | | |
| | |
| | | this.copyOnWriteSchema = copyOnWriteSchema; |
| | | |
| | | this.allowMalformedNamesAndOptions = true; |
| | | this.allowMalformedJPEGPhotos = true; |
| | | this.allowNonStandardTelephoneNumbers = true; |
| | | this.allowZeroLengthDirectoryStrings = false; |
| | | |