/** * Creates node for complex type. * * @param type Complex type. */ private void dumpComplexTypeAttribute(XSComplexType type) { Iterator itr; itr = type.iterateAttGroups(); while (itr.hasNext()) { dumpRef((XSAttGroupDecl) itr.next()); } itr = type.iterateDeclaredAttributeUses(); while (itr.hasNext()) { attributeUse((XSAttributeUse) itr.next()); } }
public void attributeDecl(XSAttributeDecl decl) { dump(decl, ""); }
public void elementDecl(XSElementDecl decl) { elementDecl(decl, ""); }
public void schema(XSSchema s) { // QUICK HACK: don't print the built-in components if (s.getTargetNamespace().equals(Const.schemaNamespace)) { return; } SchemaTreeNode newNode = new SchemaTreeNode("Schema " + s.getLocator().getSystemId(), s.getLocator()); this.currNode = newNode; this.model.addSchemaNode(newNode); for (XSAttGroupDecl groupDecl : s.getAttGroupDecls().values()) { attGroupDecl(groupDecl); } for (XSAttributeDecl attrDecl : s.getAttributeDecls().values()) { attributeDecl(attrDecl); } for (XSComplexType complexType : s.getComplexTypes().values()) { complexType(complexType); } for (XSElementDecl elementDecl : s.getElementDecls().values()) { elementDecl(elementDecl); } for (XSModelGroupDecl modelGroupDecl : s.getModelGroupDecls().values()) { modelGroupDecl(modelGroupDecl); } for (XSSimpleType simpleType : s.getSimpleTypes().values()) { simpleType(simpleType); } }
public void restrictionSimpleType(XSRestrictionSimpleType type) { if (type.getBaseType() == null) { // don't print anySimpleType if (!type.getName().equals("anySimpleType")) { throw new InternalError(); } if (!Const.schemaNamespace.equals(type.getTargetNamespace())) { throw new InternalError(); } return; } XSSimpleType baseType = type.getSimpleBaseType(); String str = MessageFormat.format("Restriction {0}", new Object[]{baseType.isLocal() ? "" : " base=\"{" + baseType.getTargetNamespace() + "}" + baseType.getName() + "\""}); SchemaTreeNode newNode = new SchemaTreeNode(str, baseType.getLocator()); this.currNode.add(newNode); this.currNode = newNode; if (baseType.isLocal()) { simpleType(baseType); } Iterator itr = type.iterateDeclaredFacets(); while (itr.hasNext()) { facet((XSFacet) itr.next()); } this.currNode = (SchemaTreeNode) this.currNode.getParent(); }
public void modelGroup(XSModelGroup group) { modelGroup(group, ""); }
this.currNode = newNode3; dumpComplexTypeAttribute(type); dumpComplexTypeAttribute(type); dumpComplexTypeAttribute(type); dumpComplexTypeAttribute(type);
public void schema(XSSchema s) { // QUICK HACK: don't print the built-in components if (s.getTargetNamespace().equals(Const.schemaNamespace)) { return; } SchemaTreeNode newNode = new SchemaTreeNode("Schema " + s.getLocator().getSystemId(), s.getLocator()); this.currNode = newNode; this.model.addSchemaNode(newNode); for (XSAttGroupDecl groupDecl : s.getAttGroupDecls().values()) { attGroupDecl(groupDecl); } for (XSAttributeDecl attrDecl : s.getAttributeDecls().values()) { attributeDecl(attrDecl); } for (XSComplexType complexType : s.getComplexTypes().values()) { complexType(complexType); } for (XSElementDecl elementDecl : s.getElementDecls().values()) { elementDecl(elementDecl); } for (XSModelGroupDecl modelGroupDecl : s.getModelGroupDecls().values()) { modelGroupDecl(modelGroupDecl); } for (XSSimpleType simpleType : s.getSimpleTypes().values()) { simpleType(simpleType); } }
public void restrictionSimpleType(XSRestrictionSimpleType type) { if (type.getBaseType() == null) { // don't print anySimpleType if (!type.getName().equals("anySimpleType")) { throw new InternalError(); } if (!Const.schemaNamespace.equals(type.getTargetNamespace())) { throw new InternalError(); } return; } XSSimpleType baseType = type.getSimpleBaseType(); String str = MessageFormat.format("Restriction {0}", new Object[]{baseType.isLocal() ? "" : " base=\"{" + baseType.getTargetNamespace() + "}" + baseType.getName() + "\""}); SchemaTreeNode newNode = new SchemaTreeNode(str, baseType.getLocator()); this.currNode.add(newNode); this.currNode = newNode; if (baseType.isLocal()) { simpleType(baseType); } Iterator itr = type.iterateDeclaredFacets(); while (itr.hasNext()) { facet((XSFacet) itr.next()); } this.currNode = (SchemaTreeNode) this.currNode.getParent(); }
public void modelGroup(XSModelGroup group) { modelGroup(group, ""); }
this.currNode = newNode3; dumpComplexTypeAttribute(type); dumpComplexTypeAttribute(type); dumpComplexTypeAttribute(type); dumpComplexTypeAttribute(type);
public void schema(XSSchema s) { // QUICK HACK: don't print the built-in components if (s.getTargetNamespace().equals(Const.schemaNamespace)) { return; } SchemaTreeNode newNode = new SchemaTreeNode("Schema " + s.getLocator().getSystemId(), s.getLocator()); this.currNode = newNode; this.model.addSchemaNode(newNode); for (XSAttGroupDecl groupDecl : s.getAttGroupDecls().values()) { attGroupDecl(groupDecl); } for (XSAttributeDecl attrDecl : s.getAttributeDecls().values()) { attributeDecl(attrDecl); } for (XSComplexType complexType : s.getComplexTypes().values()) { complexType(complexType); } for (XSElementDecl elementDecl : s.getElementDecls().values()) { elementDecl(elementDecl); } for (XSModelGroupDecl modelGroupDecl : s.getModelGroupDecls().values()) { modelGroupDecl(modelGroupDecl); } for (XSSimpleType simpleType : s.getSimpleTypes().values()) { simpleType(simpleType); } }
/** * Creates node for complex type. * * @param type Complex type. */ private void dumpComplexTypeAttribute(XSComplexType type) { Iterator itr; itr = type.iterateAttGroups(); while (itr.hasNext()) { dumpRef((XSAttGroupDecl) itr.next()); } itr = type.iterateDeclaredAttributeUses(); while (itr.hasNext()) { attributeUse((XSAttributeUse) itr.next()); } }
public void restrictionSimpleType(XSRestrictionSimpleType type) { if (type.getBaseType() == null) { // don't print anySimpleType if (!type.getName().equals("anySimpleType")) { throw new InternalError(); } if (!Const.schemaNamespace.equals(type.getTargetNamespace())) { throw new InternalError(); } return; } XSSimpleType baseType = type.getSimpleBaseType(); String str = MessageFormat.format("Restriction {0}", new Object[]{baseType.isLocal() ? "" : " base=\"{" + baseType.getTargetNamespace() + "}" + baseType.getName() + "\""}); SchemaTreeNode newNode = new SchemaTreeNode(str, baseType.getLocator()); this.currNode.add(newNode); this.currNode = newNode; if (baseType.isLocal()) { simpleType(baseType); } Iterator itr = type.iterateDeclaredFacets(); while (itr.hasNext()) { facet((XSFacet) itr.next()); } this.currNode = (SchemaTreeNode) this.currNode.getParent(); }
public void modelGroup(XSModelGroup group) { modelGroup(group, ""); }
public void attributeDecl(XSAttributeDecl decl) { dump(decl, ""); }
public void elementDecl(XSElementDecl decl) { elementDecl(decl, ""); }
this.currNode = newNode3; dumpComplexTypeAttribute(type); dumpComplexTypeAttribute(type); dumpComplexTypeAttribute(type); dumpComplexTypeAttribute(type);
public void schema(XSSchema s) { // QUICK HACK: don't print the built-in components if (s.getTargetNamespace().equals(Const.schemaNamespace)) { return; } SchemaTreeNode newNode = new SchemaTreeNode("Schema " + s.getLocator().getSystemId(), s.getLocator()); this.currNode = newNode; this.model.addSchemaNode(newNode); for (XSAttGroupDecl groupDecl : s.getAttGroupDecls().values()) { attGroupDecl(groupDecl); } for (XSAttributeDecl attrDecl : s.getAttributeDecls().values()) { attributeDecl(attrDecl); } for (XSComplexType complexType : s.getComplexTypes().values()) { complexType(complexType); } for (XSElementDecl elementDecl : s.getElementDecls().values()) { elementDecl(elementDecl); } for (XSModelGroupDecl modelGroupDecl : s.getModelGroupDecls().values()) { modelGroupDecl(modelGroupDecl); } for (XSSimpleType simpleType : s.getSimpleTypes().values()) { simpleType(simpleType); } }
/** * Creates node for complex type. * * @param type Complex type. */ private void dumpComplexTypeAttribute(XSComplexType type) { Iterator itr; itr = type.iterateAttGroups(); while (itr.hasNext()) { dumpRef((XSAttGroupDecl) itr.next()); } itr = type.iterateDeclaredAttributeUses(); while (itr.hasNext()) { attributeUse((XSAttributeUse) itr.next()); } }