Package org.apache.xerces.impl

Examples of org.apache.xerces.impl.XMLDocumentScannerImpl$Dispatcher


* Created by Tronok on 29.04.14.
*/
public class DispatcherTest {
    @Test
    public void testDispatcherNormal2Threads() throws InterruptedException, ExecutionException, IOException {
        Dispatcher dispatcher = new Dispatcher("multicoreTest.txt", 2);
        Assert.assertArrayEquals(new int[]{1, 2, 2, 3, 5, 5, 6, 8, 9, 34}, dispatcher.sort());
        dispatcher = new Dispatcher("multicoreTest_1_by_1.txt", 2);
        Assert.assertArrayEquals(new int[]{1, 2, 2, 3, 5, 5, 6, 8, 9, 34}, dispatcher.sort());
    }
View Full Code Here


        Assert.assertArrayEquals(new int[]{1, 2, 2, 3, 5, 5, 6, 8, 9, 34}, dispatcher.sort());
    }

    @Test
    public void testDispatcherNormal3Threads() throws InterruptedException, ExecutionException, IOException {
        Dispatcher dispatcher = new Dispatcher("multicoreTest.txt", 3);
        Assert.assertArrayEquals(new int[]{1, 2, 2, 3, 5, 5, 6, 8, 9, 34}, dispatcher.sort());
        dispatcher = new Dispatcher("multicoreTest_1_by_1.txt", 3);
        Assert.assertArrayEquals(new int[]{1, 2, 2, 3, 5, 5, 6, 8, 9, 34}, dispatcher.sort());
    }
View Full Code Here

        Assert.assertArrayEquals(new int[]{1, 2, 2, 3, 5, 5, 6, 8, 9, 34}, dispatcher.sort());
    }

    @Test
    public void testDispatcherNormal4Threads() throws InterruptedException, ExecutionException, IOException {
        Dispatcher dispatcher = new Dispatcher("multicoreTest.txt", 4);
        Assert.assertArrayEquals(new int[]{1, 2, 2, 3, 5, 5, 6, 8, 9, 34}, dispatcher.sort());
        dispatcher = new Dispatcher("multicoreTest_1_by_1.txt", 4);
        Assert.assertArrayEquals(new int[]{1, 2, 2, 3, 5, 5, 6, 8, 9, 34}, dispatcher.sort());
    }
View Full Code Here

                                         XMLGrammarPool grammarPool,
                                         XMLComponentManager parentSettings) {
        super(symbolTable, grammarPool, parentSettings);
       
        // create components
        fNonNSScanner = new XMLDocumentScannerImpl();
        fNonNSDTDValidator = new XMLDTDValidator();

        // add components
        addComponent((XMLComponent)fNonNSScanner);
        addComponent((XMLComponent)fNonNSDTDValidator);
View Full Code Here

            fNamespaceScanner.setDTDValidator(null);
            fScanner = fNamespaceScanner;
        }
        else {
            if (fNonNSScanner == null) {
                fNonNSScanner = new XMLDocumentScannerImpl();
                addComponent((XMLComponent)fNonNSScanner);
            }
            fProperties.put(DOCUMENT_SCANNER, fNonNSScanner);
            fScanner = fNonNSScanner;
        }
View Full Code Here

        return new XMLErrorReporter();
    } // createErrorReporter():XMLErrorReporter

    /** Create a document scanner. */
    protected XMLDocumentScanner createDocumentScanner() {
        return new XMLDocumentScannerImpl();
    } // createDocumentScanner():XMLDocumentScanner
View Full Code Here

            fNamespaceScanner.setDTDValidator(null);
            fScanner = fNamespaceScanner;
        }
        else {
            if (fNonNSScanner == null) {
                fNonNSScanner = new XMLDocumentScannerImpl();
                addComponent((XMLComponent)fNonNSScanner);
            }
            fProperties.put(DOCUMENT_SCANNER, fNonNSScanner);
            fScanner = fNonNSScanner;
        }
View Full Code Here

        return new XMLErrorReporter();
    } // createErrorReporter():XMLErrorReporter

    /** Create a document scanner. */
    protected XMLDocumentScanner createDocumentScanner() {
        return new XMLDocumentScannerImpl();
    } // createDocumentScanner():XMLDocumentScanner
View Full Code Here

                                         XMLGrammarPool grammarPool,
                                         XMLComponentManager parentSettings) {
        super(symbolTable, grammarPool, parentSettings);
       
        // create components
        fNonNSScanner = new XMLDocumentScannerImpl();
        fNonNSDTDValidator = new XMLDTDValidator();

        // add components
        addComponent((XMLComponent)fNonNSScanner);
        addComponent((XMLComponent)fNonNSDTDValidator);
View Full Code Here

            fNamespaceScanner.setDTDValidator(null);
            fScanner = fNamespaceScanner;
        }
        else {
            if (fNonNSScanner == null) {
                fNonNSScanner = new XMLDocumentScannerImpl();
                addComponent((XMLComponent)fNonNSScanner);
            }
            fProperties.put(DOCUMENT_SCANNER, fNonNSScanner);
            fScanner = fNonNSScanner;
        }
View Full Code Here

TOP

Related Classes of org.apache.xerces.impl.XMLDocumentScannerImpl$Dispatcher

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.