@Test public void testRenderQdescrs() { assertEquals( "", SchemaUtils.renderQDescrs( new StringBuilder(), ( List<String> ) null ).toString() ); assertEquals( "", SchemaUtils.renderQDescrs( new StringBuilder(), Arrays.asList( new String[] {} ) ).toString() ); assertEquals( "'name1'", SchemaUtils.renderQDescrs( new StringBuilder(), Arrays.asList( new String[] { "name1" } ) ).toString() ); assertEquals( "( 'name1' 'name2' )", SchemaUtils.renderQDescrs( new StringBuilder(), Arrays.asList( new String[] { "name1", "name2" } ) ).toString() ); assertEquals( "( 'name1' 'name2' 'name3' )", SchemaUtils.renderQDescrs( new StringBuilder(), Arrays.asList( new String[] { "name1", "name2", "name3" } ) ).toString() ); assertEquals( "", SchemaUtils.renderQDescrs( new StringBuilder(), ( List<String> ) null ).toString() ); assertEquals( "", SchemaUtils.renderQDescrs( new StringBuilder(), Arrays.asList( new String[] {} ) ).toString() ); assertEquals( "'name1'", SchemaUtils.renderQDescrs( new StringBuilder(), Arrays.asList( new String[] { "name1" } ) ).toString() ); assertEquals( "( 'name1' 'name2' )", SchemaUtils.renderQDescrs( new StringBuilder(), Arrays.asList( new String[] { "name1", "name2" } ) ).toString() ); assertEquals( "( 'name1' 'name2' 'name3' )", SchemaUtils.renderQDescrs( new StringBuilder(), Arrays.asList( new String[] { "name1", "name2", "name3" } ) ).toString() ); }
static StringBuilder renderQDescrs( StringBuilder buf, List<String> qdescrs ) { if ( ( qdescrs == null ) || qdescrs.isEmpty() ) { return buf; } if ( qdescrs.size() == 1 ) { buf.append( '\'' ).append( qdescrs.get( 0 ) ).append( '\'' ); } else { buf.append( "( " ); for ( String qdescr : qdescrs ) { buf.append( '\'' ).append( qdescr ).append( "' " ); } buf.append( ")" ); } return buf; }
SchemaUtils { static StringBuilder renderQDescrs( StringBuilder buf, List<String> qdescrs ) { if ( ( qdescrs == null ) || qdescrs.isEmpty() ) { return buf; } if ( qdescrs.size() == 1 ) { buf.append( '\'' ).append( qdescrs.get( 0 ) ).append( '\'' ); } else { buf.append( "( " ); for ( String qdescr : qdescrs ) { buf.append( '\'' ).append( qdescr ).append( "' " ); } buf.append( ")" ); } return buf; } }
SchemaUtils { static StringBuilder renderQDescrs( StringBuilder buf, List<String> qdescrs ) { if ( ( qdescrs == null ) || qdescrs.isEmpty() ) { return buf; } if ( qdescrs.size() == 1 ) { buf.append( '\'' ).append( qdescrs.get( 0 ) ).append( '\'' ); } else { buf.append( "( " ); for ( String qdescr : qdescrs ) { buf.append( '\'' ).append( qdescr ).append( "' " ); } buf.append( ")" ); } return buf; } private  SchemaUtils(); }
SchemaUtils { static StringBuilder renderQDescrs( StringBuilder buf, List<String> qdescrs ) { if ( ( qdescrs == null ) || qdescrs.isEmpty() ) { return buf; } if ( qdescrs.size() == 1 ) { buf.append( '\'' ).append( qdescrs.get( 0 ) ).append( '\'' ); } else { buf.append( "( " ); for ( String qdescr : qdescrs ) { buf.append( '\'' ).append( qdescr ).append( "' " ); } buf.append( ")" ); } return buf; } private  SchemaUtils(); static Entry getTargetEntry( List<? extends Modification> mods, Entry entry ); static StringBuilder render( StringBuilder buf, List<String> qdescrs ); static StringBuilder render( ObjectClass[] ocs ); static StringBuilder render( StringBuilder buf, ObjectClass[] ocs ); static StringBuilder render( AttributeType[] ats ); static StringBuilder render( StringBuilder buf, AttributeType[] ats ); static StringBuilder render( Map<String, List<String>> extensions ); static String render( LoadableSchemaObject description ); static String stripOptions( String attributeId ); static Set<String> getOptions( String attributeId ); static byte[] uuidToBytes( UUID uuid ); static boolean isAttributeNameValid( String attributeName ); }
SchemaUtils { static StringBuilder renderQDescrs( StringBuilder buf, List<String> qdescrs ) { if ( ( qdescrs == null ) || qdescrs.isEmpty() ) { return buf; } if ( qdescrs.size() == 1 ) { buf.append( '\'' ).append( qdescrs.get( 0 ) ).append( '\'' ); } else { buf.append( "( " ); for ( String qdescr : qdescrs ) { buf.append( '\'' ).append( qdescr ).append( "' " ); } buf.append( ")" ); } return buf; } private  SchemaUtils(); static Entry getTargetEntry( List<? extends Modification> mods, Entry entry ); static StringBuilder render( StringBuilder buf, List<String> qdescrs ); static StringBuilder render( ObjectClass[] ocs ); static StringBuilder render( StringBuilder buf, ObjectClass[] ocs ); static StringBuilder render( AttributeType[] ats ); static StringBuilder render( StringBuilder buf, AttributeType[] ats ); static StringBuilder render( Map<String, List<String>> extensions ); static String render( LoadableSchemaObject description ); static String stripOptions( String attributeId ); static Set<String> getOptions( String attributeId ); static byte[] uuidToBytes( UUID uuid ); static boolean isAttributeNameValid( String attributeName );  }