Package org.apache.felix.examples.dictionaryservice

Examples of org.apache.felix.examples.dictionaryservice.DictionaryService


                boolean correct = false;

                // Check each available dictionary for the current word.
                for ( int i = 0; ( !correct ) && ( i < m_svcObjList.size() ); i++ )
                {
                    DictionaryService dictionary = ( DictionaryService ) m_svcObjList.get( i );

                    if ( dictionary.checkWord( word ) )
                    {
                        correct = true;
                    }
                }
View Full Code Here


                boolean correct = false;

                // Check each available dictionary for the current word.
                for ( int i = 0; ( !correct ) && ( i < m_svcObjList.size() ); i++ )
                {
                    DictionaryService dictionary = ( DictionaryService ) m_svcObjList.get( i );

                    if ( dictionary.checkWord( word ) )
                    {
                        correct = true;
                    }
                }
View Full Code Here

                        break;
                    }

                    // First, get a dictionary service and then check
                    // if the word is correct.
                    DictionaryService dictionary = ( DictionaryService ) context.getService( refs[0] );
                    if ( dictionary.checkWord( word ) )
                    {
                        System.out.println( "Correct." );
                    }
                    else
                    {
View Full Code Here

                    boolean correct = false;

                    // Check each available dictionary for the current word.
                    for ( int i = 0; ( !correct ) && ( i < m_refList.size() ); i++ )
                    {
                        DictionaryService dictionary = ( DictionaryService ) m_refToObjMap.get( m_refList.get( i ) );

                        if ( dictionary.checkWord( word ) )
                        {
                            correct = true;
                        }
                    }
View Full Code Here

        ServiceReference[] refs = context.getServiceReferences( DictionaryService.class.getName(), "(Language=*)" );

        if ( refs != null )
        {
            // First, get a dictionary service and then check if the word is correct.
            DictionaryService dictionary = ( DictionaryService ) context.getService( refs[0] );
            assertTrue( "welcome definition presence", dictionary.checkWord( "welcome" ) );
            assertFalse( "blah definition absense", dictionary.checkWord( "blah" ) );
           
            // Unget the dictionary service.
            context.ungetService( refs[0] );
        }
        else
View Full Code Here

TOP

Related Classes of org.apache.felix.examples.dictionaryservice.DictionaryService

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.