use of org.apache.cxf.tools.corba.common.idltypes.IdlType in project cxf by apache.
the class WSDLToIDLAction method createStruct.
private IdlType createStruct(Struct s, IdlScopeBase scope, String local) throws Exception {
boolean undefinedCircular = false;
IdlStruct struct = IdlStruct.create(scope, local);
scope.holdForScope(struct);
for (MemberType m : s.getMember()) {
QName qname = m.getIdltype();
IdlType type = findType(qname);
if (!undefinedCircular && !(type instanceof IdlSequence)) {
String mlocal = qname.getLocalPart();
String[] mname = unscopeName(mlocal);
undefinedCircular = null != root.lookup(mname, true);
}
struct.addToScope(IdlField.create(struct, m.getName(), type));
}
if (undefinedCircular) {
scope.parkHeld();
} else {
scope.promoteHeldToScope();
if (struct.isCircular()) {
// resolving this struct closed a recursion
scope.flush();
}
}
return struct;
}
use of org.apache.cxf.tools.corba.common.idltypes.IdlType in project cxf by apache.
the class WSDLToIDLAction method checkAnon.
private IdlType checkAnon(CorbaType corbaTypeImpl, IdlScopeBase scope, String local) throws Exception {
IdlType result = null;
if (corbaTypeImpl instanceof Anonstring) {
Anonstring as = (Anonstring) corbaTypeImpl;
Long lbound = as.getBound();
int bound = lbound.intValue();
result = IdlString.create(bound);
}
return result;
}
use of org.apache.cxf.tools.corba.common.idltypes.IdlType in project cxf by apache.
the class WSDLToIDLAction method createUnion.
private IdlType createUnion(Union u, IdlScopeBase scope, String local) throws Exception {
boolean undefinedCircular = false;
IdlType disc = findType(u.getDiscriminator());
IdlUnion union = IdlUnion.create(scope, local, disc);
scope.holdForScope(union);
for (Unionbranch ub : u.getUnionbranch()) {
QName qname = ub.getIdltype();
IdlType bt = findType(qname);
boolean isDefault = false;
if (ub.isSetDefault()) {
isDefault = ub.isDefault();
}
IdlUnionBranch b = IdlUnionBranch.create(union, ub.getName(), bt, isDefault);
for (CaseType cs : ub.getCase()) {
b.addCase(cs.getLabel());
}
if (!undefinedCircular && !(bt instanceof IdlSequence)) {
String mlocal = qname.getLocalPart();
String[] mname = unscopeName(mlocal);
undefinedCircular = null != root.lookup(mname, true);
}
union.addBranch(b);
}
if (undefinedCircular) {
scope.parkHeld();
} else {
scope.promoteHeldToScope();
if (union.isCircular()) {
// resolving this union closed a recursion
scope.flush();
}
}
return union;
}
use of org.apache.cxf.tools.corba.common.idltypes.IdlType in project cxf by apache.
the class WSDLToIDLAction method createTypedef.
private IdlType createTypedef(Alias a, IdlScopeBase scope, String local) throws Exception {
IdlType idlType = null;
IdlType base = findType(a.getBasetype());
idlType = IdlTypedef.create(scope, local, base);
scope.addToScope(idlType);
return idlType;
}
use of org.apache.cxf.tools.corba.common.idltypes.IdlType in project cxf by apache.
the class WSDLToIDLAction method createArray.
private IdlType createArray(Array s, IdlScopeBase scope, String local) throws Exception {
IdlType idlType = null;
IdlType base = findType(s.getElemtype());
int bound = (int) s.getBound();
idlType = IdlArray.create(scope, local, base, bound);
scope.addToScope(idlType);
return idlType;
}
Aggregations