001/*
002 * Copyright (c) 2004 World Wide Web Consortium,
003 *
004 * (Massachusetts Institute of Technology, European Research Consortium for
005 * Informatics and Mathematics, Keio University). All Rights Reserved. This
006 * work is distributed under the W3C(r) Software License [1] in the hope that
007 * it will be useful, but WITHOUT ANY WARRANTY; without even the implied
008 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
009 *
010 * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
011 */
012
013package org.w3c.dom;
014
015/**
016 * This interface permits a DOM implementer to supply one or more
017 * implementations, based upon requested features and versions, as specified
018 * in . Each implemented <code>DOMImplementationSource</code> object is
019 * listed in the binding-specific list of available sources so that its
020 * <code>DOMImplementation</code> objects are made available.
021 * <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>Document Object Model (DOM) Level 3 Core Specification</a>.
022 * @since DOM Level 3
023 */
024public interface DOMImplementationSource {
025    /**
026     *  A method to request the first DOM implementation that supports the
027     * specified features.
028     * @param features  A string that specifies which features and versions
029     *   are required. This is a space separated list in which each feature
030     *   is specified by its name optionally followed by a space and a
031     *   version number.  This method returns the first item of the list
032     *   returned by <code>getDOMImplementationList</code>.  As an example,
033     *   the string <code>"XML 3.0 Traversal +Events 2.0"</code> will
034     *   request a DOM implementation that supports the module "XML" for its
035     *   3.0 version, a module that support of the "Traversal" module for
036     *   any version, and the module "Events" for its 2.0 version. The
037     *   module "Events" must be accessible using the method
038     *   <code>Node.getFeature()</code> and
039     *   <code>DOMImplementation.getFeature()</code>.
040     * @return The first DOM implementation that support the desired
041     *   features, or <code>null</code> if this source has none.
042     */
043    public DOMImplementation getDOMImplementation(String features);
044
045    /**
046     * A method to request a list of DOM implementations that support the
047     * specified features and versions, as specified in .
048     * @param features A string that specifies which features and versions
049     *   are required. This is a space separated list in which each feature
050     *   is specified by its name optionally followed by a space and a
051     *   version number. This is something like: "XML 3.0 Traversal +Events
052     *   2.0"
053     * @return A list of DOM implementations that support the desired
054     *   features.
055     */
056    public DOMImplementationList getDOMImplementationList(String features);
057
058}