| org.archive.crawler.settings.Type org.archive.crawler.settings.ComplexType org.archive.crawler.settings.MapType
MapType | public class MapType extends ComplexType (Code) | | This class represents a container of settings.
This class is usually used to make it possible to have a dynamic number
of ModuleTypes like for instance a list of filters of different type.
When this type is overridden on a per domain basis, the following
restrictions apply:
- Added elements is placed after the elements in the map it overrides.
- You can not remove elements from the map it overrides. If it is
necessary to be able to remove an element, this has to be done by
adding some disable feature to the modules referenced by the map. An
example of this is the enabled attribute on the
org.archive.crawler.framework.Filter class.
- All elements defined in maps that this map overrides might have their
settings changed, but the order can not be changed.
author: John Erik Halse |
Method Summary | |
public void | addConstraint(Constraint constraint) | public Type | addElement(CrawlerSettings settings, Type element) Add a new element to this map.
Parameters: settings - the settings object for this method to have effect. Parameters: element - the element to be added. | FailedCheck | checkValue(CrawlerSettings settings, String attributeName, Type definition, Object value) | public List | getConstraints() | public Class | getContentType() Get the content type allowed for this map. | Type | getDefinition(String attributeName) Get the content type definition for attributes of this map.
Parameters: attributeName - since all attributes of a map are of the same type,this value is not used. | public boolean | isEmpty(Object context) Returns true if this map is empty.
Parameters: context - the settings object for which this set of elementsare valid. | public boolean | moveElementDown(CrawlerSettings settings, String name) Move an attribute down one place in the list.
Parameters: settings - the settings object for which this method has effect. Parameters: name - name of attribute to move. | public boolean | moveElementUp(CrawlerSettings settings, String name) Move an attribute up one place in the list.
Parameters: settings - the settings object for which this method has effect. Parameters: name - name of attribute to move. | public Object | removeElement(CrawlerSettings settings, String name) Remove an attribute from the map.
Parameters: settings - the settings object for which this method has effect. Parameters: name - name of the attribute to remove. | public int | size(Object context) Get the number of elements in this map.
Parameters: context - the settings object for which this set of elementsare valid. |
MapType | public MapType(String name, String description)(Code) | | Construct a new MapType object.
Parameters: name - the name of this element. Parameters: description - the description of the attribute. |
MapType | public MapType(String name, String description, Class type)(Code) | | Construct a new MapType object.
Parameters: name - the name of this element. Parameters: description - the description of the attribute. Parameters: type - the type allowed for this map |
getContentType | public Class getContentType()(Code) | | Get the content type allowed for this map.
the content type allowed for this map. |
getDefinition | Type getDefinition(String attributeName)(Code) | | Get the content type definition for attributes of this map.
Parameters: attributeName - since all attributes of a map are of the same type,this value is not used. the content type definition for attributes of this map. |
isEmpty | public boolean isEmpty(Object context)(Code) | | Returns true if this map is empty.
Parameters: context - the settings object for which this set of elementsare valid. true if this map is empty. |
moveElementDown | public boolean moveElementDown(CrawlerSettings settings, String name) throws AttributeNotFoundException(Code) | | Move an attribute down one place in the list.
Parameters: settings - the settings object for which this method has effect. Parameters: name - name of attribute to move. true if attribute was moved, false if attribute was alreadyat bottom. throws: AttributeNotFoundException - is thrown if there is no attributewith the submitted name. |
moveElementUp | public boolean moveElementUp(CrawlerSettings settings, String name) throws AttributeNotFoundException(Code) | | Move an attribute up one place in the list.
Parameters: settings - the settings object for which this method has effect. Parameters: name - name of attribute to move. true if attribute was moved, false if attribute was alreadyat the top. throws: AttributeNotFoundException - is thrown if there is no attributewith the submitted name. |
size | public int size(Object context)(Code) | | Get the number of elements in this map.
Parameters: context - the settings object for which this set of elementsare valid. the number of elements in this map. |
Methods inherited from org.archive.crawler.settings.ComplexType | public Type addElement(CrawlerSettings settings, Type type) throws InvalidAttributeValueException(Code)(Java Doc) public Type addElementToDefinition(Type type)(Code)(Java Doc) public FailedCheck checkValue(CrawlerSettings settings, String attributeName, Object value)(Code)(Java Doc) FailedCheck checkValue(CrawlerSettings settings, String attributeName, Type definition, Object value)(Code)(Java Doc) public void earlyInitialize(CrawlerSettings settings)(Code)(Java Doc) public String getAbsoluteName()(Code)(Java Doc) public Object getAttribute(String name) throws AttributeNotFoundException, MBeanException, ReflectionException(Code)(Java Doc) public Object getAttribute(String name, CrawlURI uri) throws AttributeNotFoundException(Code)(Java Doc) public Object getAttribute(Object context, String name) throws AttributeNotFoundException(Code)(Java Doc) public MBeanAttributeInfo getAttributeInfo(CrawlerSettings settings, String name)(Code)(Java Doc) public MBeanAttributeInfo getAttributeInfo(String name)(Code)(Java Doc) public MBeanAttributeInfoIterator getAttributeInfoIterator(Object context)(Code)(Java Doc) public AttributeList getAttributes(String[] name)(Code)(Java Doc) protected DataContainer getDataContainerRecursive(Context context)(Code)(Java Doc) protected DataContainer getDataContainerRecursive(Context context, String key) throws AttributeNotFoundException(Code)(Java Doc) public Object getDefaultValue()(Code)(Java Doc) Type getDefinition(String attributeName)(Code)(Java Doc) public String getDescription()(Code)(Java Doc) public Type getElementFromDefinition(String name)(Code)(Java Doc) public Object[] getLegalValues()(Code)(Java Doc) public Object getLocalAttribute(CrawlerSettings settings, String name) throws AttributeNotFoundException(Code)(Java Doc) public MBeanInfo getMBeanInfo()(Code)(Java Doc) public MBeanInfo getMBeanInfo(Object context)(Code)(Java Doc) public ComplexType getParent()(Code)(Java Doc) protected String[] getPreservedFields()(Code)(Java Doc) Context getSettingsFromObject(Object o, String attributeName)(Code)(Java Doc) Context getSettingsFromObject(Object o)(Code)(Java Doc) public SettingsHandler getSettingsHandler()(Code)(Java Doc) public Object getUncheckedAttribute(Object context, String name)(Code)(Java Doc) public Object getValue()(Code)(Java Doc) public CrawlerSettings globalSettings()(Code)(Java Doc) public Object invoke(String arg0, Object[] arg1, String[] arg2) throws MBeanException, ReflectionException(Code)(Java Doc) public boolean isInitialized()(Code)(Java Doc) public boolean isOverridden(CrawlerSettings settings, String name) throws AttributeNotFoundException(Code)(Java Doc) public Iterator iterator(Object context)(Code)(Java Doc) protected Type removeElementFromDefinition(String name)(Code)(Java Doc) protected void setAsOrder(SettingsHandler settingsHandler) throws InvalidAttributeValueException(Code)(Java Doc) final public synchronized void setAttribute(Attribute attribute) throws AttributeNotFoundException, InvalidAttributeValueException, MBeanException, ReflectionException(Code)(Java Doc) final public synchronized void setAttribute(CrawlerSettings settings, Attribute attribute) throws InvalidAttributeValueException, AttributeNotFoundException(Code)(Java Doc) public AttributeList setAttributes(AttributeList attributes)(Code)(Java Doc) public void setDescription(String string)(Code)(Java Doc) protected void setPreservedFields(String[] preservedFields)(Code)(Java Doc) public String toString()(Code)(Java Doc) public Object unsetAttribute(CrawlerSettings settings, String name) throws AttributeNotFoundException(Code)(Java Doc)
|
|
|