Class AbstractSchemaParser<T extends SchemaObject>
- java.lang.Object
-
- org.apache.directory.api.ldap.model.schema.parsers.AbstractSchemaParser<T>
-
- Type Parameters:
T
- The type of SchemaObject
- Direct Known Subclasses:
AttributeTypeDescriptionSchemaParser
,DitContentRuleDescriptionSchemaParser
,DitStructureRuleDescriptionSchemaParser
,LdapComparatorDescriptionSchemaParser
,LdapSyntaxDescriptionSchemaParser
,MatchingRuleDescriptionSchemaParser
,MatchingRuleUseDescriptionSchemaParser
,NameFormDescriptionSchemaParser
,NormalizerDescriptionSchemaParser
,ObjectClassDescriptionSchemaParser
,SyntaxCheckerDescriptionSchemaParser
public abstract class AbstractSchemaParser<T extends SchemaObject> extends Object
Base class of all schema parsers.- Author:
- Apache Directory Project
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Map<String,OpenLdapObjectIdentifierMacro>
getObjectIdentifiers()
Get the defined macros.boolean
isQuirksMode()
Checks if quirks mode is enabled.abstract T
parse(String schemaDescription)
Parse a SchemaObject description and returns back an instance of SchemaObject.void
setQuirksMode(boolean enabled)
Sets the quirks mode.
-
-
-
Method Detail
-
setQuirksMode
public void setQuirksMode(boolean enabled)
Sets the quirks mode. If enabled the parser accepts non-numeric OIDs and some special characters in descriptions.- Parameters:
enabled
- the new quirks mode
-
isQuirksMode
public boolean isQuirksMode()
Checks if quirks mode is enabled.- Returns:
- true, if is quirks mode is enabled
-
parse
public abstract T parse(String schemaDescription) throws ParseException
Parse a SchemaObject description and returns back an instance of SchemaObject.- Parameters:
schemaDescription
- The SchemaObject description- Returns:
- A SchemaObject instance
- Throws:
ParseException
- If the parsing failed
-
getObjectIdentifiers
public Map<String,OpenLdapObjectIdentifierMacro> getObjectIdentifiers()
Get the defined macros.- Returns:
- The map of defined macros
-
-