@Override
    public VirtualResource expand( final Resource resource )
        throws TransferException
    {
        List<Location> locations;
        if ( resource instanceof VirtualResource )
        {
            final List<ConcreteResource> concrete = ( (VirtualResource) resource ).toConcreteResources();
            final List<ConcreteResource> result = new ArrayList<ConcreteResource>();
            for ( final ConcreteResource cr : concrete )
            {
                final List<Location> expanded = expand( cr.getLocation() );
                for ( final Location location : expanded )
                {
                    result.add( new ConcreteResource( location, cr.getPath() ) );
                }
            }

            return new VirtualResource( result );
        }
        else
        {
            final ConcreteResource cr = (ConcreteResource) resource;
            locations = expand( cr.getLocation() );

            return new VirtualResource( locations, cr.getPath() );
        }
    }
@Override
    public VirtualResource expand( final Resource resource )
        throws TransferException
    {
        List<Location> locations;
        if ( resource instanceof VirtualResource )
        {
            final List<ConcreteResource> concrete = ( (VirtualResource) resource ).toConcreteResources();
            final List<ConcreteResource> result = new ArrayList<ConcreteResource>();
            for ( final ConcreteResource cr : concrete )
            {
                final List<Location> expanded = expand( cr.getLocation() );
                for ( final Location location : expanded )
                {
                    result.add( new ConcreteResource( location, cr.getPath() ) );
                }
            }

            return new VirtualResource( result );
        }
        else
        {
            final ConcreteResource cr = (ConcreteResource) resource;
            locations = expand( cr.getLocation() );

            return new VirtualResource( locations, cr.getPath() );
        }
    }
@ Override public VirtualResource expand ( final Resource resource ) throws TransferException { List < Location > locations ; if ( resource instanceof VirtualResource ) { final List < ConcreteResource > concrete = ( ( VirtualResource ) resource ) . toConcreteResources ( ) ; final List < ConcreteResource > result = new ArrayList < ConcreteResource > ( ) ; for ( final ConcreteResource cr : concrete ) { final List < Location > expanded = expand ( cr . getLocation ( ) ) ; for ( final Location location : expanded ) { result . add ( new ConcreteResource ( location , cr . getPath ( ) ) ) ; } } return new VirtualResource ( result ) ; } else { final ConcreteResource cr = ( ConcreteResource ) resource ; locations = expand ( cr . getLocation ( ) ) ; return new VirtualResource ( locations , cr . getPath ( ) ) ; } }
Using the same basic logic as {@link IndyLocationExpander#expand(Collection)}, convert the specified {@link Resource} into a
{@link VirtualResource} that contains references to the expanded {@link Location} list.

@see IndyLocationExpander#expand(Collection)
Using the same basic logic as { @link IndyLocationExpander#expand ( Collection ) } convert the specified { @link Resource } into a { @link VirtualResource } that contains references to the expanded { @link Location } list .