KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > opencms > xml > types > I_CmsXmlContentValue


1 /*
2  * File : $Source: /usr/local/cvs/opencms/src/org/opencms/xml/types/I_CmsXmlContentValue.java,v $
3  * Date : $Date: 2006/03/27 14:53:03 $
4  * Version: $Revision: 1.16 $
5  *
6  * This library is part of OpenCms -
7  * the Open Source Content Mananagement System
8  *
9  * Copyright (c) 2005 Alkacon Software GmbH (http://www.alkacon.com)
10  *
11  * This library is free software; you can redistribute it and/or
12  * modify it under the terms of the GNU Lesser General Public
13  * License as published by the Free Software Foundation; either
14  * version 2.1 of the License, or (at your option) any later version.
15  *
16  * This library is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19  * Lesser General Public License for more details.
20  *
21  * For further information about Alkacon Software GmbH, please see the
22  * company website: http://www.alkacon.com
23  *
24  * For further information about OpenCms, please see the
25  * project website: http://www.opencms.org
26  *
27  * You should have received a copy of the GNU Lesser General Public
28  * License along with this library; if not, write to the Free Software
29  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
30  */

31
32 package org.opencms.xml.types;
33
34 import org.opencms.file.CmsObject;
35 import org.opencms.xml.I_CmsXmlDocument;
36
37 import java.util.Locale JavaDoc;
38
39 import org.dom4j.Element;
40
41 /**
42  * Provides access to the value of a specific XML content node.<p>
43  *
44  * @author Alexander Kandzior
45  *
46  * @version $Revision: 1.16 $
47  *
48  * @since 6.0.0
49  */

50 public interface I_CmsXmlContentValue extends I_CmsXmlSchemaType {
51
52     /**
53      * Returns the XML content instance this value belongs to.<p>
54      *
55      * @return the XML content instance this value belongs to
56      */

57     I_CmsXmlDocument getDocument();
58
59     /**
60      * Returns the original XML element of this XML content value.<p>
61      *
62      * @return the original XML element of this XML content value
63      */

64     Element getElement();
65
66     /**
67      * Returns the node index of this XML content value in the source XML document,
68      * starting with 0.<p>
69      *
70      * This is usefull in case there are more then one elements
71      * with the same XML node name in the source XML document.<p>
72      *
73      * @return the index of this XML content node in the source document
74      */

75     int getIndex();
76
77     /**
78      * Returns the locale of this XML content value was generated for.<p>
79      *
80      * @return the locale of this XML content value was generated for
81      */

82     Locale JavaDoc getLocale();
83
84     /**
85      * Returns the total number of XML elements of this type that currently exist in the source document.<p>
86      *
87      * @return the total number of XML elements of this type that currently exist in the source document
88      */

89     int getMaxIndex();
90
91     /**
92      * Returns the path of this XML content value in the source document.<p>
93      *
94      * @return the path of this XML content value in the source document
95      */

96     String JavaDoc getPath();
97
98     /**
99      * Returns the value of this XML content node as a plain text String.<p>
100      *
101      * Plain text in this context means a pure textual representation
102      * of the content (i.e. without html tags).
103      * The plain text may be <code>null</code>, too, if there is no sound or useful
104      * textual representation (i.e. color values).<p>
105      *
106      * @param cms an initialized instance of a CmsObject
107      *
108      * @return the value of this XML content node as a plain text String
109      */

110     String JavaDoc getPlainText(CmsObject cms);
111
112     /**
113      * Returns the value of this XML content node as a String.<p>
114      *
115      * @param cms an initialized instance of a CmsObject
116      *
117      * @return the value of this XML content node as a String
118      */

119     String JavaDoc getStringValue(CmsObject cms);
120
121     /**
122      * Moves this XML content value one position down in the source document, if possible.<p>
123      *
124      * If the XML content value is already the first in it's sequence, it is not moved.<p>
125      */

126     void moveDown();
127
128     /**
129      * Moves this XML content value one position up in the source document, if possible.<p>
130      *
131      * If the XML content value is already the last in it's sequence, it is not moved.<p>
132      */

133     void moveUp();
134
135     /**
136      * Sets the provided String as value of this XML content node.<p>
137      *
138      * This method does provide processing of the content based on the
139      * users current OpenCms context. This can be used e.g. for link
140      * extraction and replacement in the content.<p>
141      *
142      * @param cms an initialized instance of a CmsObject
143      * @param value the value to set
144      *
145      */

146     void setStringValue(CmsObject cms, String JavaDoc value);
147 }
Popular Tags