use of com.sun.xml.xsom.XSContentType in project narayana by jbosstm.
the class NBFSchemaParser method findElementType.
private void findElementType(XSComplexType xtype) {
XSContentType xsContentType = xtype.getContentType();
XSParticle particle = xsContentType.asParticle();
if (particle != null) {
XSTerm term = particle.getTerm();
if (term.isModelGroup()) {
XSModelGroup xsModelGroup = term.asModelGroup();
XSParticle[] particles = xsModelGroup.getChildren();
for (XSParticle p : particles) {
XSTerm pterm = p.getTerm();
if (pterm.isElementDecl()) {
XSElementDecl element = pterm.asElementDecl();
String name = element.getName();
log.debug(name);
XSType type = element.getType();
while (type != null) {
String typeName = type.getName();
if (typeName != null && (typeName.equals("long") || typeName.equals("string") || typeName.equals("integer") || typeName.equals("float") || typeName.endsWith("_type"))) {
log.debug(typeName);
flds.put(name, typeName);
break;
}
type = type.getBaseType();
}
}
}
}
}
}
use of com.sun.xml.xsom.XSContentType in project atlasmap by atlasmap.
the class AtlasRewritingXSVisitor method complexType.
@Override
public void complexType(XSComplexType complex) {
for (XSAttributeUse use : complex.getAttributeUses()) {
attributeUse(use);
}
XSContentType contentType = complex.getContentType();
contentType.visit(this);
}
Aggregations