.getNameInNamespace() ) );
if ( isReferral( entry ) )
{
// The search result is a referral
SearchResultReferenceDsml srr = new SearchResultReferenceDsml();
// Getting the 'ref' attribute
EntryAttribute refAttribute = entry.get( ExportDsmlJob.REF_ATTRIBUTETYPE_NAME );
if ( refAttribute == null )
{
// If we did not get it by its name, let's get it by its OID
refAttribute = entry.get( ExportDsmlJob.REF_ATTRIBUTETYPE_OID );
}
// Adding references
if ( refAttribute != null )
{
for ( Iterator<Value<?>> iterator = refAttribute.iterator(); iterator.hasNext(); )
{
Value<?> value = ( Value<?> ) iterator.next();
srr.addSearchResultReference( new LdapURL( ( String ) value.get() ) );
}
}
return srr;
}