jp.ne.dti.lares.foozy.sasax.rss
Class EnsureAttribute
java.lang.Object
|
+--jp.ne.dti.lares.foozy.sasax.rss.EnsureAttribute
- All Implemented Interfaces:
- jp.ne.dti.lares.foozy.sasax.Notification
- Direct Known Subclasses:
- EnsureRDFAbout, EnsureRDFResource
- public class EnsureAttribute
- extends java.lang.Object
- implements jp.ne.dti.lares.foozy.sasax.Notification
Ensure specified attribute in "startElement" event.
This class examines whether attributes in "startElement" event has
the attribute specified at construction time of this.
If not so, this throws SAXException
.
- Author:
- FUJIWARA Katsunori <foozy@lares.dti.ne.jp>(code/doc)
Constructor Summary |
EnsureAttribute(java.lang.String uri,
java.lang.String lName)
Constructor. |
Method Summary |
void |
elementEnded(jp.ne.dti.lares.foozy.sasax.Element element,
jp.ne.dti.lares.foozy.sasax.ParseContext context)
Invoked when target element is "ended". |
void |
elementStarted(jp.ne.dti.lares.foozy.sasax.Element element,
jp.ne.dti.lares.foozy.sasax.ParseContext context,
org.xml.sax.Attributes attributes)
Invoked when target element is "started". |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EnsureAttribute
public EnsureAttribute(java.lang.String uri,
java.lang.String lName)
- Constructor.
- Parameters:
uri
- of attribute to be ensuredlName
- of attribute to be ensured
elementStarted
public void elementStarted(jp.ne.dti.lares.foozy.sasax.Element element,
jp.ne.dti.lares.foozy.sasax.ParseContext context,
org.xml.sax.Attributes attributes)
throws org.xml.sax.SAXException
- Invoked when target element is "started".
This examines whether attributes has
the attribute specified at construction time or not.
- Specified by:
elementStarted
in interface jp.ne.dti.lares.foozy.sasax.Notification
- Parameters:
element
- which is startedcontext
- of SAX document parsing.attrs
- given by "startElement" SAX event.
elementEnded
public void elementEnded(jp.ne.dti.lares.foozy.sasax.Element element,
jp.ne.dti.lares.foozy.sasax.ParseContext context)
throws org.xml.sax.SAXException
- Invoked when target element is "ended".
This does nothing.
- Specified by:
elementEnded
in interface jp.ne.dti.lares.foozy.sasax.Notification
- Parameters:
element
- which is endedcontext
- of SAX document parsing.