<%@ jet package="org.geotools.maven.xmlcodegen.templates" imports="java.util.* org.eclipse.xsd.* org.geotools.xml.* org.geotools.maven.xmlcodegen.*" class="BindingInterfaceTemplate" %> <% XSDSchema schema = (XSDSchema)argument ; String ns = schema.getTargetNamespace(); String prefix = Schemas.getTargetPrefix( schema ); %> import javax.xml.namespace.QName; /** * This interface contains the qualified names of all the types,elements, and * attributes in the <%=schema.getTargetNamespace()%> schema. * * @generated */ public interface <%=prefix.toUpperCase()%> { /** @generated */ public static final String NAMESPACE = "<%= ns %>"; /* Type Definitions */ <% List types = GeneratorUtils.allTypes( schema ); for (Iterator itr = types.iterator(); itr.hasNext();) { XSDTypeDefinition type = (XSDTypeDefinition)itr.next(); if (type.getName() == null) continue; if (!ns.equals(type.getTargetNamespace())) continue; %> /** @generated */ public static final QName <%=type.getName()%> = new QName("<%=ns%>","<%=type.getName()%>"); <% } %> /* Elements */ <% List elements = schema.getElementDeclarations(); for (Iterator itr = elements.iterator(); itr.hasNext();) { XSDElementDeclaration element = (XSDElementDeclaration)itr.next(); if (element.getName() == null) continue; if (!ns.equals(element.getTargetNamespace())) continue; %> /** @generated */ public static final QName <%=element.getName()%> = new QName("<%=ns%>","<%=element.getName()%>"); <% } %> /* Attributes */ <% List attributes = schema.getAttributeDeclarations(); for (Iterator itr = attributes.iterator(); itr.hasNext();) { XSDAttributeDeclaration attribute = (XSDAttributeDeclaration)itr.next(); if (attribute.getName() == null) continue; if (!ns.equals(attribute.getTargetNamespace())) continue; %> /** @generated */ public static final QName <%=attribute.getName()%> = new QName("<%=ns%>","<%=attribute.getName()%>"); <% } %> }