Examples of asString()


Examples of org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation.asString()

        final JsonValueConverter jvc = converterBySpec.get(objectSpec.getSpecId());
        if(jvc == null) {
            // best effort
            if (argValueRepr.isString()) {
                final String argStr = argValueRepr.asString();
                return encodableFacet.fromEncodedString(argStr);
            }

            final String reason = "Unable to parse value";
            argRepr.mapPut("invalidReason", reason);
View Full Code Here

Examples of org.apache.isis.viewer.restfulobjects.applib.domainobjects.ScalarValueRepresentation.asString()

        assertThat(property.getMemberType(), is("property"));
        assertThat(property.getFormat(), is("date"));
        assertThat(property.getXIsisFormat(), is("javasqldate"));
        scalarRepr = property.getRepresentation("value").as(ScalarValueRepresentation.class);
        assertThat(scalarRepr.isString(), is(true));
        assertThat(scalarRepr.asString(), is("2014-04-24"));
        assertThat(scalarRepr.asDate(), is(asDate("2014-04-24")));

        property = domainObjectRepr.getProperty("javaSqlTimeProperty");
        assertThat(property.getMemberType(), is("property"));
        assertThat(property.getFormat(), is("time"));
View Full Code Here

Examples of org.apache.jackrabbit.mk.simple.NodeImpl.asString()

        NodeMap map = new NodeMap();
        map.setDescendantCount(true);
        map.setDescendantInlineCount(3);

        NodeImpl n = new NodeImpl(map, 0);
        Assert.assertEquals("{}", n.asString());
        NodeImpl a = new NodeImpl(map, 0);
        a.setProperty("name", "\"a\"");
        map.addNode(a);
        NodeImpl b = new NodeImpl(map, 0);
        b.setProperty("name", "\"b\"");
View Full Code Here

Examples of org.apache.jackrabbit.oak.plugins.index.old.mk.simple.NodeImpl.asString()

        map.setMaxMemoryChildren(2);
        map.setDescendantInlineCount(-1);

        NodeImpl n = new NodeImpl(map, 0);
        Assert.assertEquals("{}", n.asString());
        n.setId(NodeId.get(255));
        Assert.assertEquals("nff={};", n.asString());
        n.setPath("/test");
        Assert.assertEquals("nff={};/* /test */", n.toString());
        n = n.createClone(10);
View Full Code Here

Examples of org.apache.jdo.impl.enhancer.classfile.ConstClass.asString()

    {
        // get the instruction arguments
        final InsnConstOp fieldInsn = (InsnConstOp)insn;
        final ConstFieldRef fieldRef = (ConstFieldRef)fieldInsn.value();
        final ConstClass declClass = fieldRef.className();
        final String declClassName = declClass.asString();
        final ConstNameAndType fieldNameAndType = fieldRef.nameAndType();
        final String fieldName = fieldNameAndType.name().asString();
        final String fieldType = fieldNameAndType.signature().asString();

        // check if field is known to be non-managed or not annotatable
View Full Code Here

Examples of org.apache.jena.atlas.io.IndentedLineBuffer.asString()

    }

    public static String outputQuotedString(String string) {
        IndentedLineBuffer b = new IndentedLineBuffer() ;
        outputQuotedString(b, string) ;
        return b.asString() ;
    }

    /*
     * Output a JSON string with escaping.
     * \" \\ \/ \b \f \n \r \t control
View Full Code Here

Examples of org.apache.logging.log4j.message.StructuredDataMessage.asString()

        final StructuredDataMessage msg = new StructuredDataMessage("Transfer@18060", "Transfer Complete", "Audit");
        msg.put("ToAccount", "123456");
        msg.put("FromAccount", "123457");
        msg.put("Amount", "200.00");
        // the msg.toString() doesn't contain the parameters of the ThreadContext, so we must use the line1 string
        String str = msg.asString(null, null);
        sentMessages.add(str);
        root.info(MarkerManager.getMarker("EVENT"), msg);
    }

    protected void checkTheNumberOfSentAndReceivedMessages() throws InterruptedException {
View Full Code Here

Examples of org.apache.qpid.framing.AMQShortString.asString()

    public void assertReceivedReturnedMessageWithLongExceptionMessage(Message message, AMQQueue queue)
    {
        JMSException exception = getReceivedException();
        assertNoRouteException(exception, message);
        AMQShortString exchangeName = queue.getExchangeName();
        String expectedMessage = "Error: No Route for message [Exchange: " + exchangeName.asString().substring(0, 220) + "...";
        assertTrue("Unexpected exception message: " + exception.getMessage(), exception.getMessage().contains(expectedMessage));
    }

    public void assertNoRouteExceptionWithReturnedMessage(
            JMSException exception, Message message, String intendedQueueName)
View Full Code Here

Examples of org.apache.shale.util.ConverterHelper.asString()

    // test how Clay would use it to convert a string property into a target String[]
    public void testDefaults() {
        ConverterHelper helper = new ConverterHelper();
        String[] partialTriggers = {"one", "two", "three"};
        String asString = helper.asString(facesContext, String[].class, partialTriggers);
       
        assertNotNull(asString);
        assertEquals("one two three", asString);
       
        String[] asObject = (String[]) helper.asObject(facesContext, String[].class, asString);
View Full Code Here

Examples of org.apache.slider.core.registry.docstore.PublishedConfigurationOutputter.asString()

        destFile = new File(destFile, entry + "." + format);
      }
      log.info("Destination path: {}", destFile);
      outputter.save(destFile);
    } else {
      print(outputter.asString());
    }
   
  }

  /**
 
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.