return optionsFactory;
}
private void addMetaTypeNames( final Map pidMap, final Map ocdCollection, final String filterSpec, final String type )
{
Filter filter = null;
if ( filterSpec != null )
{
try
{
filter = getBundleContext().createFilter( filterSpec );
}
catch ( InvalidSyntaxException not_expected )
{
/* filter is correct */
}
}
for ( Iterator ei = ocdCollection.entrySet().iterator(); ei.hasNext(); )
{
Entry ociEntry = ( Entry ) ei.next();
final String pid = ( String ) ociEntry.getKey();
final ObjectClassDefinition ocd = ( ObjectClassDefinition ) ociEntry.getValue();
if ( filter == null )
{
pidMap.put( pid, ocd.getName() );
}
else
{
final Dictionary props = new Hashtable();
props.put( type, pid );
if ( filter.match( props ) )
{
pidMap.put( pid, ocd.getName() );
}
}
}