Examples of Literal


Examples of org.exquery.xquery.Literal

            annotations.addAll(resourceFn.getProducesAnnotations());
           
            for(final Annotation annotation : annotations) {
                builder.startElement(QName.fromJavaQName(annotation.getName()), null);
               
                final Literal literals[] =  annotation.getLiterals();
                if(literals != null) {
                    for(final Literal literal : literals) {
                        if(annotation instanceof ConsumesAnnotation || annotation instanceof ProducesAnnotation) {
                            builder.startElement(INTERNET_MEDIA_TYPE, null);
                            builder.characters(literal.getValue());
View Full Code Here

Examples of org.hamcrest.text.pattern.internal.ast.Literal

    public Field(String name, PatternComponent pattern) {
  this.name = name;
  // TODO: clean this up and make the delimiter changeable
  Object[] args = new Object[] { "\"", new CaptureGroup(name, pattern),
    new Literal("\"") };
  this.sequence = Patterns.sequence(args);
    }
View Full Code Here

Examples of org.jboss.dna.graph.query.model.Literal

        if (staticOperand instanceof BindVariableName) {
            BindVariableName bindVariable = (BindVariableName)staticOperand;
            String variableName = bindVariable.getVariableName();
            literalValue = variables.get(variableName); // may be null
        } else {
            Literal literal = (Literal)staticOperand;
            literalValue = literal.getValue();
        }
        // Create the correct comparator ...
        final TypeFactory<?> typeFactory = types.getTypeFactory(expectedType);
        assert typeFactory != null;
        final Comparator<Object> comparator = (Comparator<Object>)typeFactory.getComparator();
View Full Code Here

Examples of org.jboss.dna.jcr.xpath.XPath.Literal

                value = value + tokens.consume() + tokens.consume(); // +/-EXP
            }
            try {
                // Convert to a double and then back to a string to get canonical form ...
                String canonical = typeSystem.getDoubleFactory().asString(value);
                return new Literal(canonical);
            } catch (ValueFormatException e) {
                String msg = GraphI18n.expectingLiteralAndUnableToParseAsDouble.text(value, pos.getLine(), pos.getColumn());
                throw new ParsingException(pos, msg);
            }
        }
        // try to parse an a long ...
        String value = sign + number;
        try {
            // Convert to a long and then back to a string to get canonical form ...
            String canonical = typeSystem.getLongFactory().asString(value);
            return new Literal(canonical);
        } catch (ValueFormatException e) {
            String msg = GraphI18n.expectingLiteralAndUnableToParseAsLong.text(value, pos.getLine(), pos.getColumn());
            throw new ParsingException(pos, msg);
        }
    }
View Full Code Here

Examples of org.jboss.weld.tests.experimental.qualifiers.repeatable.RepeatableQualifier.Literal

        Assert.assertEquals("yeah", combined);
    }

    @Test
    public void testBeanMetadata(BeanManagerImpl manager) {
        Bean<?> bean = manager.resolve(manager.getBeans(String.class, new Literal("foo")));
        Set<String> values = bean.getQualifiers().stream()
                .filter((x) -> x instanceof RepeatableQualifier)
                .map((x) -> ((RepeatableQualifier) x).value())
                .collect(Collectors.toSet());
        Assert.assertEquals(3, values.size());
View Full Code Here

Examples of org.jrdf.graph.Literal

        return node;
    }

    public Literal createLocalLiteral(String escapedForm) {
        currentId = nodePool.getNewNodeId();
        Literal node = mapper.convertToLiteral(escapedForm, currentId);
        nodePool.registerLiteral(node);
        return node;
    }
View Full Code Here

Examples of org.jresearch.flexess.models.expression.Literal

    result.setSource(source);
    return result;
  }
 
  public static Expression createLiteral(EAttribute value) {
    Literal result = ExpressionFactory.eINSTANCE.createLiteral();
    result.setValue(value);
    return result;
  }
View Full Code Here

Examples of org.jvnet.sorcerer.Tag.Literal

            /**
             * literal string, int, etc. Null.
             */
            public Void visitLiteral(LiteralTree lit, Void _) {
                gen.add(new Literal(cu,srcPos,lit));
                return super.visitLiteral(lit, _);
            }

            /**
             * Definition of a variable, such as parameter, field, and local variables.
View Full Code Here

Examples of org.mindswap.pellet.Literal

            return;

        // If not, we have to create it
        // If the role is a datatype property...
        if( role.isDatatypeRole() ) {
            Literal literal = (Literal) y;
      if( ATermUtils.isNominal( c ) && !PelletOptions.USE_PSEUDO_NOMINALS ) {
        strategy.getABox().copyOnWrite();

        final ATermAppl input = (ATermAppl) c.getArgument( 0 );
        ATermAppl canonical;
View Full Code Here

Examples of org.modeshape.jcr.query.model.Literal

        @Override
        public T toLowerValue( StaticOperand operand,
                               Map<String, Object> variables ) {
            if (operand instanceof Literal) {
                Literal literal = (Literal)operand;
                return factory.create(literal.value());
            }
            if (operand instanceof BindVariableValue) {
                BindVariableValue bind = (BindVariableValue)operand;
                return factory.create(variables.get(bind.getBindVariableName()));
            }
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.