KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > org > apache > xml > internal > security > keys > content > KeyName


1 /*
2  * Copyright 1999-2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */

17 package com.sun.org.apache.xml.internal.security.keys.content;
18
19
20
21 import com.sun.org.apache.xml.internal.security.exceptions.XMLSecurityException;
22 import com.sun.org.apache.xml.internal.security.utils.Constants;
23 import com.sun.org.apache.xml.internal.security.utils.SignatureElementProxy;
24 import org.w3c.dom.Document JavaDoc;
25 import org.w3c.dom.Element JavaDoc;
26
27
28 /**
29  *
30  * @author $Author: raul $
31  */

32 public class KeyName extends SignatureElementProxy implements KeyInfoContent {
33
34    /** {@link java.util.logging} logging facility */
35     static java.util.logging.Logger JavaDoc log =
36         java.util.logging.Logger.getLogger(KeyName.class.getName());
37
38    /**
39     * Constructor KeyName
40     *
41     * @param element
42     * @param BaseURI
43     * @throws XMLSecurityException
44     */

45    public KeyName(Element JavaDoc element, String JavaDoc BaseURI) throws XMLSecurityException {
46       super(element, BaseURI);
47    }
48
49    /**
50     * Constructor KeyName
51     *
52     * @param doc
53     * @param keyName
54     */

55    public KeyName(Document JavaDoc doc, String JavaDoc keyName) {
56
57       super(doc);
58
59       this.addText(keyName);
60    }
61
62    /**
63     * Method getKeyName
64     *
65     * @return key name
66     */

67    public String JavaDoc getKeyName() {
68       return this.getTextFromTextChild();
69    }
70
71    /** @inheritDoc */
72    public String JavaDoc getBaseLocalName() {
73       return Constants._TAG_KEYNAME;
74    }
75 }
76
Popular Tags