use of org.apache.directory.api.ldap.model.schema.parsers.ObjectClassDescriptionSchemaParser in project directory-ldap-api by apache.
the class SchemaObjectRendererTest method testSubschemSubentryRendererAndParserRoundtrip.
private void testSubschemSubentryRendererAndParserRoundtrip(ObjectClass original) throws ParseException {
String renderedOriginal = SchemaObjectRenderer.SUBSCHEMA_SUBENTRY_RENDERER.render(original);
ObjectClass parsed = new ObjectClassDescriptionSchemaParser().parse(renderedOriginal);
String renderedParsed = SchemaObjectRenderer.SUBSCHEMA_SUBENTRY_RENDERER.render(parsed);
assertTrue(original.equals(parsed));
assertTrue(renderedOriginal.equals(renderedParsed));
}
use of org.apache.directory.api.ldap.model.schema.parsers.ObjectClassDescriptionSchemaParser in project directory-ldap-api by apache.
the class ApiLdapModelOsgiTest method useBundleClasses.
@Override
protected void useBundleClasses() throws Exception {
// uses FastDnParser
new Dn("dc=example,dc=com");
// uses ComplexDnparser (antlr based)
new Dn("cn=a+sn=b,dc=example,dc=com");
new Value("foo");
new DefaultAttribute("cn");
new DefaultEntry();
AttributeUtils.toJndiAttribute(new DefaultAttribute("cn"));
new BindRequestImpl();
new EqualityNode<String>("cn", "foo");
new LdapUrl("ldap://ldap.example.com:10389/dc=example,dc=com?objectclass");
new ObjectClassDescriptionSchemaParser().parse("( 2.5.6.0 NAME 'top' DESC 'top of the superclass chain' ABSTRACT MUST objectClass )");
SchemaObject schemaObject = new LdapSyntax("1.2.3");
new Registries().getGlobalOidRegistry().register(schemaObject);
new Registries().getLoadedSchemas();
}
Aggregations