Package org.codehaus.plexus.components.io.fileselectors

Examples of org.codehaus.plexus.components.io.fileselectors.FileSelector


    public Iterator getResources()
        throws IOException
    {
        final List result = new ArrayList();
        final FileSelector fileSelector = getDefaultFileSelector();
        String prefix = getPrefix();
        if ( prefix != null && prefix.length() == 0 )
        {
            prefix = null;
        }
        for ( final Iterator iter = getSrc().getResources(); iter.hasNext(); )
        {
            PlexusIoResource plexusIoResource = (PlexusIoResource) iter.next();

            PlexusIoResourceAttributes attrs = null;
            if ( plexusIoResource instanceof PlexusIoResourceWithAttributes )
            {
                attrs = ( (PlexusIoResourceWithAttributes) plexusIoResource ).getAttributes();
            }

            if ( plexusIoResource.isDirectory() )
            {
                attrs =
                    PlexusIoResourceAttributeUtils.mergeAttributes( overrideDirAttributes, attrs, defaultDirAttributes );
            }
            else
            {
                attrs =
                    PlexusIoResourceAttributeUtils.mergeAttributes( overrideFileAttributes, attrs,
                                                                    defaultFileAttributes );
            }

            if ( !fileSelector.isSelected( plexusIoResource ) )
            {
                continue;
            }
            if ( !isSelected( plexusIoResource ) )
            {
View Full Code Here


    }

    public Iterator getResources() throws IOException
    {
        final List result = new ArrayList();
        final FileSelector fileSelector = getDefaultFileSelector();
        String prefix = getPrefix();
        if ( prefix != null  &&  prefix.length() == 0 )
        {
            prefix = null;
        }
        for ( Iterator iter = getSrc().getResources();  iter.hasNext())
        {
            PlexusIoResource plexusIoResource = (PlexusIoResource) iter.next();
           
            PlexusIoResourceAttributes attrs = null;
            if ( plexusIoResource instanceof PlexusIoResourceWithAttributes )
            {
                attrs = ((PlexusIoResourceWithAttributes)plexusIoResource).getAttributes();
            }

            if ( plexusIoResource.isDirectory() )
            {
                attrs = PlexusIoResourceAttributeUtils.mergeAttributes( overrideDirAttributes, attrs, defaultDirAttributes );
            }
            else
            {
                attrs = PlexusIoResourceAttributeUtils.mergeAttributes( overrideFileAttributes, attrs, defaultFileAttributes );
            }
           
            if ( !fileSelector.isSelected( plexusIoResource ) )
            {
                continue;
            }
            if ( !isSelected( plexusIoResource ) )
            {
View Full Code Here

        if ( extraSelectors != null )
        {
            for ( final Iterator<FileSelector> it = extraSelectors.iterator(); it.hasNext(); )
            {
                final FileSelector selector = it.next();
                selectors.add( selector );
            }
        }

        if ( ( extraFinalizers != null ) && isFinalizerEnabled )
View Full Code Here

            {
                final FileInfo fileInfo = new DefaultFileInfo( inputFile );

                for ( int i = 0; i < selectors.length; i++ )
                {
                    final FileSelector selector = selectors[i];

                    try
                    {
                        if ( !selector.isSelected( fileInfo ) )
                        {
                            return false;
                        }
                    }
                    catch ( final IOException e )
View Full Code Here

    public Iterator<PlexusIoResource> getResources()
        throws IOException
    {
        final List<PlexusIoResource> result = new ArrayList<PlexusIoResource>();
        final FileSelector fileSelector = getDefaultFileSelector();
        String prefix = getPrefix();
        if ( prefix != null && prefix.length() == 0 )
        {
            prefix = null;
        }
        for ( final Iterator<PlexusIoResource> iter = getSrc().getResources(); iter.hasNext(); )
        {
            PlexusIoResource plexusIoResource = iter.next();

            PlexusIoResourceAttributes attrs = null;
            if ( plexusIoResource instanceof PlexusIoResourceWithAttributes )
            {
                attrs = ( (PlexusIoResourceWithAttributes) plexusIoResource ).getAttributes();
            }

            if ( plexusIoResource.isDirectory() )
            {
                attrs =
                    PlexusIoResourceAttributeUtils.mergeAttributes(
                        getOverrideDirAttributes(), attrs, getDefaultDirAttributes() );
            }
            else
            {
                attrs =
                    PlexusIoResourceAttributeUtils.mergeAttributes(
                        getOverrideFileAttributes(), attrs, getDefaultFileAttributes() );
            }

            if ( !fileSelector.isSelected( plexusIoResource ) )
            {
                continue;
            }
            if ( !isSelected( plexusIoResource ) )
            {
View Full Code Here

    public Iterator<PlexusIoResource> getResources()
        throws IOException
    {
        final List<PlexusIoResource> result = new ArrayList<PlexusIoResource>();
        final FileSelector fileSelector = getDefaultFileSelector();
        String prefix = getPrefix();
        if ( prefix != null && prefix.length() == 0 )
        {
            prefix = null;
        }
        for ( final Iterator iter = getSrc().getResources(); iter.hasNext(); )
        {
            PlexusIoResource plexusIoResource = (PlexusIoResource) iter.next();

            PlexusIoResourceAttributes attrs = null;
            if ( plexusIoResource instanceof PlexusIoResourceWithAttributes )
            {
                attrs = ( (PlexusIoResourceWithAttributes) plexusIoResource ).getAttributes();
            }

            if ( plexusIoResource.isDirectory() )
            {
                attrs =
                    PlexusIoResourceAttributeUtils.mergeAttributes( overrideDirAttributes, attrs, defaultDirAttributes );
            }
            else
            {
                attrs =
                    PlexusIoResourceAttributeUtils.mergeAttributes( overrideFileAttributes, attrs,
                                                                    defaultFileAttributes );
            }

            if ( !fileSelector.isSelected( plexusIoResource ) )
            {
                continue;
            }
            if ( !isSelected( plexusIoResource ) )
            {
View Full Code Here

TOP

Related Classes of org.codehaus.plexus.components.io.fileselectors.FileSelector

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.