KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > enhydra > kelp > ant > node > AntDocumentNode


1 package org.enhydra.kelp.ant.node;
2
3 //Kelp imports
4
import org.enhydra.kelp.common.node.OtterDocumentNode;
5 import org.enhydra.kelp.common.node.OtterNode;
6 import org.enhydra.kelp.common.PropUtil;
7
8 // Enhydra imports
9
import org.enhydra.xml.xmlc.XMLCException;
10
11 // Standard imports
12
import java.io.IOException JavaDoc;
13
14 /**
15  * <p>Title: </p>
16  * <p>Description: </p>
17  * <p>Copyright: Copyright (c) 2003</p>
18  * <p>Company: </p>
19  * @author Damir Milovic
20  * @version 1.0
21  */

22
23 public class AntDocumentNode extends AntFileNode
24                             implements OtterDocumentNode {
25
26   protected String JavaDoc staticFile = "false";
27
28   public AntDocumentNode(OtterNode n) {
29     super(n);
30   }
31   public AntDocumentNode(OtterNode node,String JavaDoc filePath) {
32     super(node,filePath);
33   }
34
35   // Implements OtterDocumentNode --------------------------------------------
36
/**
37    * Override setSelected() from AntFileNode
38    * @param b
39    */

40   public void setSelected(boolean b) {
41     super.setSelected(b);
42     if (b) {
43         setStatic(false);
44     }
45
46   }
47   public boolean isStatic() {
48     String JavaDoc in = staticFile; // See FIXME above definition of staticFile
49
return PropUtil.stringToBoolean(in, false);
50   }
51   public void setStatic(boolean b) {
52     staticFile = PropUtil.booleanToString(b); //if not selected for XMLC, then it is static resource
53
if (b) {
54         setSelected(false);
55     }
56   }
57   public void preCompile() throws XMLCException, IOException JavaDoc{
58       //We don't need this method becouse Ant is used for compilation
59
throw new java.lang.UnsupportedOperationException JavaDoc("Method preCompile() not implemented.");
60   }
61 }
Popular Tags