Examples of Anonsequence


Examples of org.apache.schemas.yoko.bindings.corba.Anonsequence

        CorbaSequenceHandler obj = null;
        try {
            QName seqElementType = null;
            long bound = 0;
            if (type instanceof Anonsequence) {
                Anonsequence anonSeqType = (Anonsequence)type;
                seqElementType = anonSeqType.getElemtype();
                bound = anonSeqType.getBound();
            } else {
                Sequence seqType = (Sequence)type;
                seqElementType = seqType.getElemtype();
                bound = seqType.getBound();
            }
View Full Code Here

Examples of org.apache.schemas.yoko.bindings.corba.Anonsequence

        int length = stream.read_ulong();

        long bound = 0;
        if (obj.getType() instanceof Anonsequence) {
            Anonsequence anonSeqType = (Anonsequence) obj.getType();
            bound = anonSeqType.getBound();
        } else {
            Sequence seqType = (Sequence) obj.getType();
            bound = seqType.getBound();
        }
        if (bound == 0) {
View Full Code Here

Examples of org.apache.schemas.yoko.bindings.corba.Anonsequence

    private Anonsequence generateCorbaAnonsequence(CorbaTypeImpl ctype,
                                                   XmlSchemaType schemaType,
                                                   Scope scopedName,
                                                   long bound) {
        // create corba anonsequence
        Anonsequence result = new Anonsequence();
        if (bound == -1) {
            bound = 0;
        }               
        result.setBound(bound);
        result.setQName(new QName(typeMap.getTargetNamespace(), scopedName.toString()));
        result.setType(schemaType.getQName());
        result.setElemtype(ctype.getQName());

        // add schemaType
        if (schemas.getTypeByQName(schemaType.getQName()) == null) {
            schema.getItems().add(schemaType);
            schema.addType(schemaType);
View Full Code Here

Examples of org.apache.schemas.yoko.bindings.corba.Anonsequence

            Anonarray arr3 = (Anonarray)mapType.getStructOrExceptionOrUnion().get(2);
            assertEquals("ElementType is incorrect for Anon Array Type", "X._1_A",
                         arr3.getElemtype().getLocalPart());
           
           
            Anonsequence seq = (Anonsequence)mapType.getStructOrExceptionOrUnion().get(5);
            assertEquals("Name is incorrect for Anon Array Type", "X._1_A",
                         seq.getName());                       
            assertEquals("ElementType is incorrect for Anon Sequence Type", "X._2_A",
                         seq.getElemtype().getLocalPart());
           
           
            Anonsequence seq2 = (Anonsequence)mapType.getStructOrExceptionOrUnion().get(1);
            assertEquals("Name is incorrect for Anon Array Type", "X._2_A",
                         seq2.getName());                       
            assertEquals("ElementType is incorrect for Anon Sequence Type", "X._3_A",
                         seq2.getElemtype().getLocalPart());
           
            Anonsequence seq3 = (Anonsequence)mapType.getStructOrExceptionOrUnion().get(4);
            assertEquals("Name is incorrect for Anon Array Type", "X._3_A",
                         seq3.getName());
            assertEquals("ElementType is incorrect for Anon Sequence Type", "long",
                         seq3.getElemtype().getLocalPart());
           
            File f = new File("atype.idl");
            assertTrue("atype.idl should be generated", f.exists());
        } finally {
            new File("atype.idl").deleteOnExit();
View Full Code Here

Examples of org.apache.schemas.yoko.bindings.corba.Anonsequence

            corbaSeq.setBound(bound);
            corbaSeq.setRepositoryID(repoString + name.getLocalPart().replace('.', '/') + idlversion);
            corbaTypeImpl = corbaSeq;
        } else {
            // Create a Anonymous Sequence
            Anonsequence corbaSeq = new Anonsequence();
            corbaSeq.setName(name.getLocalPart());
            corbaSeq.setQName(name);
            corbaSeq.setType(schematypeName);
            corbaSeq.setElemtype(arrayType);
            corbaSeq.setBound(bound);

            corbaTypeImpl = corbaSeq;
        }
        return corbaTypeImpl;
    }
View Full Code Here

Examples of org.apache.schemas.yoko.bindings.corba.Anonsequence

        if (baseType instanceof Sequence) {
            Sequence seqType = (Sequence)baseType;
            seqElementType = seqType.getElemtype();
            seqBound = seqType.getBound();
        } else {
            Anonsequence seqType = (Anonsequence)baseType;
            seqElementType = seqType.getElemtype();
            seqBound = seqType.getBound();
        }
        if (seqBound == 0) {
            // This is an unbounded sequence.  Store a 'template' object that we can use to create
            // new objects as needed
            QName elementName = new QName(name.getNamespaceURI(), "item");
View Full Code Here

Examples of org.apache.schemas.yoko.bindings.corba.Anonsequence

                mappingType.getStructOrExceptionOrUnion().add(anonstringType);
            } else if (currentNode.getNodeName().equals("corba:anonfixed")) {
                Anonfixed anonfixedType = getAnonFixedDefinition(currentNode, def);
                mappingType.getStructOrExceptionOrUnion().add(anonfixedType);
            } else if (currentNode.getNodeName().equals("corba:anonsequence")) {
                Anonsequence anonsequenceType = getAnonSequenceDefinition(currentNode, def);
                mappingType.getStructOrExceptionOrUnion().add(anonsequenceType);
            } else if (currentNode.getNodeName().equals("corba:anonarray")) {
                Anonarray anonarrayType = getAnonArrayDefinition(currentNode, def);
                mappingType.getStructOrExceptionOrUnion().add(anonarrayType);
            } else {
View Full Code Here

Examples of org.apache.schemas.yoko.bindings.corba.Anonsequence

        }
        return anonFixedType;
    }

    public Anonsequence getAnonSequenceDefinition(Node node, Definition def) {
        Anonsequence anonSequenceType = new Anonsequence();

        // Store information about the sequence
        NamedNodeMap anonSequenceAttributes = node.getAttributes();
        for (int i = 0; i < anonSequenceAttributes.getLength(); ++i) {
            if (anonSequenceAttributes.item(i).getNodeName().equals("name")) {
                anonSequenceType.setName(anonSequenceAttributes.item(i).getNodeValue());
            } else if (anonSequenceAttributes.item(i).getNodeName().equals("elemtype")) {
                String elemType = anonSequenceAttributes.item(i).getNodeValue();
                int seperatorIndex = elemType.indexOf(':');
                String prefix = elemType.substring(0, seperatorIndex);
                String localPart = elemType.substring(seperatorIndex + 1, elemType.length());
                anonSequenceType.setElemtype(new QName(def.getNamespace(prefix), localPart, prefix));
            } else if (anonSequenceAttributes.item(i).getNodeName().equals("bound")) {
                anonSequenceType.setBound(Long.parseLong(anonSequenceAttributes.item(i).getNodeValue()));
            }
        }
        return anonSequenceType;
    }
View Full Code Here

Examples of org.apache.schemas.yoko.bindings.corba.Anonsequence

       
        try {
            QName seqElementType = null;
            long bound = 0;
            if (typeDefinition instanceof Anonsequence) {
                Anonsequence anonSeqType = (Anonsequence)typeDefinition;
                seqElementType = anonSeqType.getElemtype();
                bound = anonSeqType.getBound();
            } else {
                Sequence seqType = (Sequence)typeDefinition;
                seqElementType = seqType.getElemtype();
                bound = seqType.getBound();
            }
View Full Code Here

Examples of org.apache.schemas.yoko.bindings.corba.Anonsequence

        return idlType;
    }
   
    private IdlType createAnonSequence(CorbaTypeImpl ctype, IdlScopeBase scope, String local) {
        IdlType idlType = null;
        Anonsequence s = (Anonsequence)ctype;
        IdlType base = findType(s.getElemtype());       
        int bound = (int)s.getBound();
        idlType = IdlAnonSequence.create(scope, base, bound);
        scope.addToScope(idlType);
        return idlType;
    }
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.