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 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 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 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 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 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 unionSimpleType(XSUnionSimpleType type) { final int len = type.getMemberSize(); StringBuffer ref = new StringBuffer(); for (int i = 0; i < len; i++) { XSSimpleType member = type.getMember(i); if (member.isGlobal()) { ref.append(MessageFormat.format(" '{'{0}'}'{1}", new Object[]{ member.getTargetNamespace(), member.getName()})); } } String name = (ref.length() == 0) ? "Union" : ("Union memberTypes=\"" + ref + "\""); SchemaTreeNode newNode = new SchemaTreeNode(name, type.getLocator()); this.currNode.add(newNode); this.currNode = newNode; for (int i = 0; i < len; i++) { XSSimpleType member = type.getMember(i); if (member.isLocal()) { simpleType(member); } } this.currNode = (SchemaTreeNode) this.currNode.getParent(); }
public void unionSimpleType(XSUnionSimpleType type) { final int len = type.getMemberSize(); StringBuffer ref = new StringBuffer(); for (int i = 0; i < len; i++) { XSSimpleType member = type.getMember(i); if (member.isGlobal()) { ref.append(MessageFormat.format(" '{'{0}'}'{1}", new Object[]{ member.getTargetNamespace(), member.getName()})); } } String name = (ref.length() == 0) ? "Union" : ("Union memberTypes=\"" + ref + "\""); SchemaTreeNode newNode = new SchemaTreeNode(name, type.getLocator()); this.currNode.add(newNode); this.currNode = newNode; for (int i = 0; i < len; i++) { XSSimpleType member = type.getMember(i); if (member.isLocal()) { simpleType(member); } } this.currNode = (SchemaTreeNode) this.currNode.getParent(); }
public void unionSimpleType(XSUnionSimpleType type) { final int len = type.getMemberSize(); StringBuffer ref = new StringBuffer(); for (int i = 0; i < len; i++) { XSSimpleType member = type.getMember(i); if (member.isGlobal()) { ref.append(MessageFormat.format(" '{'{0}'}'{1}", new Object[]{ member.getTargetNamespace(), member.getName()})); } } String name = (ref.length() == 0) ? "Union" : ("Union memberTypes=\"" + ref + "\""); SchemaTreeNode newNode = new SchemaTreeNode(name, type.getLocator()); this.currNode.add(newNode); this.currNode = newNode; for (int i = 0; i < len; i++) { XSSimpleType member = type.getMember(i); if (member.isLocal()) { simpleType(member); } } this.currNode = (SchemaTreeNode) this.currNode.getParent(); }
public void unionSimpleType(XSUnionSimpleType type) { final int len = type.getMemberSize(); StringBuffer ref = new StringBuffer(); for (int i = 0; i < len; i++) { XSSimpleType member = type.getMember(i); if (member.isGlobal()) { ref.append(MessageFormat.format(" '{'{0}'}'{1}", new Object[]{ member.getTargetNamespace(), member.getName()})); } } String name = (ref.length() == 0) ? "Union" : ("Union memberTypes=\"" + ref + "\""); SchemaTreeNode newNode = new SchemaTreeNode(name, type.getLocator()); this.currNode.add(newNode); this.currNode = newNode; for (int i = 0; i < len; i++) { XSSimpleType member = type.getMember(i); if (member.isLocal()) { simpleType(member); } } this.currNode = (SchemaTreeNode) this.currNode.getParent(); }
public void unionSimpleType(XSUnionSimpleType type) { final int len = type.getMemberSize(); StringBuffer ref = new StringBuffer(); for (int i = 0; i < len; i++) { XSSimpleType member = type.getMember(i); if (member.isGlobal()) { ref.append(MessageFormat.format(" '{'{0}'}'{1}", new Object[]{ member.getTargetNamespace(), member.getName()})); } } String name = (ref.length() == 0) ? "Union" : ("Union memberTypes=\"" + ref + "\""); SchemaTreeNode newNode = new SchemaTreeNode(name, type.getLocator()); this.currNode.add(newNode); this.currNode = newNode; for (int i = 0; i < len; i++) { XSSimpleType member = type.getMember(i); if (member.isLocal()) { simpleType(member); } } this.currNode = (SchemaTreeNode) this.currNode.getParent(); }
/** * Creates node for attribute declaration with additional attributes. * * @param decl Attribute declaration. * @param additionalAtts Additional attributes. */ private void dump(XSAttributeDecl decl, String additionalAtts) { XSSimpleType type = decl.getType(); String str = MessageFormat.format("Attribute \"{0}\"{1}{2}{3}{4}", new Object[]{ decl.getName(), additionalAtts, type.isLocal() ? "" : MessageFormat.format( " type=\"'{'{0}'}'{1}\"", new Object[]{ type.getTargetNamespace(), type.getName()}), decl.getFixedValue() == null ? "" : " fixed=\"" + decl.getFixedValue() + "\"", decl.getDefaultValue() == null ? "" : " default=\"" + decl.getDefaultValue() + "\""}); SchemaTreeNode newNode = new SchemaTreeNode(str, decl.getLocator()); this.currNode.add(newNode); this.currNode = newNode; if (type.isLocal()) { simpleType(type); } this.currNode = (SchemaTreeNode) this.currNode.getParent(); }
public void listSimpleType(XSListSimpleType type) { XSSimpleType itemType = type.getItemType(); if (itemType.isLocal()) { SchemaTreeNode newNode = new SchemaTreeNode("List", type .getLocator()); this.currNode.add(newNode); this.currNode = newNode; simpleType(itemType); this.currNode = (SchemaTreeNode) this.currNode.getParent(); } else { // global type String str = MessageFormat.format("List itemType=\"'{'{0}'}'{1}\"", new Object[]{itemType.getTargetNamespace(), itemType.getName()}); SchemaTreeNode newNode = new SchemaTreeNode(str, itemType .getLocator()); this.currNode.add(newNode); } }
public void listSimpleType(XSListSimpleType type) { XSSimpleType itemType = type.getItemType(); if (itemType.isLocal()) { SchemaTreeNode newNode = new SchemaTreeNode("List", type .getLocator()); this.currNode.add(newNode); this.currNode = newNode; simpleType(itemType); this.currNode = (SchemaTreeNode) this.currNode.getParent(); } else { // global type String str = MessageFormat.format("List itemType=\"'{'{0}'}'{1}\"", new Object[]{itemType.getTargetNamespace(), itemType.getName()}); SchemaTreeNode newNode = new SchemaTreeNode(str, itemType .getLocator()); this.currNode.add(newNode); } }
public void listSimpleType(XSListSimpleType type) { XSSimpleType itemType = type.getItemType(); if (itemType.isLocal()) { SchemaTreeNode newNode = new SchemaTreeNode("List", type .getLocator()); this.currNode.add(newNode); this.currNode = newNode; simpleType(itemType); this.currNode = (SchemaTreeNode) this.currNode.getParent(); } else { // global type String str = MessageFormat.format("List itemType=\"'{'{0}'}'{1}\"", new Object[]{itemType.getTargetNamespace(), itemType.getName()}); SchemaTreeNode newNode = new SchemaTreeNode(str, itemType .getLocator()); this.currNode.add(newNode); } }
public void listSimpleType(XSListSimpleType type) { XSSimpleType itemType = type.getItemType(); if (itemType.isLocal()) { SchemaTreeNode newNode = new SchemaTreeNode("List", type .getLocator()); this.currNode.add(newNode); this.currNode = newNode; simpleType(itemType); this.currNode = (SchemaTreeNode) this.currNode.getParent(); } else { // global type String str = MessageFormat.format("List itemType=\"'{'{0}'}'{1}\"", new Object[]{itemType.getTargetNamespace(), itemType.getName()}); SchemaTreeNode newNode = new SchemaTreeNode(str, itemType .getLocator()); this.currNode.add(newNode); } }
public void listSimpleType(XSListSimpleType type) { XSSimpleType itemType = type.getItemType(); if (itemType.isLocal()) { SchemaTreeNode newNode = new SchemaTreeNode("List", type .getLocator()); this.currNode.add(newNode); this.currNode = newNode; simpleType(itemType); this.currNode = (SchemaTreeNode) this.currNode.getParent(); } else { // global type String str = MessageFormat.format("List itemType=\"'{'{0}'}'{1}\"", new Object[]{itemType.getTargetNamespace(), itemType.getName()}); SchemaTreeNode newNode = new SchemaTreeNode(str, itemType .getLocator()); this.currNode.add(newNode); } }
/** * Creates node for attribute declaration with additional attributes. * * @param decl Attribute declaration. * @param additionalAtts Additional attributes. */ private void dump(XSAttributeDecl decl, String additionalAtts) { XSSimpleType type = decl.getType(); String str = MessageFormat.format("Attribute \"{0}\"{1}{2}{3}{4}", new Object[]{ decl.getName(), additionalAtts, type.isLocal() ? "" : MessageFormat.format( " type=\"'{'{0}'}'{1}\"", new Object[]{ type.getTargetNamespace(), type.getName()}), decl.getFixedValue() == null ? "" : " fixed=\"" + decl.getFixedValue() + "\"", decl.getDefaultValue() == null ? "" : " default=\"" + decl.getDefaultValue() + "\""}); SchemaTreeNode newNode = new SchemaTreeNode(str, decl.getLocator()); this.currNode.add(newNode); this.currNode = newNode; if (type.isLocal()) { simpleType(type); } this.currNode = (SchemaTreeNode) this.currNode.getParent(); }
/** * Creates node for attribute declaration with additional attributes. * * @param decl Attribute declaration. * @param additionalAtts Additional attributes. */ private void dump(XSAttributeDecl decl, String additionalAtts) { XSSimpleType type = decl.getType(); String str = MessageFormat.format("Attribute \"{0}\"{1}{2}{3}{4}", new Object[]{ decl.getName(), additionalAtts, type.isLocal() ? "" : MessageFormat.format( " type=\"'{'{0}'}'{1}\"", new Object[]{ type.getTargetNamespace(), type.getName()}), decl.getFixedValue() == null ? "" : " fixed=\"" + decl.getFixedValue() + "\"", decl.getDefaultValue() == null ? "" : " default=\"" + decl.getDefaultValue() + "\""}); SchemaTreeNode newNode = new SchemaTreeNode(str, decl.getLocator()); this.currNode.add(newNode); this.currNode = newNode; if (type.isLocal()) { simpleType(type); } this.currNode = (SchemaTreeNode) this.currNode.getParent(); }