/** * {@inheritDoc} */ @Override public String toString() { return SchemaObjectRenderer.OPEN_LDAP_SCHEMA_RENDERER.render( this ); }
private void renderObsolete( SchemaObject so, StringBuilder buf ) { if ( so.isObsolete() ) { prettyPrintIndent( buf ); buf.append( "OBSOLETE" ); prettyPrintNewLine( buf ); } }
private void renderOids( StringBuilder buf, String prefix, List<String> oids ) { if ( ( oids != null ) && !oids.isEmpty() ) { prettyPrintIndent( buf ); buf.append( prefix ).append( ' ' ); renderOids( buf, oids ); prettyPrintNewLine( buf ); } }
/** * NOT FULLY IMPLEMENTED! * Renders a MatchingRuleUse as a String * * @param mru The MatchingRuleUse to render * @return The MatchingRuleUse as a String */ public String render( MatchingRuleUse mru ) { StringBuilder buf = renderStartOidNamesDescObsolete( mru, "matchingruleuse" ); List<String> applies = mru.getApplicableAttributeOids(); if ( ( applies != null ) && !applies.isEmpty() ) { prettyPrintIndent( buf ); buf.append( "APPLIES " ); renderOids( buf, applies ); prettyPrintNewLine( buf ); } renderXSchemaName( mru, buf ); // @todo extensions are not presently supported and skipped // the extensions would go here before closing off the description renderClose( buf ); return buf.toString(); }
/** * NOT FULLY IMPLEMENTED! * * @param dsr The DitStructureRule to render * @return The DitStructureRule as a String */ public String render( DitStructureRule dsr ) { StringBuilder buf = new StringBuilder(); if ( style.startWithSchemaType ) { buf.append( "ditstructurerule " ); } buf.append( "( " ).append( dsr.getRuleId() ); renderNames( dsr, buf ); renderDescription( dsr, buf ); renderObsolete( dsr, buf ); prettyPrintIndent( buf ); buf.append( "FORM " ).append( dsr.getForm() ); prettyPrintNewLine( buf ); renderRuleIds( buf, dsr.getSuperRules() ); renderXSchemaName( dsr, buf ); // @todo extensions are not presently supported and skipped // the extensions would go here before closing off the description renderClose( buf ); return buf.toString(); }
prettyPrintNewLine( buf ); renderDescription( syntax, buf ); renderXSchemaName( syntax, buf ); prettyPrintIndent( buf ); if ( syntax.isHumanReadable() ) prettyPrintNewLine( buf ); renderClose( buf );
/** * NOT FULLY IMPLEMENTED! * Renders a DitContentRule as a String * * @param dcr The DitContentRule to render * @return The DitContentRule as a String */ public String render( DitContentRule dcr ) { StringBuilder buf = renderStartOidNamesDescObsolete( dcr, "ditcontentrule" ); renderOids( buf, "AUX", dcr.getAuxObjectClassOids() ); renderOids( buf, "MUST", dcr.getMustAttributeTypeOids() ); renderOids( buf, "MAY", dcr.getMayAttributeTypeOids() ); renderOids( buf, "NOT", dcr.getNotAttributeTypeOids() ); renderXSchemaName( dcr, buf ); // @todo extensions are not presently supported and skipped // the extensions would go here before closing off the description renderClose( buf ); return buf.toString(); }
private void renderDescription( SchemaObject so, StringBuilder buf ) { if ( so.getDescription() != null ) { prettyPrintIndent( buf ); buf.append( "DESC " ); renderQDString( buf, so.getDescription() ); prettyPrintNewLine( buf ); } }
private StringBuilder renderStartOidNamesDescObsolete( SchemaObject so, String schemaObjectType ) { StringBuilder buf = new StringBuilder(); if ( style.startWithSchemaType ) { buf.append( schemaObjectType ).append( ' ' ); } buf.append( "( " ).append( so.getOid() ); renderNames( so, buf ); renderDescription( so, buf ); renderObsolete( so, buf ); return buf; }
private void renderNames( SchemaObject so, StringBuilder buf ) { List<String> names = so.getNames(); if ( ( names != null ) && !names.isEmpty() ) { buf.append( " NAME " ); renderQDescrs( buf, names ); prettyPrintNewLine( buf ); } else { prettyPrintNewLine( buf ); } }
/** * NOT FULLY IMPLEMENTED! * Renders a MatchingRuleUse as a String * * @param mru The MatchingRuleUse to render * @return The MatchingRuleUse as a String */ public String render( MatchingRuleUse mru ) { StringBuilder buf = renderStartOidNamesDescObsolete( mru, "matchingruleuse" ); List<String> applies = mru.getApplicableAttributeOids(); if ( ( applies != null ) && !applies.isEmpty() ) { prettyPrintIndent( buf ); buf.append( "APPLIES " ); renderOids( buf, applies ); prettyPrintNewLine( buf ); } renderXSchemaName( mru, buf ); // @todo extensions are not presently supported and skipped // the extensions would go here before closing off the description renderClose( buf ); return buf.toString(); }
/** * NOT FULLY IMPLEMENTED! * * @param dsr The DitStructureRule to render * @return The DitStructureRule as a String */ public String render( DitStructureRule dsr ) { StringBuilder buf = new StringBuilder(); if ( style.startWithSchemaType ) { buf.append( "ditstructurerule " ); } buf.append( "( " ).append( dsr.getRuleId() ); renderNames( dsr, buf ); renderDescription( dsr, buf ); renderObsolete( dsr, buf ); prettyPrintIndent( buf ); buf.append( "FORM " ).append( dsr.getForm() ); prettyPrintNewLine( buf ); renderRuleIds( buf, dsr.getSuperRules() ); renderXSchemaName( dsr, buf ); // @todo extensions are not presently supported and skipped // the extensions would go here before closing off the description renderClose( buf ); return buf.toString(); }
prettyPrintNewLine( buf ); renderDescription( syntax, buf ); renderXSchemaName( syntax, buf ); prettyPrintIndent( buf ); if ( syntax.isHumanReadable() ) prettyPrintNewLine( buf ); renderClose( buf );
/** * NOT FULLY IMPLEMENTED! * Renders a DitContentRule as a String * * @param dcr The DitContentRule to render * @return The DitContentRule as a String */ public String render( DitContentRule dcr ) { StringBuilder buf = renderStartOidNamesDescObsolete( dcr, "ditcontentrule" ); renderOids( buf, "AUX", dcr.getAuxObjectClassOids() ); renderOids( buf, "MUST", dcr.getMustAttributeTypeOids() ); renderOids( buf, "MAY", dcr.getMayAttributeTypeOids() ); renderOids( buf, "NOT", dcr.getNotAttributeTypeOids() ); renderXSchemaName( dcr, buf ); // @todo extensions are not presently supported and skipped // the extensions would go here before closing off the description renderClose( buf ); return buf.toString(); }
private void renderDescription( SchemaObject so, StringBuilder buf ) { if ( so.getDescription() != null ) { prettyPrintIndent( buf ); buf.append( "DESC " ); renderQDString( buf, so.getDescription() ); prettyPrintNewLine( buf ); } }
private StringBuilder renderStartOidNamesDescObsolete( SchemaObject so, String schemaObjectType ) { StringBuilder buf = new StringBuilder(); if ( style.startWithSchemaType ) { buf.append( schemaObjectType ).append( ' ' ); } buf.append( "( " ).append( so.getOid() ); renderNames( so, buf ); renderDescription( so, buf ); renderObsolete( so, buf ); return buf; }
private void renderNames( SchemaObject so, StringBuilder buf ) { List<String> names = so.getNames(); if ( ( names != null ) && !names.isEmpty() ) { buf.append( " NAME " ); renderQDescrs( buf, names ); prettyPrintNewLine( buf ); } else { prettyPrintNewLine( buf ); } }
/** * NOT FULLY IMPLEMENTED! * Renders a MatchingRuleUse as a String * * @param mru The MatchingRuleUse to render * @return The MatchingRuleUse as a String */ public String render( MatchingRuleUse mru ) { StringBuilder buf = renderStartOidNamesDescObsolete( mru, "matchingruleuse" ); List<String> applies = mru.getApplicableAttributeOids(); if ( ( applies != null ) && !applies.isEmpty() ) { prettyPrintIndent( buf ); buf.append( "APPLIES " ); renderOids( buf, applies ); prettyPrintNewLine( buf ); } renderXSchemaName( mru, buf ); // @todo extensions are not presently supported and skipped // the extensions would go here before closing off the description renderClose( buf ); return buf.toString(); }
/** * NOT FULLY IMPLEMENTED! * * @param dsr The DitStructureRule to render * @return The DitStructureRule as a String */ public String render( DitStructureRule dsr ) { StringBuilder buf = new StringBuilder(); if ( style.startWithSchemaType ) { buf.append( "ditstructurerule " ); } buf.append( "( " ).append( dsr.getRuleId() ); renderNames( dsr, buf ); renderDescription( dsr, buf ); renderObsolete( dsr, buf ); prettyPrintIndent( buf ); buf.append( "FORM " ).append( dsr.getForm() ); prettyPrintNewLine( buf ); renderRuleIds( buf, dsr.getSuperRules() ); renderXSchemaName( dsr, buf ); // @todo extensions are not presently supported and skipped // the extensions would go here before closing off the description renderClose( buf ); return buf.toString(); }
prettyPrintNewLine( buf ); renderDescription( syntax, buf ); renderXSchemaName( syntax, buf ); prettyPrintIndent( buf ); if ( syntax.isHumanReadable() ) prettyPrintNewLine( buf ); renderClose( buf );