@Override public Type getType() { if (fallback == null) { // TODO try to do something better - currently RemovedProperty is always a container if there's no fallback // Simulate a complex type return new ComplexTypeImpl(getSchema(), getSchema().getName(), fieldName); } return fallback.getType(); }
protected Type createFakeComplexType(Schema schema, ComplexType superType, String name, XSModelGroup mg) throws TypeBindingException { ComplexType ct = new ComplexTypeImpl(superType, schema.getName(), name); // -------- Workaround - we register now the complex type - to fix // recursive references to the same type schema.registerType(ct); return processModelGroup(schema, superType, name, ct, mg, false); }
protected Type createComplexType(Schema schema, ComplexType superType, String name, XSContentType content, boolean abstractType) throws TypeBindingException { ComplexType ct = new ComplexTypeImpl(superType, schema.getName(), name); // -------- Workaround - we register now the complex type - to fix // recursive references to the same type schema.registerType(ct); // ------------------------------------------ XSParticle particle = content.asParticle(); if (particle == null) { // complex type without particle -> may be it contains only // attributes -> return it as is return ct; } XSTerm term = particle.getTerm(); XSModelGroup mg = term.asModelGroup(); return processModelGroup(schema, superType, name, ct, mg, abstractType); }