01: /**
02: * Copyright (C) 2001-2005 France Telecom R&D
03: */package org.objectweb.speedo.ant.jdo;
04:
05: import java.util.ArrayList;
06:
07: import org.apache.tools.ant.types.DTDLocation;
08: import org.objectweb.speedo.ant.AbstractEnhancerTask;
09: import org.objectweb.speedo.ant.AbstractEnhancerTask.Description;
10: import org.objectweb.speedo.generation.AbstractEnhancer;
11: import org.objectweb.speedo.generation.jdo.JDOEnhancer;
12:
13: public class JDOEnhancerTask extends AbstractEnhancerTask {
14:
15: public AbstractEnhancer getEnhancer() {
16: return new JDOEnhancer();
17: }
18:
19: protected void initDefaultDescPath() {
20: persistdesc.setDir(src);
21: persistdesc.setIncludes("**/*.jdo");
22: }
23:
24: public Description createJdopath() {
25: Description d = new Description();
26: this .persistdesc = d;
27: d.setProject(getProject());
28: return d;
29: }
30:
31: protected void addDtdLocations(ArrayList al) {
32: DTDLocation dljdo = new DTDLocation();
33: dljdo
34: .setPublicId("-//Sun Microsystems, Inc.//DTD Java Data Objects Metadata 1.0//EN");
35: dljdo.setLocation("jdo.dtd");
36: al.add(dljdo);
37: DTDLocation dljdo2 = new DTDLocation();
38: dljdo2
39: .setPublicId("-//Sun Microsystems, Inc.//DTD Java Data Objects Metadata 2.0//EN");
40: dljdo2.setLocation("jdo.dtd");
41: al.add(dljdo2);
42: }
43: }
|