|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.xml.sax.helpers.DefaultHandler
se.kmr.scam.client.http.util.ViewConfigParser
View configuration parser.
The configuration file ("views.xml") must made available either in classpath, $JAVA_HOME/lib or in the jar-file.
Example of preference
configuration XML contents:
<views beanName="beanName">
<!-- Edit configuration -->
<editViews>
<view name="foo">
<form value="form.xml"/>
<query value="query.xml"/>
<page value="page.jsp"/>
<external value="ontology.xml"/>
</view>
</editViews>
<!-- Pages configuration -->
<staticViews>
<view name="foo">
<page value="page.jsp"/>
</view>
</staticViews>
</views>
Constructor Summary | |
ViewConfigParser()
|
Method Summary | |
void |
endElement(String namespaceURI,
String localName,
String qName)
Handles the ending of an element |
String |
getBeanName()
Gets current preferences bean name for application scope attribute. |
HashMap |
getEditViewsConfiguration()
Gets current editable views configuration. |
HashMap |
getStaticViewConfiguration()
Gets current queeries map. |
void |
parse()
|
void |
parse(InputStream is)
Parse the given input stream. |
void |
parse(String filename)
Parses the given XML-file. |
void |
startElement(String namespaceURI,
String localName,
String qName,
Attributes atts)
Receives notifiacation of the start of an element. |
Methods inherited from class org.xml.sax.helpers.DefaultHandler |
characters, endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ViewConfigParser()
Method Detail |
public void parse(String filename)
filename
- public void parse(InputStream is)
is
- Parse this stream.public void parse()
public String getBeanName()
public HashMap getEditViewsConfiguration()
public HashMap getStaticViewConfiguration()
public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException
localName
- - The local name (without prefix), or the empty string if Namespace processing is not being performed.qName
- - The qualified name (with prefix), or the empty string if qualified names are not available.atts
- - The attributes attached to the element. If there are no attributes, it shall be an empty Attributes object.
SAXException
public void endElement(String namespaceURI, String localName, String qName) throws SAXException
namespaceURI
- The namespace of the elementlocalName
- The local name of the elementqName
- The element name
SAXException
- thrown in case of missmatch in configuration
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |