Source Code Cross Referenced for Name.java in  » 6.0-JDK-Core » xml » javax » xml » soap » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Home
Java Source Code / Java Documentation
1.6.0 JDK Core
2.6.0 JDK Modules
3.6.0 JDK Modules com.sun
4.6.0 JDK Modules com.sun.java
5.6.0 JDK Modules sun
6.6.0 JDK Platform
7.Ajax
8.Apache Harmony Java SE
9.Aspect oriented
10.Authentication Authorization
11.Blogger System
12.Build
13.Byte Code
14.Cache
15.Chart
16.Chat
17.Code Analyzer
18.Collaboration
19.Content Management System
20.Database Client
21.Database DBMS
22.Database JDBC Connection Pool
23.Database ORM
24.Development
25.EJB Server
26.ERP CRM Financial
27.ESB
28.Forum
29.Game
30.GIS
31.Graphic 3D
32.Graphic Library
33.Groupware
34.HTML Parser
35.IDE
36.IDE Eclipse
37.IDE Netbeans
38.Installer
39.Internationalization Localization
40.Inversion of Control
41.Issue Tracking
42.J2EE
43.J2ME
44.JBoss
45.JMS
46.JMX
47.Library
48.Mail Clients
49.Music
50.Net
51.Parser
52.PDF
53.Portal
54.Profiler
55.Project Management
56.Report
57.RSS RDF
58.Rule Engine
59.Science
60.Scripting
61.Search Engine
62.Security
63.Sevlet Container
64.Source Control
65.Swing Library
66.Template Engine
67.Test Coverage
68.Testing
69.UML
70.Web Crawler
71.Web Framework
72.Web Mail
73.Web Server
74.Web Services
75.Web Services apache cxf 2.2.6
76.Web Services AXIS2
77.Wiki Engine
78.Workflow Engines
79.XML
80.XML UI
Java Source Code / Java Documentation » 6.0 JDK Core » xml » javax.xml.soap 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001        /*
002         * $Id: Name.java,v 1.3 2004/04/02 01:24:17 ofung Exp $
003         * $Revision: 1.3 $
004         * $Date: 2004/04/02 01:24:17 $
005         */
006
007        /*
008         * Copyright 2005-2006 Sun Microsystems, Inc.  All Rights Reserved.
009         * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
010         *
011         * This code is free software; you can redistribute it and/or modify it
012         * under the terms of the GNU General Public License version 2 only, as
013         * published by the Free Software Foundation.  Sun designates this
014         * particular file as subject to the "Classpath" exception as provided
015         * by Sun in the LICENSE file that accompanied this code.
016         *
017         * This code is distributed in the hope that it will be useful, but WITHOUT
018         * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
019         * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
020         * version 2 for more details (a copy is included in the LICENSE file that
021         * accompanied this code).
022         *
023         * You should have received a copy of the GNU General Public License version
024         * 2 along with this work; if not, write to the Free Software Foundation,
025         * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
026         *
027         * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
028         * CA 95054 USA or visit www.sun.com if you need additional information or
029         * have any questions.
030         */
031        package javax.xml.soap;
032
033        /**
034         * A representation of an XML name.  This interface provides methods for
035         * getting the local and namespace-qualified names and also for getting the
036         * prefix associated with the namespace for the name. It is also possible 
037         * to get the URI of the namespace.
038         * <P>
039         * The following is an example of a namespace declaration in an element.
040         * <PRE>
041         *   &lt;wombat:GetLastTradePrice xmlns:wombat="http://www.wombat.org/trader"&gt;
042         * </PRE>
043         * ("xmlns" stands for "XML namespace".)
044         * The following 
045         * shows what the methods in the <code>Name</code> interface will return.
046         * <UL>
047         *  <LI><code>getQualifiedName</code> will return "prefix:LocalName" =
048         *      "WOMBAT:GetLastTradePrice"
049         *  <LI><code>getURI</code> will return "http://www.wombat.org/trader"
050         *  <LI><code>getLocalName</code> will return "GetLastTracePrice"
051         *  <LI><code>getPrefix</code> will return "WOMBAT"
052         * </UL>
053         * <P>
054         * XML namespaces are used to disambiguate SOAP identifiers from
055         * application-specific identifiers.
056         * <P>
057         * <code>Name</code> objects are created using the method
058         * <code>SOAPEnvelope.createName</code>, which has two versions.
059         * One method creates <code>Name</code> objects with
060         * a local name, a namespace prefix, and a namespace URI. 
061         *  and the second creates <code>Name</code> objects with just a local name.  
062         * The following line of
063         * code, in which <i>se</i> is a <code>SOAPEnvelope</code> object, creates a new
064         * <code>Name</code> object with all three.
065         * <PRE>
066         *     Name name = se.createName("GetLastTradePrice", "WOMBAT",
067         *                                "http://www.wombat.org/trader");
068         * </PRE>
069         * The following line of code gives an example of how a <code>Name</code> object
070         * can be used. The variable <i>element</i> is a <code>SOAPElement</code> object.
071         * This code creates a new <code>SOAPElement</code> object with the given name and
072         * adds it to <i>element</i>.
073         * <PRE>
074         *     element.addChildElement(name);
075         * </PRE>
076         * <P>
077         * The <code>Name</code> interface may be deprecated in a future release of SAAJ
078         * in favor of <code>javax.xml.namespace.QName</code>
079         * @see SOAPEnvelope#createName(String, String, String) SOAPEnvelope.createName
080         * @see SOAPFactory#createName(String, String, String) SOAPFactory.createName
081         */
082        public interface Name {
083            /**
084             * Gets the local name part of the XML name that this <code>Name</code>
085             * object represents. 
086             *
087             * @return a string giving the local name
088             */
089            String getLocalName();
090
091            /**
092             * Gets the namespace-qualified name of the XML name that this 
093             * <code>Name</code> object represents. 
094             *
095             * @return the namespace-qualified name as a string
096             */
097            String getQualifiedName();
098
099            /**
100             * Returns the prefix that was specified when this <code>Name</code> object
101             * was initialized. This prefix is associated with the namespace for the XML
102             * name that this <code>Name</code> object represents. 
103             *
104             * @return the prefix as a string
105             */
106            String getPrefix();
107
108            /**
109             * Returns the URI of the namespace for the XML
110             * name that this <code>Name</code> object represents. 
111             *
112             * @return the URI as a string
113             */
114            String getURI();
115        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.