com.kuka.roboticsAPI.controllerModel.sunrise.xml
Class AbstractDirectoryFactory<T>

java.lang.Object
  extended by com.kuka.roboticsAPI.controllerModel.sunrise.xml.AbstractDirectoryFactory<T>
Type Parameters:
T - The type of the items this factory delivers.
Direct Known Subclasses:
XmlSPRFactory

public abstract class AbstractDirectoryFactory<T>
extends Object

Base class for factories which load items out of a directory.

This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

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

AbstractDirectoryFactory

protected AbstractDirectoryFactory(RoboticsAPIContext context)
Only for sublcassing.

Parameters:
context - The context of this factory.
Method Detail

loadFromDirectory

public final void loadFromDirectory(String directoryPath)
Loads all xml compound that can be found in the given directory.

Parameters:
directoryPath - The directory which will be parsed for compounds.
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

loadFromFile

public final void loadFromFile(File file)
Loads the item that is available under the given URL.

Parameters:
file - The file.
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

loadFromResource

public final void loadFromResource(String resourceName)
Loads the item that is contained in the given resource.

Parameters:
resourceName - The resource which will be parsed for the item.
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

loadFromURL

public final void loadFromURL(URL url)
Loads the item that is available under the given URL.

Parameters:
url - The URL.
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

fromName

public final T fromName(String itemName)
Gets the item with the specified name.

Parameters:
itemName - The name of the item. Must be loaded in the library.
Returns:
The loaded item.
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

getItemNames

protected abstract String[] getItemNames()
Gets the tag names to which this factory can create items.

Returns:
The names.

getItemName

protected abstract String getItemName(T item)
Gets the name of the given item.

Parameters:
item - The item.
Returns:
the name of the item.

createItem

protected abstract T createItem(Node node)
Creates an items of the factory out of the given document.

Parameters:
node - The node which contains the icons.
Returns:
The created item.

loadedItems

public final Iterable<String> loadedItems()
Gets the loaded items in this factory.

Returns:
The loaded items in this factory.
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

dispose

public final void dispose()
Disposes the factory. All loaded compounds will be deleted.

This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.


Copyright © 2019. All rights reserved.