com.sun.xml.internal.xsom.impl.Const Java Examples
The following examples show how to use
com.sun.xml.internal.xsom.impl.Const.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: NGCCRuntimeEx.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
public static boolean ignorableDuplicateComponent(XSDeclaration c) { if(c.getTargetNamespace().equals(Const.schemaNamespace)) { if(c instanceof XSSimpleType) // hide artificial "double definitions" on simple types return true; if(c.isGlobal() && c.getName().equals("anyType")) return true; // ditto for anyType } return false; }
Example #2
Source File: SchemaTreeTraverser.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
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); } }
Example #3
Source File: SchemaTreeTraverser.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
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(); }
Example #4
Source File: SchemaWriter.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
public void schema( XSSchema s ) { // QUICK HACK: don't print the built-in components if(s.getTargetNamespace().equals(Const.schemaNamespace)) return; println(MessageFormat.format("<schema targetNamespace=\"{0}\">", s.getTargetNamespace())); indent++; Iterator itr; itr = s.iterateAttGroupDecls(); while(itr.hasNext()) attGroupDecl( (XSAttGroupDecl)itr.next() ); itr = s.iterateAttributeDecls(); while(itr.hasNext()) attributeDecl( (XSAttributeDecl)itr.next() ); itr = s.iterateComplexTypes(); while(itr.hasNext()) complexType( (XSComplexType)itr.next() ); itr = s.iterateElementDecls(); while(itr.hasNext()) elementDecl( (XSElementDecl)itr.next() ); itr = s.iterateModelGroupDecls(); while(itr.hasNext()) modelGroupDecl( (XSModelGroupDecl)itr.next() ); itr = s.iterateSimpleTypes(); while(itr.hasNext()) simpleType( (XSSimpleType)itr.next() ); indent--; println("</schema>"); }
Example #5
Source File: SchemaWriter.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
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(); println(MessageFormat.format("<restriction{0}>", baseType.isLocal()?"":" base=\"{"+ baseType.getTargetNamespace()+'}'+ baseType.getName()+'\"')); indent++; if(baseType.isLocal()) simpleType(baseType); Iterator itr = type.iterateDeclaredFacets(); while(itr.hasNext()) facet( (XSFacet)itr.next() ); indent--; println("</restriction>"); }
Example #6
Source File: NGCCRuntimeEx.java From hottub with GNU General Public License v2.0 | 5 votes |
public static boolean ignorableDuplicateComponent(XSDeclaration c) { if(c.getTargetNamespace().equals(Const.schemaNamespace)) { if(c instanceof XSSimpleType) // hide artificial "double definitions" on simple types return true; if(c.isGlobal() && c.getName().equals("anyType")) return true; // ditto for anyType } return false; }
Example #7
Source File: SchemaTreeTraverser.java From hottub with GNU General Public License v2.0 | 5 votes |
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); } }
Example #8
Source File: SchemaTreeTraverser.java From hottub with GNU General Public License v2.0 | 5 votes |
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(); }
Example #9
Source File: SchemaWriter.java From hottub with GNU General Public License v2.0 | 5 votes |
public void schema( XSSchema s ) { // QUICK HACK: don't print the built-in components if(s.getTargetNamespace().equals(Const.schemaNamespace)) return; println(MessageFormat.format("<schema targetNamespace=\"{0}\">", s.getTargetNamespace())); indent++; Iterator itr; itr = s.iterateAttGroupDecls(); while(itr.hasNext()) attGroupDecl( (XSAttGroupDecl)itr.next() ); itr = s.iterateAttributeDecls(); while(itr.hasNext()) attributeDecl( (XSAttributeDecl)itr.next() ); itr = s.iterateComplexTypes(); while(itr.hasNext()) complexType( (XSComplexType)itr.next() ); itr = s.iterateElementDecls(); while(itr.hasNext()) elementDecl( (XSElementDecl)itr.next() ); itr = s.iterateModelGroupDecls(); while(itr.hasNext()) modelGroupDecl( (XSModelGroupDecl)itr.next() ); itr = s.iterateSimpleTypes(); while(itr.hasNext()) simpleType( (XSSimpleType)itr.next() ); indent--; println("</schema>"); }
Example #10
Source File: SchemaWriter.java From hottub with GNU General Public License v2.0 | 5 votes |
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(); println(MessageFormat.format("<restriction{0}>", baseType.isLocal()?"":" base=\"{"+ baseType.getTargetNamespace()+'}'+ baseType.getName()+'\"')); indent++; if(baseType.isLocal()) simpleType(baseType); Iterator itr = type.iterateDeclaredFacets(); while(itr.hasNext()) facet( (XSFacet)itr.next() ); indent--; println("</restriction>"); }
Example #11
Source File: NGCCRuntimeEx.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
public static boolean ignorableDuplicateComponent(XSDeclaration c) { if(c.getTargetNamespace().equals(Const.schemaNamespace)) { if(c instanceof XSSimpleType) // hide artificial "double definitions" on simple types return true; if(c.isGlobal() && c.getName().equals("anyType")) return true; // ditto for anyType } return false; }
Example #12
Source File: SchemaTreeTraverser.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
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); } }
Example #13
Source File: SchemaTreeTraverser.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
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(); }
Example #14
Source File: SchemaWriter.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
public void schema( XSSchema s ) { // QUICK HACK: don't print the built-in components if(s.getTargetNamespace().equals(Const.schemaNamespace)) return; println(MessageFormat.format("<schema targetNamespace=\"{0}\">", s.getTargetNamespace())); indent++; Iterator itr; itr = s.iterateAttGroupDecls(); while(itr.hasNext()) attGroupDecl( (XSAttGroupDecl)itr.next() ); itr = s.iterateAttributeDecls(); while(itr.hasNext()) attributeDecl( (XSAttributeDecl)itr.next() ); itr = s.iterateComplexTypes(); while(itr.hasNext()) complexType( (XSComplexType)itr.next() ); itr = s.iterateElementDecls(); while(itr.hasNext()) elementDecl( (XSElementDecl)itr.next() ); itr = s.iterateModelGroupDecls(); while(itr.hasNext()) modelGroupDecl( (XSModelGroupDecl)itr.next() ); itr = s.iterateSimpleTypes(); while(itr.hasNext()) simpleType( (XSSimpleType)itr.next() ); indent--; println("</schema>"); }
Example #15
Source File: SchemaWriter.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
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(); println(MessageFormat.format("<restriction{0}>", baseType.isLocal()?"":" base=\"{"+ baseType.getTargetNamespace()+'}'+ baseType.getName()+'\"')); indent++; if(baseType.isLocal()) simpleType(baseType); Iterator itr = type.iterateDeclaredFacets(); while(itr.hasNext()) facet( (XSFacet)itr.next() ); indent--; println("</restriction>"); }
Example #16
Source File: NGCCRuntimeEx.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
public static boolean ignorableDuplicateComponent(XSDeclaration c) { if(c.getTargetNamespace().equals(Const.schemaNamespace)) { if(c instanceof XSSimpleType) // hide artificial "double definitions" on simple types return true; if(c.isGlobal() && c.getName().equals("anyType")) return true; // ditto for anyType } return false; }
Example #17
Source File: SchemaTreeTraverser.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
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); } }
Example #18
Source File: SchemaTreeTraverser.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
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(); }
Example #19
Source File: SchemaWriter.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
public void schema( XSSchema s ) { // QUICK HACK: don't print the built-in components if(s.getTargetNamespace().equals(Const.schemaNamespace)) return; println(MessageFormat.format("<schema targetNamespace=\"{0}\">", s.getTargetNamespace())); indent++; Iterator itr; itr = s.iterateAttGroupDecls(); while(itr.hasNext()) attGroupDecl( (XSAttGroupDecl)itr.next() ); itr = s.iterateAttributeDecls(); while(itr.hasNext()) attributeDecl( (XSAttributeDecl)itr.next() ); itr = s.iterateComplexTypes(); while(itr.hasNext()) complexType( (XSComplexType)itr.next() ); itr = s.iterateElementDecls(); while(itr.hasNext()) elementDecl( (XSElementDecl)itr.next() ); itr = s.iterateModelGroupDecls(); while(itr.hasNext()) modelGroupDecl( (XSModelGroupDecl)itr.next() ); itr = s.iterateSimpleTypes(); while(itr.hasNext()) simpleType( (XSSimpleType)itr.next() ); indent--; println("</schema>"); }
Example #20
Source File: SchemaWriter.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
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(); println(MessageFormat.format("<restriction{0}>", baseType.isLocal()?"":" base=\"{"+ baseType.getTargetNamespace()+'}'+ baseType.getName()+'\"')); indent++; if(baseType.isLocal()) simpleType(baseType); Iterator itr = type.iterateDeclaredFacets(); while(itr.hasNext()) facet( (XSFacet)itr.next() ); indent--; println("</restriction>"); }
Example #21
Source File: NGCCRuntimeEx.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
public static boolean ignorableDuplicateComponent(XSDeclaration c) { if(c.getTargetNamespace().equals(Const.schemaNamespace)) { if(c instanceof XSSimpleType) // hide artificial "double definitions" on simple types return true; if(c.isGlobal() && c.getName().equals("anyType")) return true; // ditto for anyType } return false; }
Example #22
Source File: SchemaTreeTraverser.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
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); } }
Example #23
Source File: SchemaTreeTraverser.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
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(); }
Example #24
Source File: SchemaWriter.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
public void schema( XSSchema s ) { // QUICK HACK: don't print the built-in components if(s.getTargetNamespace().equals(Const.schemaNamespace)) return; println(MessageFormat.format("<schema targetNamespace=\"{0}\">", s.getTargetNamespace())); indent++; Iterator itr; itr = s.iterateAttGroupDecls(); while(itr.hasNext()) attGroupDecl( (XSAttGroupDecl)itr.next() ); itr = s.iterateAttributeDecls(); while(itr.hasNext()) attributeDecl( (XSAttributeDecl)itr.next() ); itr = s.iterateComplexTypes(); while(itr.hasNext()) complexType( (XSComplexType)itr.next() ); itr = s.iterateElementDecls(); while(itr.hasNext()) elementDecl( (XSElementDecl)itr.next() ); itr = s.iterateModelGroupDecls(); while(itr.hasNext()) modelGroupDecl( (XSModelGroupDecl)itr.next() ); itr = s.iterateSimpleTypes(); while(itr.hasNext()) simpleType( (XSSimpleType)itr.next() ); indent--; println("</schema>"); }
Example #25
Source File: SchemaWriter.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
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(); println(MessageFormat.format("<restriction{0}>", baseType.isLocal()?"":" base=\"{"+ baseType.getTargetNamespace()+'}'+ baseType.getName()+'\"')); indent++; if(baseType.isLocal()) simpleType(baseType); Iterator itr = type.iterateDeclaredFacets(); while(itr.hasNext()) facet( (XSFacet)itr.next() ); indent--; println("</restriction>"); }
Example #26
Source File: NGCCRuntimeEx.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
public static boolean ignorableDuplicateComponent(XSDeclaration c) { if(c.getTargetNamespace().equals(Const.schemaNamespace)) { if(c instanceof XSSimpleType) // hide artificial "double definitions" on simple types return true; if(c.isGlobal() && c.getName().equals("anyType")) return true; // ditto for anyType } return false; }
Example #27
Source File: SchemaTreeTraverser.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
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); } }
Example #28
Source File: SchemaTreeTraverser.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
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(); }
Example #29
Source File: SchemaWriter.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
public void schema( XSSchema s ) { // QUICK HACK: don't print the built-in components if(s.getTargetNamespace().equals(Const.schemaNamespace)) return; println(MessageFormat.format("<schema targetNamespace=\"{0}\">", s.getTargetNamespace())); indent++; Iterator itr; itr = s.iterateAttGroupDecls(); while(itr.hasNext()) attGroupDecl( (XSAttGroupDecl)itr.next() ); itr = s.iterateAttributeDecls(); while(itr.hasNext()) attributeDecl( (XSAttributeDecl)itr.next() ); itr = s.iterateComplexTypes(); while(itr.hasNext()) complexType( (XSComplexType)itr.next() ); itr = s.iterateElementDecls(); while(itr.hasNext()) elementDecl( (XSElementDecl)itr.next() ); itr = s.iterateModelGroupDecls(); while(itr.hasNext()) modelGroupDecl( (XSModelGroupDecl)itr.next() ); itr = s.iterateSimpleTypes(); while(itr.hasNext()) simpleType( (XSSimpleType)itr.next() ); indent--; println("</schema>"); }
Example #30
Source File: SchemaWriter.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
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(); println(MessageFormat.format("<restriction{0}>", baseType.isLocal()?"":" base=\"{"+ baseType.getTargetNamespace()+'}'+ baseType.getName()+'\"')); indent++; if(baseType.isLocal()) simpleType(baseType); Iterator itr = type.iterateDeclaredFacets(); while(itr.hasNext()) facet( (XSFacet)itr.next() ); indent--; println("</restriction>"); }