|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjava.util.Dictionary
java.util.Hashtable
maiolum.xml.TemplatesPool
"Set"-like container for Templates instanced.
This class extends standard Hashtable for
storing (ID, Template) pairs.
However, the storage is implemented in following manner:
the pairs should be added to the pool using the
add() methods -
when in pool already exists a Templates object associated
with specified ID, this object is returned by the
add() method
(i. e. no new Template object is created);.
If it is required to reassign a Template object to
given ID in the pool, either methods remove()()
followed by add()
method should be used, or you can use the Hashtable
put()
method.
| Constructor Summary | |
TemplatesPool()
Constructs new empty TemplatesPool. |
|
| Method Summary | |
javax.xml.transform.Templates |
add(java.lang.String ID,
java.lang.String xslID)
Adds new Templates - based on the
URI given in the first parameter - to the pool, with ID
as the key. |
javax.xml.transform.Templates |
add(java.lang.String ID,
javax.xml.transform.Templates t)
Adds new Templates - the pool, with ID
as the key. |
void |
clear()
Removes all objects from the pool. |
boolean |
containsURI(java.lang.String URI)
Checks, if any Templates based on the file
with String URI parameter is in the pool. |
javax.xml.transform.Templates |
get(java.lang.String ID)
Returns Template with given ID from the pool. |
static void |
main(java.lang.String[] args)
|
javax.xml.transform.Templates |
remove(java.lang.String ID)
Removes the Template with given ID from the pool, if such Template exists. |
| Methods inherited from class java.util.Hashtable |
clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, put, putAll, remove, size, toString, values |
| Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public TemplatesPool()
TemplatesPool.
| Method Detail |
public javax.xml.transform.Templates add(java.lang.String ID,
java.lang.String xslID)
throws ParseException
Templates - based on the
URI given in the first parameter - to the pool, with ID
as the key. The Template is based
on the XSLT template located in the file specified
by the second String parameter.
ParseException
public javax.xml.transform.Templates add(java.lang.String ID,
javax.xml.transform.Templates t)
throws ParseException
Templates - the pool, with ID
as the key.
ParseExceptionpublic javax.xml.transform.Templates get(java.lang.String ID)
null if no Template associated with given ID exists
in pool.
java.lang.NullPointerException - if String argument is null.public javax.xml.transform.Templates remove(java.lang.String ID)
null, if no such Template existed.public void clear()
public boolean containsURI(java.lang.String URI)
Templates based on the file
with String URI parameter is in the pool.
true if there is Templates
with given URL; false otherwise.
public static void main(java.lang.String[] args)
throws java.lang.Exception
java.lang.Exception
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||