org.ldaptive.schema
Class SchemaUtils

java.lang.Object
  extended by org.ldaptive.schema.SchemaUtils

public final class SchemaUtils
extends Object

Provides utility methods for this package.

Version:
$Revision: 3044 $ $Date: 2014-08-26 10:58:50 -0400 (Tue, 26 Aug 2014) $
Author:
Middleware Services

Method Summary
static String formatDescriptors(String... descrs)
          Returns a formatted string to describe the supplied descriptors.
static String formatNumbers(int... numbers)
          Returns a formatted string to describe the supplied numbers.
static String formatOids(String... oids)
          Returns a formatted string to describe the supplied OIDs.
static String[] parseDescriptors(String descrs)
          Parses the supplied descriptors string and returns it's contents as a string array.
static int[] parseNumbers(String numbers)
          Parses the supplied number string and returns it's contents as a string array.
static String[] parseOIDs(String oids)
          Parses the supplied OID string and returns it's contents as a string array.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

parseDescriptors

public static String[] parseDescriptors(String descrs)
Parses the supplied descriptors string and returns it's contents as a string array. If the string contains a single quote it is assumed to be a multivalue descriptor of the form "'value1' 'value2' 'value3'". Otherwise it is treated as a single value descriptor.

Parameters:
descrs - string to parse
Returns:
array of descriptors

parseOIDs

public static String[] parseOIDs(String oids)
Parses the supplied OID string and returns it's contents as a string array. If the string contains a dollar sign it is assumed to be a multivalue OID of the form "value1 $ value2 $ value3". Otherwise it is treated as a single value OID.

Parameters:
oids - string to parse
Returns:
array of oids

parseNumbers

public static int[] parseNumbers(String numbers)
Parses the supplied number string and returns it's contents as a string array.

Parameters:
numbers - string to parse
Returns:
array of numbers

formatDescriptors

public static String formatDescriptors(String... descrs)
Returns a formatted string to describe the supplied descriptors.

Parameters:
descrs - to format
Returns:
formatted string

formatOids

public static String formatOids(String... oids)
Returns a formatted string to describe the supplied OIDs.

Parameters:
oids - to format
Returns:
formatted string

formatNumbers

public static String formatNumbers(int... numbers)
Returns a formatted string to describe the supplied numbers.

Parameters:
numbers - to format
Returns:
formatted string


Copyright © 2003-2017 Virginia Tech. All Rights Reserved.