KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > openbravo > xmlEngine > AttributeComponentValue


1 /*
2  ************************************************************************************
3  * Copyright (C) 2001-2006 Openbravo S.L.
4  * Licensed under the Apache Software License version 2.0
5  * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
6  * Unless required by applicable law or agreed to in writing, software distributed
7  * under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
8  * CONDITIONS OF ANY KIND, either express or implied. See the License for the
9  * specific language governing permissions and limitations under the License.
10  ************************************************************************************
11 */

12 package org.openbravo.xmlEngine;
13
14 /**
15   Class that store the information of the attributes of the configuration file
16   */

17 class AttributeComponentValue implements XmlComponentValue {
18   protected AttributeComponentTemplate attributeComponentTemplate;
19   // private FieldComponent fieldComponent = null;
20
private FunctionValue functionValue = null;
21   private XmlComponentValue xmlComponentValue = null;
22
23
24   public AttributeComponentValue(AttributeComponentTemplate attributeComponentTemplate, XmlDocument xmlDocument) {
25     this.attributeComponentTemplate = attributeComponentTemplate;
26     if (attributeComponentTemplate.functionTemplate() != null) {
27       functionValue = attributeComponentTemplate.functionTemplate().createFunctionValue(xmlDocument);
28       xmlComponentValue = functionValue;
29     }
30   }
31
32   public String JavaDoc print() {
33     return xmlComponentValue.print();
34   }
35
36   public String JavaDoc printPrevious() {
37     return xmlComponentValue.printPrevious();
38   }
39
40   public String JavaDoc printSimple() {
41     return xmlComponentValue.printSimple();
42   }
43
44   public String JavaDoc printPreviousSimple() {
45     return xmlComponentValue.printPreviousSimple();
46   }
47
48 }
49
Popular Tags