Examples of Literal


Examples of jason.asSyntax.Literal

        List<Proposition> concretePreconds = new ArrayList<Proposition>(templatePreconds.size());
        //And apply the unifier to them
        for (Iterator iter = templatePreconds.iterator(); iter
            .hasNext();) {
          PropositionImpl precond = (PropositionImpl) iter.next();
          Literal literal = new LiteralImpl(precond);
          literal.apply(un);
          PropositionImpl concretePrecond = (PropositionImpl)propositionFactory.getProposition(literal.toString());
          // XXX Uncomment the code to debug operator instantiation, it is removed to avoid wasting time here
//          if(!concretePrecond.isGround()) {
//            //throw new OperatorFactoryException("We have a non-concrete precond in operator "+signature+": "+concretePrecond);
//            System.err.println("We have a non-concrete precond in operator "+signature+": "+concretePrecond);
//          }
          concretePreconds.add(concretePrecond);
        }
       
        List<Proposition> templateEffects = template.getEffects();
        List<Proposition> concreteEffects = new ArrayList<Proposition>(templateEffects.size());
       
        for (Iterator iter = templateEffects.iterator(); iter
            .hasNext();) {
          PropositionImpl effect = (PropositionImpl) iter.next();
          Literal literal = new LiteralImpl(effect);
          literal.apply(un);
          PropositionImpl concreteEffect = (PropositionImpl)propositionFactory.getProposition(literal.toString());
          // XXX Uncomment the code to debug operator instantiation, it is removed to avoid wasting time here
//          if(!concreteEffect.isGround()) {
//            //throw new OperatorFactoryException("We have a non-concrete effect in operator "+signature+": "+concreteEffect);
//            System.err.println("We have a non-concrete effect in operator "+signature+": "+concreteEffect);
//          }
View Full Code Here

Examples of javaff.data.Literal

  {
    String str = "(and";
    Iterator it = literals.iterator();
    while (it.hasNext())
    {
      Literal l = (Literal) it.next();
      str += " "+l.toStringTyped();
    }
    str += ")";
    return str;

  }
View Full Code Here

Examples of javax.jcr.query.qom.Literal

        assertEquals("Wrong propertyName", propertyName1, ftSearch.getPropertyName());

        StaticOperand op = ftSearch.getFullTextSearchExpression();
        assertNotNull(op);
        assertTrue("not a Literal", op instanceof Literal);
        Literal literal = (Literal) op;
        assertEquals(FULLTEXT_SEARCH_EXPR, literal.getLiteralValue().getString());
    }
View Full Code Here

Examples of lupos.datastructures.items.literal.Literal

      for (final Bindings b : entry.getValue()) {
        final Vector<String> columns = new Vector<String>();
        columns.add(number + ".");
        columns.add(entry.getKey());
        for (final Variable v : allVariables) {
          final Literal value = b.get(v);
          if (value == null) {
            columns.add("");
          } else {
            columns.add(value.toString(this
                .getOperatorGraphViewer().getOperatorGraph()
                .getPrefix()));
          }
        }
        data.add(columns);
View Full Code Here

Examples of mondrian.olap.Literal

      // resolved.

      final Exp exp = def.getDefaultExp();
      if (processedParamValue == null && exp != null && exp instanceof Literal)
      {
        Literal exp1 = (Literal) exp;
        def.setValue(exp1.getValue());
      }
      else
      {
        def.setValue(processedParamValue);
      }
View Full Code Here

Examples of net.sf.saxon.expr.Literal

                                              serializationAttributes,
                                              (needsNamespaceContext ? namespaceResolver : null));

        Expression b = compileSequenceConstructor(exec, iterateAxis(Axis.CHILD), true);
        if (b == null) {
            b = new Literal(EmptySequence.getInstance());
        }
        inst.setContentExpression(b);
        return inst;
    }
View Full Code Here

Examples of org.apache.clerezza.rdf.core.Literal

    @Test
    public void testUseTypedLiterals() {
        MGraph graph = getEmptyMGraph();
        Assert.assertEquals(0, graph.size());
        Literal value = new TypedLiteralImpl("<elem>value</elem>",xmlLiteralType);
        final TripleImpl triple1 = new TripleImpl(uriRef1, uriRef2, value);
        graph.add(triple1);
        Iterator<Triple> tripleIter = graph.filter(uriRef1, uriRef2, null);
        Assert.assertTrue(tripleIter.hasNext());
        Resource gotValue = tripleIter.next().getObject();
View Full Code Here

Examples of org.apache.cocoon.template.expression.Literal

                    ch = in.read();
                    if (ch == '{') {
                        lang = (c == '#') ? JXPATH : ((c == '$') ? JEXL : JAVASCRIPT);
                        inExpr = true;
                        if (buf.length() > 0) {
                            substitutions.add(new Literal(buf.toString()));
                            buf.setLength(0);
                        }
                        continue top;
                    }
                    buf.append(c);
                    if (ch != -1) {
                        c = (char) ch;
                        continue processChar;
                    }
                } else {
                    buf.append(c);
                }
                break;
            }
        }

        if (inExpr) {
            throw new Exception("Unterminated {");
        }

        if (buf.length() > 0) {
            substitutions.add(new Literal(buf.toString()));
        }

        return substitutions;
    }
View Full Code Here

Examples of org.apache.jackrabbit.core.query.jsr283.qom.Literal

                // TODO decimal
                throw getSyntaxError("number");
            }
        }
        if (currentTokenType == VALUE) {
            Literal literal = factory.literal(currentValue);
            read();
            return literal;
        } else if (currentTokenType == PARAMETER) {
            read();
            String name = readName();
            BindVariableValue var = (BindVariableValue) bindVariables.get(name);
            if (var == null) {
                var = factory.bindVariable(name);
                bindVariables.put(name, var);
            }
            return var;
        } else if (readIf("TRUE")) {
            Literal literal = factory.literal(valueFactory.createValue(true));
            return literal;
        } else if (readIf("FALSE")) {
            Literal literal = factory.literal(valueFactory.createValue(false));
            return literal;
        } else {
            throw getSyntaxError("static operand");
        }
    }
View Full Code Here

Examples of org.apache.jackrabbit.spi.commons.query.jsr283.qom.Literal

                // TODO decimal
                throw getSyntaxError("number");
            }
        }
        if (currentTokenType == VALUE) {
            Literal literal = factory.literal(currentValue);
            read();
            return literal;
        } else if (currentTokenType == PARAMETER) {
            read();
            String name = readName();
            BindVariableValue var = (BindVariableValue) bindVariables.get(name);
            if (var == null) {
                var = factory.bindVariable(name);
                bindVariables.put(name, var);
            }
            return var;
        } else if (readIf("TRUE")) {
            Literal literal = factory.literal(valueFactory.createValue(true));
            return literal;
        } else if (readIf("FALSE")) {
            Literal literal = factory.literal(valueFactory.createValue(false));
            return literal;
        } else {
            throw getSyntaxError("static operand");
        }
    }
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.