View Javadoc
1 package com.bonevich.erj.app; 2 3 import java.io.InputStream; 4 import java.io.OutputStream; 5 import java.io.IOException; 6 7 public abstract class ProjectComponent 8 { 9 ////////////////////////////////////////////////////////// 10 // Constants - well known component types: 11 public static final String ERJ = "erj"; 12 public static final String XMI = "xmi"; 13 public static final String SVG = "svg"; 14 public static final String HTML = "html"; 15 public static final String TEXT = "txt"; 16 public static final String XML = "xml"; 17 public static final String DTD = "dtd"; 18 public static final String OTHER = "misc"; 19 20 ////////////////////////////////////////////////////////// 21 // Attributes 22 protected Project _project; 23 protected String _type; 24 protected String _entryFilename; 25 26 ////////////////////////////////////////////////////////// 27 // Constructors 28 public ProjectComponent(Project project) 29 { 30 _project = project; 31 } 32 33 public Project getProject() 34 { 35 return _project; 36 } 37 38 public String getType() 39 { 40 return _type; 41 } 42 public void setType(String type) 43 { 44 _type = type; 45 } 46 47 public abstract String getEntryExtension(); 48 public abstract void initEntryFilename(); 49 50 public String getEntryFilename() 51 { 52 return _entryFilename; 53 } 54 55 /*** 56 * Set the entry filename for this component in the project file. 57 * Really, this method is only ever called by the project loader. 58 */ 59 public void setEntryFilename(String name) 60 { 61 _entryFilename = name; 62 } 63 64 public abstract void load(InputStream in) throws IOException; 65 public abstract void save(OutputStream out) throws IOException; 66 67 } /*** end class ProjectComponent */

This page was automatically generated by Maven