/** * Add a root element to the model. * * @param rootElement The root element to add. */ public void add(RootElementDeclaration rootElement) { add(rootElement.getSchema()); String namespace = rootElement.getNamespace(); String prefix = addNamespace(namespace); SchemaInfo schemaInfo = namespacesToSchemas.get(namespace); if (schemaInfo == null) { schemaInfo = new SchemaInfo(); schemaInfo.setId(prefix); schemaInfo.setNamespace(namespace); namespacesToSchemas.put(namespace, schemaInfo); } schemaInfo.getGlobalElements().add(rootElement); int position = Collections.binarySearch(this.rootElements, rootElement, CLASS_COMPARATOR); if (position < 0) { this.rootElements.add(-position - 1, rootElement); } }
for (RootElementDeclaration rootElement : getGlobalElements()) { referencedNamespaces.add(rootElement.getNamespace()); referencedNamespaces.add(rootElement.getTypeDefinition().getNamespace());
/** * Add a root element to the model. * * @param rootElement The root element to add. */ public void add(RootElementDeclaration rootElement) { int position = Collections.binarySearch(this.rootElements, rootElement, CLASS_COMPARATOR); if (position < 0) { this.rootElements.add(-position - 1, rootElement); add(rootElement.getSchema()); String namespace = rootElement.getNamespace(); String prefix = addNamespace(namespace); SchemaInfo schemaInfo = namespacesToSchemas.get(namespace); if (schemaInfo == null) { schemaInfo = new SchemaInfo(); schemaInfo.setId(prefix); schemaInfo.setNamespace(namespace); namespacesToSchemas.put(namespace, schemaInfo); } schemaInfo.getGlobalElements().add(rootElement); if (includeReferencedClasses()) { REFERENCE_STACK.get().addFirst("root element " + rootElement.getQualifiedName()); addReferencedTypeDefinitions(rootElement); REFERENCE_STACK.get().removeFirst(); } } }
for (RootElementDeclaration rootElementDeclaration : schemaInfo.getGlobalElements()) { exportedClasses.add(rootElementDeclaration.getQualifiedName());
for (RootElementDeclaration rootElement : getGlobalElements()) { referencedNamespaces.add(rootElement.getNamespace()); referencedNamespaces.add(rootElement.getTypeDefinition().getNamespace());
for (RootElementDeclaration rootElementDeclaration : schemaInfo.getGlobalElements()) { if (rootElementDeclaration.getName().equals(name)) { return true;
facets.addAll(typeDef.getFacets()); for (RootElementDeclaration element : info.getGlobalElements()) { facets.addAll(element.getFacets());
for (RootElementDeclaration rootElementDeclaration : schemaInfo.getGlobalElements()) { addExplicitAnnotations(rootElementDeclaration, classnameFor);
for (RootElementDeclaration rootElementDeclaration : schemaInfo.getGlobalElements()) { addExplicitAnnotations(rootElementDeclaration, classnameFor);