001/**********************************************
002 * Copyright (C) 2010 Lukas Laag
003 * This file is part of lib-gwt-svg.
004 * 
005 * libgwtsvg is free software: you can redistribute it and/or modify
006 * it under the terms of the GNU Lesser General Public License as published by
007 * the Free Software Foundation, either version 3 of the License, or
008 * (at your option) any later version.
009 * 
010 * libgwtsvg is distributed in the hope that it will be useful,
011 * but WITHOUT ANY WARRANTY; without even the implied warranty of
012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
013 * GNU Lesser General Public License for more details.
014 * 
015 * You should have received a copy of the GNU Lesser General Public License
016 * along with libgwtsvg.  If not, see http://www.gnu.org/licenses/
017 **********************************************/
018/*
019 * Copyright (c) 2004 World Wide Web Consortium,
020 *
021 * (Massachusetts Institute of Technology, European Research Consortium for
022 * Informatics and Mathematics, Keio University). All Rights Reserved. This
023 * work is distributed under the W3C(r) Software License [1] in the hope that
024 * it will be useful, but WITHOUT ANY WARRANTY; without even the implied
025 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
026 *
027 * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
028 */
029
030package org.vectomatic.dom.svg.itf;
031
032import org.vectomatic.dom.svg.OMSVGDocument;
033
034  /**
035   * <p>This interface provides access to an SVG document embedded by reference
036   * in another DOM-based language. The expectation is that the interface is
037   * implemented on DOM objects that allow such SVG document references, such
038   * as the DOM {@link org.vectomatic.dom.svg.OMElement} object that corresponds
039   * to an HTML <span class='element-name'>'object'</span> element. Such DOM
040   * objects are often also required to implement the <code>EmbeddingElement</code>
041   * defined in the Window specification [<a href="refs.html#ref-WINDOW">WINDOW</a>].</p>
042   * <p>This interface is deprecated and may be dropped from future versions
043   * of the SVG specification. Authors are suggested to use the <code>contentDocument</code>
044   * attribute on the <code>EmbeddingElement</code> interface to obtain a referenced
045   * SVG document, if that interface is available.</p>
046   */
047public interface IGetSVGDocument {
048  /**
049   * <p> This method must return the {@link org.vectomatic.dom.svg.OMDocument}
050   * object embedded content in an embedding element, or null if there is no
051   * document.</p> <p>Note that this is equivalent to fetching the value of
052   * the <code>EmbeddingElement::contentDocument</code> attribute of the embedding
053   * element, if the <code>EmbeddingElement</code> interface is also implemented.
054   * The author is advised to check that the document element of the returned
055   * {@link org.vectomatic.dom.svg.OMDocument} is indeed an <a href='http://www.w3.org/TR/SVG11/struct.html#SVGElement'
056   * title='svg element specification'>svg</a> element instead of assuming that
057   * that will always be the case.</p>
058   * @return The {@link org.vectomatic.dom.svg.OMDocument} object for the referenced
059   * document, or null   if there is no document.
060   */
061  public OMSVGDocument getSVGDocument();
062}