/** * The list of imported schemas. * * @return The list of imported schemas. */ public List<SchemaInfo> getImportedSchemas() { Set<String> importedNamespaces = getReferencedNamespaces(); importedNamespaces.remove(getNamespace()); List<SchemaInfo> schemas = new ArrayList<SchemaInfo>(); for (String ns : importedNamespaces) { SchemaInfo schema = lookupSchema(ns); if (schema != null) { schemas.add(schema); } else { SchemaInfo schemaInfo = new SchemaInfo(); schemaInfo.setNamespace(ns); schemas.add(schemaInfo); } } return schemas; }
/** * The list of imported schemas. * * @return The list of imported schemas. */ public List<SchemaInfo> getImportedSchemas() { Set<String> importedNamespaces = getReferencedNamespaces(); importedNamespaces.remove(getNamespace() == null ? "" : getNamespace()); List<SchemaInfo> schemas = new ArrayList<SchemaInfo>(); for (String ns : importedNamespaces) { SchemaInfo schema = lookupSchema(ns); if (schema != null) { schemas.add(schema); } else { SchemaInfo schemaInfo = new SchemaInfo(); schemaInfo.setNamespace(ns); schemas.add(schemaInfo); } } return schemas; }