|
|||||||||||||||||||
| Source file | Conditionals | Statements | Methods | TOTAL | |||||||||||||||
| ProcessingInstruction.java | - | - | - | - |
|
||||||||||||||
| 1 | /* | |
| 2 | * Copyright 2001-2004 (C) MetaStuff, Ltd. All Rights Reserved. | |
| 3 | * | |
| 4 | * This software is open source. | |
| 5 | * See the bottom of this file for the licence. | |
| 6 | * | |
| 7 | * $Id: ProcessingInstruction.java,v 1.8 2004/06/25 12:34:47 maartenc Exp $ | |
| 8 | */ | |
| 9 | ||
| 10 | package org.dom4j; | |
| 11 | ||
| 12 | import java.util.Map; | |
| 13 | ||
| 14 | /** <p><code>ProcessingInstruction</code> defines an XML processing instruction. | |
| 15 | * The {@link Node#getName} method will return the target of the PI and the | |
| 16 | * {@link Node#getText} method will return the data from all of the instructions. | |
| 17 | * </p> | |
| 18 | * | |
| 19 | * @author <a href="mailto:james.strachan@metastuff.com">James Strachan</a> | |
| 20 | * @version $Revision: 1.8 $ | |
| 21 | */ | |
| 22 | public interface ProcessingInstruction extends Node { | |
| 23 | ||
| 24 | /** This method is the equivalent to the {@link #getName} | |
| 25 | * method. It is added for clarity. | |
| 26 | * | |
| 27 | * @return the target of this PI | |
| 28 | */ | |
| 29 | public String getTarget(); | |
| 30 | ||
| 31 | /** This method is the equivalent to the {@link #setName} | |
| 32 | * method. It is added for clarity. | |
| 33 | */ | |
| 34 | public void setTarget(String target); | |
| 35 | ||
| 36 | /** @return the text for all the data associated with | |
| 37 | * the processing instruction | |
| 38 | */ | |
| 39 | public String getText(); | |
| 40 | ||
| 41 | /** <p>Returns the value of a specific name in the PI.</p> | |
| 42 | * | |
| 43 | * @param name is the name of the attribute to lookup. | |
| 44 | * @return the value of the named attribute | |
| 45 | */ | |
| 46 | public String getValue(String name); | |
| 47 | ||
| 48 | /** @return the values for this processing instruction as | |
| 49 | * a Map | |
| 50 | */ | |
| 51 | public Map getValues(); | |
| 52 | ||
| 53 | public void setValue(String name, String value); | |
| 54 | public void setValues(Map data); | |
| 55 | public boolean removeValue(String name); | |
| 56 | ||
| 57 | } | |
| 58 | ||
| 59 | ||
| 60 | ||
| 61 | ||
| 62 | ||
| 63 | ||
| 64 | /* | |
| 65 | * Redistribution and use of this software and associated documentation | |
| 66 | * ("Software"), with or without modification, are permitted provided | |
| 67 | * that the following conditions are met: | |
| 68 | * | |
| 69 | * 1. Redistributions of source code must retain copyright | |
| 70 | * statements and notices. Redistributions must also contain a | |
| 71 | * copy of this document. | |
| 72 | * | |
| 73 | * 2. Redistributions in binary form must reproduce the | |
| 74 | * above copyright notice, this list of conditions and the | |
| 75 | * following disclaimer in the documentation and/or other | |
| 76 | * materials provided with the distribution. | |
| 77 | * | |
| 78 | * 3. The name "DOM4J" must not be used to endorse or promote | |
| 79 | * products derived from this Software without prior written | |
| 80 | * permission of MetaStuff, Ltd. For written permission, | |
| 81 | * please contact dom4j-info@metastuff.com. | |
| 82 | * | |
| 83 | * 4. Products derived from this Software may not be called "DOM4J" | |
| 84 | * nor may "DOM4J" appear in their names without prior written | |
| 85 | * permission of MetaStuff, Ltd. DOM4J is a registered | |
| 86 | * trademark of MetaStuff, Ltd. | |
| 87 | * | |
| 88 | * 5. Due credit should be given to the DOM4J Project - | |
| 89 | * http://www.dom4j.org | |
| 90 | * | |
| 91 | * THIS SOFTWARE IS PROVIDED BY METASTUFF, LTD. AND CONTRIBUTORS | |
| 92 | * ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT | |
| 93 | * NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND | |
| 94 | * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL | |
| 95 | * METASTUFF, LTD. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, | |
| 96 | * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | |
| 97 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
| 98 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
| 99 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | |
| 100 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
| 101 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | |
| 102 | * OF THE POSSIBILITY OF SUCH DAMAGE. | |
| 103 | * | |
| 104 | * Copyright 2001-2004 (C) MetaStuff, Ltd. All Rights Reserved. | |
| 105 | * | |
| 106 | * $Id: ProcessingInstruction.java,v 1.8 2004/06/25 12:34:47 maartenc Exp $ | |
| 107 | */ |
|
||||||||||