Examples of State


Examples of org.apache.lenya.workflow.State

                if (log.isDebugEnabled()) {
                    log.debug("    Transition for event [" + event + "] is synchronized.");
                }

                boolean sameState = true;
                State currentState = mainInstance.getCurrentState();
                int j = 0;
                while (j < instances.length && sameState) {
                    sameState = instances[j].getCurrentState().equals(currentState);
                    j++;
                }
View Full Code Here

Examples of org.apache.lucene.util.AttributeSource.State

    while (true) {
      if (stopWords.contains(termAtt.buffer(), 0, termAtt.length())) {
        int posInc = posIncAtt.getPositionIncrement();
        int endOffset = offsetAtt.endOffset();
        // This token may be a stopword, if it's not end:
        State sav = captureState();
        if (input.incrementToken()) {
          // It was a stopword; skip it
          skippedPositions += posInc;
        } else {
          clearAttributes();
View Full Code Here

Examples of org.apache.lucene.util.automaton.State

      BytesRef spare = new BytesRef();
      for (TermFreqPayload2 e : slowCompletor) {
        spare.copyChars(e.analyzedForm);
        Set<IntsRef> finiteStrings = suggester.toFiniteStrings(spare, tokenStreamToAutomaton);
        for (IntsRef intsRef : finiteStrings) {
          State p = automaton.getInitialState();
          BytesRef ref = Util.toBytesRef(intsRef, spare);
          boolean added = false;
          for (int i = ref.offset; i < ref.length; i++) {
            State q = p.step(ref.bytes[i] & 0xff);
            if (q == null) {
              break;
            } else if (q.isAccept()) {
              matches.add(new LookupResult(e.surfaceForm, e.weight));
              added = true;
              break;
            }
            p = q;
View Full Code Here

Examples of org.apache.mina.statemachine.State

    Transition transition2;
    Transition transition3;

    @BeforeClass
    protected void setUp() throws Exception {
        state = new State("test");
        transition1 = (Transition) mock(Transition.class);
        transition2 = transition1; //(Transition) mock(Transition.class);
        transition3 = transition1; //(Transition) mock(Transition.class);
    }
View Full Code Here

Examples of org.apache.ojb.otm.states.State

        if (null != o)
        {
            try
            {
                Identity oid = m_conn.getIdentity(o);
                State state = m_conn.getEditingContext().lookupState(oid);
                /**
                 * if the object is PersistentClean or non transactional, evict it.
                 */
                if (State.PERSISTENT_CLEAN == state)
                {
View Full Code Here

Examples of org.apache.openjpa.persistence.kernel.common.apps.State

        int N = transitions.length;
        State[] states = new State[N];
        // create nodes
        for (int i = 1; i <= N; i++) {
            State s = new State();
            s.setName("s" + i);
            em.persist(s);
            states[i - 1] = s;
        }
        // create edges as per the transition matrix
        for (int i = 0; i < N; i++) {
            for (int j = 0; j < N; j++) {
                if (transitions[i][j] == 1) {
                    newTransition(states[i], states[j]);
                }
            }
        }
        em.getTransaction().commit();

        em.clear();
       
        // Select root (state 1)
        Query query = em.createQuery("select s from State s where s.name=:name");
        FetchPlan fetch = OpenJPAPersistence.cast(query).getFetchPlan();
        fetch.setMaxFetchDepth(15);
        fetch.addField(State.class, "incomingTransitions");
        fetch.addField(State.class, "outgoingTransitions");
        fetch.addField(Transition.class, "toState");
        fetch.addField(Transition.class, "fromState");
        State qs1 = (State) query.setParameter("name", "s1").getSingleResult();

        em.close(); // will not load anything anymore

        byte[][] actualTransitionMatrix = new byte[5][5];
        fillTransitionMatrix(actualTransitionMatrix, new HashSet<State>(), qs1);
View Full Code Here

Examples of org.apache.openmeetings.db.entity.user.State

        && userdata.get(ldapAttrs.get("countryAttr")) != null)
      state = userdata.get(ldapAttrs.get("countryAttr"));
   
    if (state != null) {
      // Lookup for states
      State oneState = statemanagement.getStateByName(state);
      if (oneState != null) {
        state_id = oneState.getState_id();
      }
    }

    // Create Country
    if (state_id < 0) {
View Full Code Here

Examples of org.apache.openmeetings.persistence.beans.user.State

   * @return the id of the new state or null if an error occurred
   */
  public Long addState(String name, String shortName, int code) {
    try {

      State st = new State();
      st.setName(name);
      st.setShortName(shortName);
      st.setCode(code);
      st.setStarttime(new Date());
      st.setDeleted(false);

      st = em.merge(st);
      Long id = st.getState_id();

      log.debug("added id " + id);

      return id;
    } catch (Exception ex2) {
View Full Code Here

Examples of org.apache.qpid.server.model.State

            throws AccessControlException, IllegalArgumentException
    {
        attributes = new HashMap<String, Object>(attributes);

        String         name     = getStringAttribute(Exchange.NAME, attributes, null);
        State          state    = getEnumAttribute(State.class, Exchange.STATE, attributes, State.ACTIVE);
        boolean        durable  = getBooleanAttribute(Exchange.DURABLE, attributes, false);
        LifetimePolicy lifetime = getEnumAttribute(LifetimePolicy.class, Exchange.LIFETIME_POLICY, attributes, LifetimePolicy.PERMANENT);
        String         type     = getStringAttribute(Exchange.TYPE, attributes, null);
        long           ttl      = getLongAttribute(Exchange.TIME_TO_LIVE, attributes, 0l);
View Full Code Here

Examples of org.apache.qpid.server.virtualhost.State

    private final class BeforePassivationListener implements EventListener
    {
        public void event(Event event)
        {
            State finalState = State.ERRORED;

            try
            {
                    /* the approach here is not ideal as there is a race condition where a
                     * queue etc could be created while the virtual host is on the way to
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.