001    /*
002     * Licensed to the Apache Software Foundation (ASF) under one
003     * or more contributor license agreements. See the NOTICE file
004     * distributed with this work for additional information
005     * regarding copyright ownership. The ASF licenses this file
006     * to you under the Apache License, Version 2.0 (the  "License");
007     * you may not use this file except in compliance with the License.
008     * You may obtain a copy of the License at
009     *
010     *     http://www.apache.org/licenses/LICENSE-2.0
011     *
012     * Unless required by applicable law or agreed to in writing, software
013     * distributed under the License is distributed on an "AS IS" BASIS,
014     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
015     * See the License for the specific language governing permissions and
016     * limitations under the License.
017     */
018    /*
019     * $Id: XMLNSDecl.java 468643 2006-10-28 06:56:03Z minchau $
020     */
021    package org.apache.xalan.templates;
022    
023    /**
024     * Represents an xmlns declaration
025     */
026    public class XMLNSDecl
027            implements java.io.Serializable // 20001009 jkess
028    {
029        static final long serialVersionUID = 6710237366877605097L;
030    
031      /**
032       * Constructor XMLNSDecl
033       *
034       * @param prefix non-null reference to prefix, using "" for default namespace.
035       * @param uri non-null reference to namespace URI.
036       * @param isExcluded true if this namespace declaration should normally be excluded.
037       */
038      public XMLNSDecl(String prefix, String uri, boolean isExcluded)
039      {
040    
041        m_prefix = prefix;
042        m_uri = uri;
043        m_isExcluded = isExcluded;
044      }
045    
046      /** non-null reference to prefix, using "" for default namespace.
047       *  @serial */
048      private String m_prefix;
049    
050      /**
051       * Return the prefix.
052       * @return The prefix that is associated with this URI, or null
053       * if the XMLNSDecl is declaring the default namespace.
054       */
055      public String getPrefix()
056      {
057        return m_prefix;
058      }
059    
060      /** non-null reference to namespace URI.
061       *  @serial  */
062      private String m_uri;
063    
064      /**
065       * Return the URI.
066       * @return The URI that is associated with this declaration.
067       */
068      public String getURI()
069      {
070        return m_uri;
071      }
072    
073      /** true if this namespace declaration should normally be excluded.
074       *  @serial  */
075      private boolean m_isExcluded;
076    
077      /**
078       * Tell if this declaration should be excluded from the
079       * result namespace.
080       *
081       * @return true if this namespace declaration should normally be excluded.
082       */
083      public boolean getIsExcluded()
084      {
085        return m_isExcluded;
086      }
087    }