| | |
| | | return true; |
| | | } |
| | | |
| | | public boolean allowMalformedJPEGPhotos() { |
| | | return true; |
| | | } |
| | | |
| | | public boolean allowZeroLengthDirectoryStrings() { |
| | | return false; |
| | | } |
| | |
| | | private static interface Impl { |
| | | boolean allowMalformedNamesAndOptions(); |
| | | |
| | | boolean allowMalformedJPEGPhotos(); |
| | | |
| | | boolean allowNonStandardTelephoneNumbers(); |
| | | |
| | | boolean allowZeroLengthDirectoryStrings(); |
| | |
| | | return strictImpl.allowMalformedNamesAndOptions(); |
| | | } |
| | | |
| | | public boolean allowMalformedJPEGPhotos() { |
| | | return strictImpl.allowMalformedJPEGPhotos(); |
| | | } |
| | | |
| | | public boolean allowNonStandardTelephoneNumbers() { |
| | | return strictImpl.allowNonStandardTelephoneNumbers(); |
| | | } |
| | |
| | | |
| | | private final String schemaName; |
| | | |
| | | private final boolean allowMalformedJPEGPhotos; |
| | | |
| | | private final boolean allowNonStandardTelephoneNumbers; |
| | | |
| | | private final boolean allowZeroLengthDirectoryStrings; |
| | |
| | | private final boolean allowMalformedNamesAndOptions; |
| | | |
| | | StrictImpl(final String schemaName, final boolean allowMalformedNamesAndOptions, |
| | | final boolean allowMalformedJPEGPhotos, |
| | | final boolean allowNonStandardTelephoneNumbers, |
| | | final boolean allowZeroLengthDirectoryStrings, |
| | | final Map<String, Syntax> numericOID2Syntaxes, |
| | |
| | | final List<LocalizableMessage> warnings) { |
| | | this.schemaName = schemaName; |
| | | this.allowMalformedNamesAndOptions = allowMalformedNamesAndOptions; |
| | | this.allowMalformedJPEGPhotos = allowMalformedJPEGPhotos; |
| | | this.allowNonStandardTelephoneNumbers = allowNonStandardTelephoneNumbers; |
| | | this.allowZeroLengthDirectoryStrings = allowZeroLengthDirectoryStrings; |
| | | this.numericOID2Syntaxes = Collections.unmodifiableMap(numericOID2Syntaxes); |
| | |
| | | return allowMalformedNamesAndOptions; |
| | | } |
| | | |
| | | public boolean allowMalformedJPEGPhotos() { |
| | | return allowMalformedJPEGPhotos; |
| | | } |
| | | |
| | | public boolean allowNonStandardTelephoneNumbers() { |
| | | return allowNonStandardTelephoneNumbers; |
| | | } |
| | |
| | | private final Impl impl; |
| | | |
| | | Schema(final String schemaName, final boolean allowMalformedNamesAndOptions, |
| | | final boolean allowMalformedJPEGPhotos, |
| | | final boolean allowNonStandardTelephoneNumbers, |
| | | final boolean allowZeroLengthDirectoryStrings, |
| | | final Map<String, Syntax> numericOID2Syntaxes, |
| | |
| | | final List<LocalizableMessage> warnings) { |
| | | impl = |
| | | new StrictImpl(schemaName, allowMalformedNamesAndOptions, |
| | | allowNonStandardTelephoneNumbers, allowZeroLengthDirectoryStrings, |
| | | numericOID2Syntaxes, numericOID2MatchingRules, numericOID2MatchingRuleUses, |
| | | allowMalformedJPEGPhotos, allowNonStandardTelephoneNumbers, |
| | | allowZeroLengthDirectoryStrings, numericOID2Syntaxes, |
| | | numericOID2MatchingRules, numericOID2MatchingRuleUses, |
| | | numericOID2AttributeTypes, numericOID2ObjectClasses, numericOID2NameForms, |
| | | numericOID2ContentRules, id2StructureRules, name2MatchingRules, |
| | | name2MatchingRuleUses, name2AttributeTypes, name2ObjectClasses, |
| | |
| | | } |
| | | |
| | | /** |
| | | * Returns {@code true} if the JPEG Photo syntax defined for this |
| | | * schema allows values which do not conform to the JFIF or Exif |
| | | * specifications. |
| | | * <p> |
| | | * By default this compatibility option is set to {@code true}. |
| | | * |
| | | * @return {@code true} if the JPEG Photo syntax defined for this |
| | | * schema allows values which do not conform to the JFIF |
| | | * of Exit specifications. |
| | | */ |
| | | public boolean allowMalformedJPEGPhotos() { |
| | | return impl.allowMalformedJPEGPhotos(); |
| | | } |
| | | |
| | | /** |
| | | * Returns {@code true} if the Telephone Number syntax defined for this |
| | | * schema allows values which do not conform to the E.123 international |
| | | * telephone number format. |