Oracle® Fusion Middleware C++ API Reference for Oracle Coherence
12c (12.2.1.1.0)

E69640-01

coherence/run/xml/XmlDocument.hpp

00001 /*
00002 * XmlDocument.hpp
00003 *
00004 * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
00005 *
00006 * Oracle is a registered trademarks of Oracle Corporation and/or its
00007 * affiliates.
00008 *
00009 * This software is the confidential and proprietary information of Oracle
00010 * Corporation. You shall not disclose such confidential and proprietary
00011 * information and shall use it only in accordance with the terms of the
00012 * license agreement you entered into with Oracle.
00013 *
00014 * This notice may not be removed or altered.
00015 */
00016 #ifndef COH_XML_DOCUMENT_HPP
00017 #define COH_XML_DOCUMENT_HPP
00018 
00019 #include "coherence/lang.ns"
00020 
00021 #include "coherence/run/xml/XmlElement.hpp"
00022 
00023 COH_OPEN_NAMESPACE3(coherence,run,xml)
00024 
00025 
00026 /**
00027 * An interface for XML document access.  The XmlDocumnet interface represents
00028 * the document as both the root element (through the underlying XmlElement
00029 * interface) and the properties specific to a document, such as DOCTYPE.
00030 *
00031 * @author js  2007.12.13
00032 */
00033 class COH_EXPORT XmlDocument
00034     : public interface_spec<XmlDocument,
00035         implements<XmlElement> >
00036     {
00037     // ----- XmlDocument interface ------------------------------------------
00038 
00039     public:
00040         /**
00041         * Get the URI of the DTD (DOCTYPE) for the document. This is referred
00042         * to as the System Identifier by the XML specification.
00043         *
00044         * For example:
00045         *   http://java.sun.com/j2ee/dtds/web-app_2_2.dtd
00046         *
00047         * @return the document type URI
00048         */
00049         virtual String::View getDtdUri() const = 0;
00050 
00051         /**
00052         * Set the URI of the DTD (DOCTYPE) for the document. This is referred
00053         * to as the System Identifier by the XML specification.
00054         *
00055         * @param vsUri  the document type URI
00056         */
00057         virtual void setDtdUri(String::View vsUri) = 0;
00058 
00059         /**
00060         * Get the public identifier of the DTD (DOCTYPE) for the document.
00061         *
00062         * For example:
00063         *   -//Sun Microsystems, Inc.//DTD Web Application 1.2//EN
00064         *
00065         * @return the DTD public identifier
00066         */
00067         virtual String::View getDtdName() const = 0;
00068 
00069         /**
00070         * Set the public identifier of the DTD (DOCTYPE) for the document.
00071         *
00072         * @param vsName  the DTD public identifier
00073         */
00074         virtual void setDtdName(String::View vsName) = 0;
00075 
00076         /**
00077         * Get the encoding string for the XML document. Documents that are
00078         * parsed may or may not have the encoding string from the persistent
00079         * form of the document.
00080         *
00081         * @return the encoding set for the document
00082         */
00083         virtual String::View getEncoding() const = 0;
00084 
00085         /**
00086         * Set the encoding string for the XML document.
00087         *
00088         * @param vsEncoding  the encoding that the document will use
00089         */
00090         virtual void setEncoding(String::View vsEncoding) = 0;
00091 
00092         /**
00093         * Get the XML comment that appears outside of the root element. This
00094         * differs from the comment property of this object, which refers to
00095         * the comment within the root element.
00096         *
00097         * @return the document comment
00098         */
00099         virtual String::View getDocumentComment() const = 0;
00100 
00101         /**
00102         * Set the XML comment that appears outside of the root element. This
00103         * differs from the Comment property of this object, which refers to
00104         * the comment within the root element.
00105         *
00106         * @param vsComment  the document comment
00107         */
00108         virtual void setDocumentComment(String::View vsComment) = 0;
00109 
00110         /**
00111         * @return the document as a string
00112         */
00113         virtual String::View getXml() const = 0;
00114     };
00115 
00116 COH_CLOSE_NAMESPACE3
00117 
00118 #endif // COH_XML_DOCUMENT_HPP
Copyright © 2000, 2016, Oracle and/or its affiliates. All rights reserved.