|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.patterncoder.source.PatternFileReaderDom
public class PatternFileReaderDom
Reads in xml files, using the DOM xml parser. Implements the PatternFileReader interface providing methods for retrieving pattern related data from file.
| Constructor Summary | |
|---|---|
PatternFileReaderDom()
Creates new instance of PatternFileReaderDom. |
|
PatternFileReaderDom(javax.xml.parsers.DocumentBuilder parser)
Creates new instance of PatternFileReaderDom. |
|
| Method Summary | |
|---|---|
java.util.HashMap<java.lang.Object,PatternClass> |
getPatternComponents()
Creates a list of PatternClass objects which have been created using the "class" data from the parsed file. |
java.lang.String |
getPatternDesc()
Returns the description of the pattern from the associated pattern file |
java.lang.String |
getPatternImage()
Returns the image file name of the pattern from the associated pattern file |
java.lang.String |
getPatternName()
Returns the name of the pattern from the associated pattern file |
java.util.List<WizardPanelDescriptor> |
getWizardDescriptors(Wizard parent,
PatternModel model)
Creates a list of WizardPanelDescriptor objects associated with the pattern source file being read in. |
void |
parseFile(java.io.File sourceFile)
Calls the parse method from the instantiated parser object on the supplied source file. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PatternFileReaderDom()
throws PatternCoderException
Automatically creates a new parser object from the DOM factory methods.
PatternCoderExceptionpublic PatternFileReaderDom(javax.xml.parsers.DocumentBuilder parser)
Allows the parser to be set.
parser - The parser object to use to parse pattern files.| Method Detail |
|---|
public void parseFile(java.io.File sourceFile)
throws java.io.IOException,
org.xml.sax.SAXException
Generates a DOM tree object used by the other methods to retrieve information about the patterns. The parseFile method must be called prior to calling any other methods.
parseFile in interface PatternFileReadersourceFile - The input file to be parsed(XML).
java.io.IOException - Thrown if file does not exist.
org.xml.sax.SAXExceptionpublic java.lang.String getPatternName()
getPatternName in interface PatternFileReaderpublic java.lang.String getPatternDesc()
getPatternDesc in interface PatternFileReaderpublic java.lang.String getPatternImage()
getPatternImage in interface PatternFileReaderpublic java.util.HashMap<java.lang.Object,PatternClass> getPatternComponents()
getPatternComponents in interface PatternFileReaderPatternClass
public java.util.List<WizardPanelDescriptor> getWizardDescriptors(Wizard parent,
PatternModel model)
getWizardDescriptors in interface PatternFileReadermodel - the current data model.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||