Examples of Term


Examples of org.mizartools.dli.Term

      org.mizartools.system.utility.AbstractSignature abstractSignature,
      LinkedList<org.mizartools.system.xml.Term> termList) throws DliException {
      LinkedList<Term> termDliList = new LinkedList<Term>();
      for (org.mizartools.system.xml.Term term : termList){
        // FreeVar, LambdaVar, Const, InfConst, Num, PrivFunc, Fraenkel, Choice, QuaTrm, It
        Term termDli;
          if (term instanceof org.mizartools.system.xml.Func) {
        org.mizartools.system.xml.Func func = (org.mizartools.system.xml.Func) term;
          LinkedList<Term> term2List = getTermList(abstractSignature, ((org.mizartools.system.xml.Func)term).getTermList());
        if (func.getKind() == org.mizartools.system.xml.Func.Kind.F){
          if (func.getNr() == null) throw new DliException();
View Full Code Here

Examples of org.modeshape.jcr.query.model.FullTextSearch.Term

        parser.parse("   ");
    }

    @Test
    public void shouldParseStringWithOneUnquotedTerm() {
        Term result = parser.parse("term1");
        assertSimpleTerm(result, "term1", false, false);
    }
View Full Code Here

Examples of org.openbel.framework.common.model.Term

            //   - get uuid for each parameter; ordered by sequence (l to r)
            //   - (x) if no match, attempt non-equivalence query
            //   - find kam node by term signature / uuids

            // parse the bel term
            Term term = null;
            try {
                term = BELParser.parseTerm(belTerm);
                if (term == null) return null;
            } catch (Exception e) {
                // unrecognized BEL structure
                return null;
            }

            // get all parameters; remap to kam namespace by prefix
            List<Parameter> params = term.getAllParametersLeftToRight();
            remapNamespace(params, nsmap);

            // convert bel term to signature
            String termSignature = term.toTermSignature();

            // find uuids for all parameters; bucket both the mapped and
            // unmapped namespace values
            SkinnyUUID[] uuids = new SkinnyUUID[params.size()];
            Parameter[] parray = params.toArray(new Parameter[params.size()]);
            boolean missing = false;
            for (int i = 0; i < parray.length; i++) {
                Parameter param = parray[i];
                Namespace ns = param.getNamespace();
                if (ns == null) {
                    missing = true;
                    break;
                }

                String value = clean(param.getValue());

                SkinnyUUID uuid = null;
                try {
                    uuid = equivalencer.getUUID(ns, value);
                } catch (EquivalencerException e) {
                    throw new ResolverException(e);
                }

                if (uuid != null && !kAMStore.getKamNodes(kam, uuid).isEmpty()) {
                    uuids[i] = uuid;
                } else {
                    missing = true;
                    break;
                }
            }

            // TODO Handle terms that may not have UUID parameters!
            if (missing) {
                KamNode kamNode = kAMStore.getKamNode(kam, belTerm);
                return kamNode;
            }

            // find kam node by term signature / uuids
            return kAMStore.getKamNodeForTerm(kam, termSignature,
                    term.getFunctionEnum(), uuids);
        } catch (KAMStoreException e) {
            throw new ResolverException(e);
        }
    }
View Full Code Here

Examples of org.pentaho.reporting.libraries.formula.lvalues.Term

                                        final ContextLookup context = (ContextLookup) reportFunction.getChildValues()[0];
                                        name = context.getName();
                                    }
                                    else if (val instanceof Term)
                                    {
                                        final Term term = (Term) val;
                                        final ContextLookup context = (ContextLookup) term.getHeadValue().getChildValues()[0];
                                        name = context.getName();
                                    }
                                    break;
                                }
                            }
View Full Code Here

Examples of org.renjin.stats.internals.models.Term

 
  private List<Term> terms(Object...terms) {
    List<Term> list = Lists.newArrayList();
    for(Object term : terms) {
      if(term instanceof String) {
        list.add(new Term(parse((String)term)));
      } else if(term instanceof Term) {
        list.add((Term)term);
      } else {
        throw new IllegalArgumentException(term.toString());
      }
View Full Code Here

Examples of org.semanticweb.HermiT.model.Term

                    return -2000;
            }
            else if (atom.getDLPredicate() instanceof NodeIDsAscendingOrEqual) {
                int numberOfUnboundVariables=0;
                for (int argumentIndex=atom.getArity()-1;argumentIndex>=0;--argumentIndex) {
                    Term argument=atom.getArgument(argumentIndex);
                    if (argument instanceof Variable) {
                        if (!m_boundVariables.contains(argument))
                            numberOfUnboundVariables++;
                    }
                }
                if (numberOfUnboundVariables>0)
                    return -5000;
                else
                    return 5000;
            }
            else {
                int numberOfBoundVariables=0;
                int numberOfUnboundVariables=0;
                for (int argumentIndex=atom.getArity()-1;argumentIndex>=0;--argumentIndex) {
                    Term argument=atom.getArgument(argumentIndex);
                    if (argument instanceof Variable) {
                        if (m_boundVariables.contains(argument))
                            numberOfBoundVariables++;
                        else
                            numberOfUnboundVariables++;
View Full Code Here

Examples of org.springframework.data.mongodb.core.query.Term

   * @DATAMONGO-973
   */
  @Test
  public void shouldUseFormattedRepresentationForConversion() {

    Term term = spy(new Term("foo", Type.WORD));
    TermToStringConverter.INSTANCE.convert(term);
    verify(term, times(1)).getFormatted();
  }
View Full Code Here

Examples of ra.Term

            throw new RuntimeException("Cannot create file: " + args[1], ex);
        }

        AlgebraToSpreadsheet ats = new AlgebraToSpreadsheet();
        Utils.reset();
        Term t = ats.readAlgebra(args[0]);
        Result r = t.execute();
        ats.writeExcel(fos, r);
    }
View Full Code Here

Examples of stanfordlogic.prover.Term

        GroundFact move;

        move = moves.get(random_.nextInt(moves.size()));

        // term 0 is the player, term 1 is the actual move
        Term action = move.getTerm(1);

        return new Triple<Term, String, String>(action, "I'm a silly random player",
                                                "I hope you can beat me");
    }
View Full Code Here

Examples of uk.ac.ucl.panda.utility.structure.Term

     */
    public BitSet bits(IndexReader reader) throws IOException {
        BitSet bits = new BitSet(reader.maxDoc());
        TermEnum enumerator =
            (null != lowerTerm
             ? reader.terms(new Term(fieldName, lowerTerm))
             : reader.terms(new Term(fieldName,"")));
       
        try {
           
            if (enumerator.term() == null) {
                return bits;
            }
           
            boolean checkLower = false;
            if (!includeLower) // make adjustments to set to exclusive
                checkLower = true;
       
            TermDocs termDocs = reader.termDocs();
            try {
               
                do {
                    Term term = enumerator.term();
                    if (term != null && term.field().equals(fieldName)) {
                        if (!checkLower || null==lowerTerm || term.text().compareTo(lowerTerm) > 0) {
                            checkLower = false;
                            if (upperTerm != null) {
                                int compare = upperTerm.compareTo(term.text());
                                /* if beyond the upper term, or is exclusive and
                                 * this is equal to the upper term, break out */
                                if ((compare < 0) ||
                                    (!includeUpper && compare==0)) {
                                    break;
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.