Examples of extractEntities()


Examples of com.ikanow.infinit.e.data_model.interfaces.harvest.IEntityExtractor.extractEntities()

        }
      }//TESTED         

      if (bFinalizeBatchOnly) {
        try {
          currentEntityExtractor.extractEntities(null);
        }
        catch (Exception e) {} // do nothing, eg handle entity extractors that don't handle things well
        return;
      }
View Full Code Here

Examples of com.ikanow.infinit.e.data_model.interfaces.harvest.IEntityExtractor.extractEntities()

            if (null != currentTextExtractor)
            { 
              bExtractedText = true;
              currentTextExtractor.extractText(doc);
              if (null != currentEntityExtractor) {
                currentEntityExtractor.extractEntities(doc);
              }

            }//TESTED
            else //db/filesys should already have full text extracted (unless otherwise specified)
            {
View Full Code Here

Examples of com.ikanow.infinit.e.data_model.interfaces.harvest.IEntityExtractor.extractEntities()

                    currentEntityExtractor.extractEntitiesAndText(doc);
                  }
                }//TESTED (AlchemyAPI case)
                else { // Feed for which we've already extracted data
                  if (null != currentEntityExtractor) {
                    currentEntityExtractor.extractEntities(doc);
                  }
                }//TESTED
              }
              else { // DB/File => use full text
                if (null != currentEntityExtractor) {
View Full Code Here

Examples of com.ikanow.infinit.e.data_model.interfaces.harvest.IEntityExtractor.extractEntities()

                  }
                }//TESTED
              }
              else { // DB/File => use full text
                if (null != currentEntityExtractor) {
                  currentEntityExtractor.extractEntities(doc);
                }
              }//TESTED
            }

            //statistics counting
View Full Code Here

Examples of org.drools.planner.core.domain.entity.PlanningEntityDescriptor.extractEntities()

    public void runOriginalAndCacheType(SelectionCacheType cacheType, int timesCalled) {
        TestdataSolution workingSolution = new TestdataSolution();
        final List<Object> entityList = Arrays.<Object>asList(
                new TestdataEntity("e1"), new TestdataEntity("e2"), new TestdataEntity("e3"));
        PlanningEntityDescriptor entityDescriptor = mock(PlanningEntityDescriptor.class);
        when(entityDescriptor.extractEntities(workingSolution)).thenReturn(entityList);
        FromSolutionEntitySelector entitySelector = new FromSolutionEntitySelector(entityDescriptor, cacheType, false);

        DefaultSolverScope solverScope = mock(DefaultSolverScope.class);
        when(solverScope.getWorkingSolution()).thenReturn(workingSolution);
        entitySelector.solvingStarted(solverScope);
View Full Code Here

Examples of org.drools.planner.core.domain.entity.PlanningEntityDescriptor.extractEntities()

    public void runRandomAndCacheType(SelectionCacheType cacheType, int timesCalled) {
        TestdataSolution workingSolution = new TestdataSolution();
        final List<Object> entityList = Arrays.<Object>asList(
                new TestdataEntity("e1"), new TestdataEntity("e2"), new TestdataEntity("e3"));
        PlanningEntityDescriptor entityDescriptor = mock(PlanningEntityDescriptor.class);
        when(entityDescriptor.extractEntities(workingSolution)).thenReturn(entityList);
        FromSolutionEntitySelector entitySelector = new FromSolutionEntitySelector(entityDescriptor, cacheType, true);

        Random workingRandom = mock(Random.class);
        when(workingRandom.nextInt(3)).thenReturn(1, 0, 0, 2, 1, 2, 2, 1, 0);
View Full Code Here

Examples of org.drools.planner.core.domain.entity.PlanningEntityDescriptor.extractEntities()

    }

    private Object findTrailingEntity(Object planningEntity) {
        Object trailingEntity = null;
        PlanningEntityDescriptor entityDescriptor = planningVariableDescriptor.getPlanningEntityDescriptor();
        for (Object suspectedTrailingEntity : entityDescriptor.extractEntities(scoreDirector.getWorkingSolution())) {
            if (planningVariableDescriptor.getValue(suspectedTrailingEntity) == planningEntity) {
                if (trailingEntity != null) {
                    throw new IllegalStateException("The planningEntity (" + planningEntity
                            + ") has multiple trailing entities (" + trailingEntity + ") ("
                            + suspectedTrailingEntity + ") pointing to it for chained planningVariable ("
View Full Code Here

Examples of org.optaplanner.core.impl.domain.entity.descriptor.EntityDescriptor.extractEntities()

    public void runOriginalWithoutEntityListDirtyAndMinimumCacheType(SelectionCacheType cacheType) {
       TestdataSolution workingSolution = new TestdataSolution();
        final List<Object> entityList = Arrays.<Object>asList(
                new TestdataEntity("e1"), new TestdataEntity("e2"), new TestdataEntity("e3"));
        EntityDescriptor entityDescriptor = mock(EntityDescriptor.class);
        when(entityDescriptor.extractEntities(workingSolution)).thenReturn(entityList);
        InnerScoreDirector scoreDirector = mock(InnerScoreDirector.class);
        when(scoreDirector.getWorkingSolution()).thenReturn(workingSolution);
        when(scoreDirector.getWorkingEntityListRevision()).thenReturn(7L);
        when(scoreDirector.isWorkingEntityListDirty(7L)).thenReturn(false);
        FromSolutionEntitySelector entitySelector = new FromSolutionEntitySelector(entityDescriptor, cacheType, false);
View Full Code Here

Examples of org.optaplanner.core.impl.domain.entity.descriptor.EntityDescriptor.extractEntities()

    @Test
    public void originalWithEntityListDirty() {
        TestdataSolution workingSolution = new TestdataSolution();
        EntityDescriptor entityDescriptor = mock(EntityDescriptor.class);
        when(entityDescriptor.extractEntities(workingSolution)).thenReturn(Arrays.<Object>asList(
                new TestdataEntity("e1"), new TestdataEntity("e2"), new TestdataEntity("e3")));
        InnerScoreDirector scoreDirector = mock(InnerScoreDirector.class);
        when(scoreDirector.getWorkingSolution()).thenReturn(workingSolution);
        when(scoreDirector.getWorkingEntityListRevision()).thenReturn(7L);
        when(scoreDirector.isWorkingEntityListDirty(7L)).thenReturn(false);
View Full Code Here

Examples of org.optaplanner.core.impl.domain.entity.descriptor.EntityDescriptor.extractEntities()

        when(stepScopeA1.getScoreDirector()).thenReturn(scoreDirector);
        entitySelector.stepStarted(stepScopeA1);
        assertAllCodesOfEntitySelector(entitySelector, "e1", "e2", "e3");
        entitySelector.stepEnded(stepScopeA1);

        when(entityDescriptor.extractEntities(workingSolution)).thenReturn(Arrays.<Object>asList(
                new TestdataEntity("f1"), new TestdataEntity("f2"), new TestdataEntity("f3")));
        when(scoreDirector.getWorkingEntityListRevision()).thenReturn(8L);
        when(scoreDirector.isWorkingEntityListDirty(7L)).thenReturn(true);
        when(scoreDirector.isWorkingEntityListDirty(8L)).thenReturn(false);
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.