Examples of find()


Examples of opennlp.tools.namefind.NameFinderME.find()

    NameFinderME nameFinder = new NameFinderME(model);
   
    String[] tokens =
        (" Britney Spears was reunited with her sons Saturday .")
        .split("\\s+");
    Span[] names = nameFinder.find(tokens);
    displayNames(names, tokens);
    //<end id="ne-namesample-type"/>
   
    assertEquals("person", names[0].getType());
    assertEquals("date", names[1].getType());
View Full Code Here

Examples of org.antlr.runtime.tree.TreeWizard.find()

  }

  @Test public void testFindPattern() throws Exception {
    TreeWizard wiz = new TreeWizard(adaptor, tokens);
    CommonTree t = (CommonTree)wiz.create("(A B C (A[foo] B[bar]) (D (A[big] B[dog])))");
    final List<? extends Object> subtrees = wiz.find(t, "(A B)");
    List<? extends Object> elements = subtrees;
    String found = elements.toString();
    String expecting = "[foo, big]";
    assertEquals(expecting, found);
  }
View Full Code Here

Examples of org.apache.axis.registries.HandlerRegistry.find()

  public void init()
  {
    ServiceClient.initialize();
    AxisServer server = new AxisServer();
    HandlerRegistry hr = (HandlerRegistry) server.getHandlerRegistry();
    Handler disp = hr.find("RPCDispatcher");   
    SOAPService service = new SOAPService(disp);
    service.addOption("className", "test.encoding.TestArrayListConversions");
    service.addOption("methodName", "*");
   
    server.deployService(SERVICE_NAME, service);
View Full Code Here

Examples of org.apache.cactus.eclipse.runner.ui.CactusPlugin.find()

     */
    public ILaunchConfigurationWorkingCopy createAntLaunchConfiguration(
        String[] theProviderArguments, String theTarget) throws CoreException
    {
        CactusPlugin thePlugin = CactusPlugin.getDefault();
        URL buildFileURL = thePlugin.find(new Path(buildFilePath));
        if (buildFileURL == null)
        {
            throw CactusPlugin.createCoreException(
                "CactusLaunch.message.prepare.error.plugin.file",
                " : " + buildFilePath,
View Full Code Here

Examples of org.apache.commons.discovery.resource.DiscoverResources.find()

    {
        FirstResourceListener listener = new FirstResourceListener();
       
        DiscoverResources explorer = new DiscoverResources(loaders);
        explorer.setListener(listener);
        explorer.find(resourceName);
       
        if (spi != null  &&
            (listener.getFirst() == null&&
            resourceName.charAt(0) != '/')
        {
View Full Code Here

Examples of org.apache.commons.discovery.resource.classes.DiscoverClasses.find()

                               (properties == null)
                               ? null
                               : properties.getProperties(spi, loaders));
       
        if (classNames.length > 0) {
            classDiscovery.find(classNames[0]);

            // If it's set as a property.. it had better be there!
            ResourceClass resource = listener.getFirst();
            return (resource == null) ? null : resource.loadClass();
        } else {
View Full Code Here

Examples of org.apache.commons.discovery.resource.names.DiscoverServiceNames.find()

            /**
             * Feed service (name) discovery to classDiscovery
             */
            discoverServices.setListener(classDiscovery);

            discoverServices.find(spi.getSPName());
            ResourceClass resource = listener.getFirst();

            Class clazz = (resource == null) ? null : resource.loadClass();

            if (clazz != null) {
View Full Code Here

Examples of org.apache.commons.discovery.tools.DiscoverClass.find()

        org.apache.commons.discovery.log.SimpleLog.setLevel(logLevel);

        ClassLoaders loaders = ClassLoaders.getAppLoaders(TestInterface2.class, getClass(), false);
       
        DiscoverClass discover = new DiscoverClass(loaders);
        Class implClass = discover.find(TestInterface2.class);
       
        assertTrue("Failed to find an implementation class", implClass != null);
        assertEquals("org.apache.commons.discovery.test.TestImpl2_1", implClass.getName());
       
    }
View Full Code Here

Examples of org.apache.derby.iapi.services.cache.CacheManager.find()

    // statement caching disable when in DDL mode
    if (dataDictionaryInWriteMode()) {
      return null;
    }

    Cacheable cachedItem = statementCache.find(statement);

    CachedStatement cs = (CachedStatement) cachedItem;


    GenericPreparedStatement ps = cs.getPreparedStatement();
View Full Code Here

Examples of org.apache.derby.iapi.store.access.xa.XAResourceManager.find()

        XAXactId xid_im = new XAXactId(xid);
        XATransactionState tranState = getTransactionState(xid_im);
       
        if (tranState == null) {
            XAResourceManager rm = ra.getXAResourceManager();
            ContextManager inDoubtCM = rm.find(xid);
            // RM also does not know about this xid.
            if (inDoubtCM == null)
                throw new XAException(XAException.XAER_NOTA);
            ContextService csf = ContextService.getFactory();
            csf.setCurrentContextManager(inDoubtCM);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.