|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.kuka.roboticsAPI.controllerModel.sunrise.xml.AbstractDirectoryFactory<T>
T - The type of the items this factory delivers.public abstract class AbstractDirectoryFactory<T>
Base class for factories which load items out of a directory.
| Constructor Summary | |
|---|---|
protected |
AbstractDirectoryFactory(RoboticsAPIContext context)
Only for sublcassing. |
| Method Summary | |
|---|---|
protected abstract T |
createItem(Node node)
Creates an items of the factory out of the given document. |
void |
dispose()
Disposes the factory. |
T |
fromName(String itemName)
Gets the item with the specified name. |
protected abstract String |
getItemName(T item)
Gets the name of the given item. |
protected abstract String[] |
getItemNames()
Gets the tag names to which this factory can create items. |
Iterable<String> |
loadedItems()
Gets the loaded items in this factory. |
void |
loadFromDirectory(String directoryPath)
Loads all xml compound that can be found in the given directory. |
void |
loadFromFile(File file)
Loads the item that is available under the given URL. |
void |
loadFromResource(String resourceName)
Loads the item that is contained in the given resource. |
void |
loadFromURL(URL url)
Loads the item that is available under the given URL. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected AbstractDirectoryFactory(RoboticsAPIContext context)
context - The context of this factory.| Method Detail |
|---|
public final void loadFromDirectory(String directoryPath)
directoryPath - The directory which will be parsed for compounds.public final void loadFromFile(File file)
file - The file.public final void loadFromResource(String resourceName)
resourceName - The resource which will be parsed for the item.public final void loadFromURL(URL url)
url - The URL.public final T fromName(String itemName)
itemName - The name of the item. Must be loaded in the library.
protected abstract String[] getItemNames()
protected abstract String getItemName(T item)
item - The item.
protected abstract T createItem(Node node)
node - The node which contains the icons.
public final Iterable<String> loadedItems()
public final void dispose()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||