if ( resourceArray != null )
{
for ( int i = 0; i < resourceArray.length; i++ )
{
ResourceDocument.Resource resourceDoc = resourceArray[i];
Resource resource = new Resource( );
resource.setName( resourceDoc.getName( ) );
resource.setAuth( resourceDoc.getAuth( ) );
resource.setDescription( resourceDoc.getDescription( ) );
resource.setType( resourceDoc.getType( ) );
resource.setScope( resourceDoc.getScope( ) );
resource.setParameters( getParameters( resourceDoc.getResourceParams( ) ) );
resources.add( resource );
}
}
return (Resource[]) resources.toArray( new Resource[0] );