return structureBuilder.getStructure();
}
private void addAttribute(ObjectClassStructureBuilder parent, String name, AttributeUse use,
AttributeCardinality cardinality) {
LdapStructureAttributeBuilder builder = new LdapStructureAttributeBuilder();
builder.setOid(new NumericOid("1.2.3.4.5"));
builder.setName(name);
builder.setSyntaxInfo(new AttributeSyntaxInfo() {
@Override
public AttributeDataType getDataType() {
return AttributeDataType.STRING;
}
@Override
public String getDescription() {
return "Octet String";
}
@Override
public String getOid() {
return "1.3.6.1.4.1.1466.115.121.1.40";
}
});
builder.setUse(use);
builder.setCardinality(cardinality);
parent.addAttribute(builder.getAttribute());
}