Package org.openquark.cal.compiler

Examples of org.openquark.cal.compiler.CompilerMessage$Identifier$Category


    public void test_0() throws Exception {
        ByteArrayOutputStream out = new ByteArrayOutputStream();
        ObjectOutputStream objectOut = new ObjectOutputStream(out);

        Category p = new Category();
        p.setId(1);
        p.setName("root");
        {
            Category child = new Category();
            child.setId(2);
            child.setName("child");
            p.getChildren().add(child);
            child.setParent(p);
        }
        objectOut.writeObject(p);
    }
View Full Code Here


    private Object object;

    public CategoryEncode(){
        super("CategoryEncode");

        Category category = new Category();
        category.setId(1);
        category.setName("root");
        {
            Category child = new Category();
            child.setId(2);
            child.setName("child");
            category.getChildren().add(child);
            child.setParent(category);
        }

        object = category;
    }
View Full Code Here

        maps.setReplyTo(RMUtils.createReference(DECOUPLED_URL));
       
        message.put(JAXWSAConstants.ADDRESSING_PROPERTIES_INBOUND, maps);

        TerminateSequenceType ts = new TerminateSequenceType();
        Identifier sid = new Identifier();
        sid.setValue(sidstr);
        ts.setIdentifier(sid);
        Object tst = ProtocolVariation.RM10WSA200408.getWSRMNamespace().equals(protocol.getWSRMNamespace())
            ? ts : ProtocolVariation.RM10WSA200408.getCodec().convertReceivedTerminateSequence(ts);
        MessageContentsList contents = new MessageContentsList();
        contents.add(tst);
View Full Code Here

        maps.setReplyTo(RMUtils.createReference(DECOUPLED_URL));
       
        message.put(JAXWSAConstants.ADDRESSING_PROPERTIES_INBOUND, maps);

        TerminateSequenceType ts = new TerminateSequenceType();
        Identifier sid = new Identifier();
        sid.setValue(sidstr);
        ts.setIdentifier(sid);
        Object tst = ProtocolVariation.RM10WSA200408.getWSRMNamespace().equals(protocol.getWSRMNamespace())
            ? ts : ProtocolVariation.RM10WSA200408.getCodec().convertReceivedTerminateSequence(ts);
        MessageContentsList contents = new MessageContentsList();
        contents.add(tst);
View Full Code Here

    public void testGetExistingSequence() throws NoSuchMethodException, SequenceFault, RMException {
        Method m = RMManager.class
           .getDeclaredMethod("getSource", new Class[] {Message.class});
        manager = control.createMock(RMManager.class, new Method[] {m});
        Message message = control.createMock(Message.class);
        Identifier inSid = control.createMock(Identifier.class);
       
        Source source = control.createMock(Source.class);
        EasyMock.expect(manager.getSource(message)).andReturn(source);
        SourceSequence sseq = control.createMock(SourceSequence.class);
        EasyMock.expect(source.getCurrent(inSid)).andReturn(sseq);
View Full Code Here

        EasyMock.expect(exchange.getOutMessage()).andReturn(message).anyTimes();
        EasyMock.expect(exchange.getInMessage()).andReturn(null).anyTimes();
        EasyMock.expect(exchange.getOutFaultMessage()).andReturn(null).anyTimes();
        Conduit conduit = control.createMock(Conduit.class);
        EasyMock.expect(exchange.getConduit(message)).andReturn(conduit).anyTimes();
        Identifier inSid = control.createMock(Identifier.class);       
        AddressingProperties maps = control.createMock(AddressingProperties.class);
        Source source = control.createMock(Source.class);
        EasyMock.expect(manager.getSource(message)).andReturn(source);
        EasyMock.expect(source.getCurrent(inSid)).andReturn(null);
        AttributedURIType uri = control.createMock(AttributedURIType.class);
View Full Code Here

        }
        Collection<RMMessage> ms = new ArrayList<RMMessage>();
        if (null != m) {
            ms.add(m);
        }
        Identifier id = new Identifier();
        id.setValue("S1");
        EasyMock.expect(ss.getIdentifier()).andReturn(id).times(null == m ? 1 : 2);
        EasyMock.expect(store.getMessages(id, true)).andReturn(ms);
       
       
        RMEndpoint rme = control.createMock(RMEndpoint.class);
View Full Code Here

        manager = new RMManager();
        assertNull(manager.getIdGenerator());
        SequenceIdentifierGenerator generator = manager.new DefaultSequenceIdentifierGenerator();
        manager.setIdGenerator(generator);
        assertSame(generator, manager.getIdGenerator());
        Identifier id1 = generator.generateSequenceIdentifier();
        assertNotNull(id1);
        assertNotNull(id1.getValue());
        Identifier id2 = generator.generateSequenceIdentifier();
        assertTrue(id1 != id2);
        assertTrue(!id1.getValue().equals(id2.getValue()));    
        control.replay();
    }  
View Full Code Here

        SequenceAcknowledgement ack2 = control.createMock(SequenceAcknowledgement.class);
        Collection<SequenceAcknowledgement> acks = new ArrayList<SequenceAcknowledgement>();
        acks.add(ack1);
        acks.add(ack2);
        EasyMock.expect(rmps.getAcks()).andReturn(acks);
        Identifier id1 = control.createMock(Identifier.class);
        EasyMock.expect(ack1.getIdentifier()).andReturn(id1);
        SourceSequence ss1 = control.createMock(SourceSequence.class);
        EasyMock.expect(source.getSequence(id1)).andReturn(ss1);
        ss1.setAcknowledged(ack1);
        EasyMock.expectLastCall();
        Identifier id2 = control.createMock(Identifier.class);
        EasyMock.expect(ack2.getIdentifier()).andReturn(id2);
        EasyMock.expect(source.getSequence(id2)).andReturn(null);
        control.replay();
        try {
            interceptor.processAcknowledgments(rme, rmps, ProtocolVariation.RM10WSA200408);
View Full Code Here

    class DefaultSequenceIdentifierGenerator implements SequenceIdentifierGenerator {

        public Identifier generateSequenceIdentifier() {
            String sequenceID = RMContextUtils.generateUUID();
            Identifier sid = new Identifier();
            sid.setValue(sequenceID);
            return sid;
        }
View Full Code Here

TOP

Related Classes of org.openquark.cal.compiler.CompilerMessage$Identifier$Category

Copyright © 2018 www.massapicom. 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.