Package org.ldaptive.schema
Class SchemaParser
java.lang.Object
org.ldaptive.schema.SchemaParser
Encapsulates a
SchemaFunction
and exposes a convenience static method for parsing schema definitions. The
schema function used by this class can be set using the system property SCHEMA_FUNCTION_PROPERTY
.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
CharBuffer based implementation for schema functions.static class
Regular expression based implementation for schema functions. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final org.slf4j.Logger
Logger for this class.private static final SchemaFunction
Default schema function.private static final Constructor<?>
Custom schema parser constructor.private static final String
Schema schema function system property. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic SchemaFunction
TheSCHEMA_FUNCTION_PROPERTY
property is checked and that class is loaded if provided.static <T extends SchemaElement>
TParses the supplied string representation of a schema element.
-
Field Details
-
SCHEMA_FUNCTION_PROPERTY
Schema schema function system property.- See Also:
-
LOGGER
private static final org.slf4j.Logger LOGGERLogger for this class. -
SCHEMA_FUNCTION
Default schema function. -
SCHEMA_FUNCTION_CONSTRUCTOR
Custom schema parser constructor.
-
-
Constructor Details
-
SchemaParser
private SchemaParser()Default constructor.
-
-
Method Details
-
getSchemaFunction
TheSCHEMA_FUNCTION_PROPERTY
property is checked and that class is loaded if provided. Otherwise theSchemaParser.DefaultSchemaFunction
is returned.- Returns:
- default filter function
-
parse
public static <T extends SchemaElement> T parse(Class<T> type, String definition) throws SchemaParseException Parses the supplied string representation of a schema element.- Type Parameters:
T
- type of schema element- Parameters:
type
- of schema elementdefinition
- to parse- Returns:
- parsed schema element
- Throws:
SchemaParseException
- if definition is invalid
-