org.eclipse.actf.validation.doc.rulebase
Class ValidationDocumentRuleBaseMetadata

java.lang.Object
  extended by org.eclipse.actf.validation.doc.rulebase.ValidationDocumentRuleBaseMetadata
All Implemented Interfaces:
IDocumentRuleBaseMetadata, IRuleBaseMetadata

public class ValidationDocumentRuleBaseMetadata
extends Object
implements IDocumentRuleBaseMetadata


Field Summary
 
Fields inherited from interface org.eclipse.actf.validation.rulebase.IDocumentRuleBaseMetadata
ALIASES, SCRIPTS
 
Constructor Summary
ValidationDocumentRuleBaseMetadata()
           
 
Method Summary
 void clear()
          clear all attributes from this metadata object
 Properties getAliases()
          get the aliases associated with a document
 String getAliasValue(String aliasName)
          Get the alias value for the given alias name.
 Object getAttribute(String name)
           
 String[] getAttributeNames()
          get all attribute names of this metadata object
 Map getAttributes()
          return the attributes of this metadata object
 URL getDocumentLocation()
           
 ScriptElement[] getScripts()
          retreave the scripts associated with a document
 void setAliases(Properties aliases)
          retreave the aliases for a document.
 void setAttribute(String name, Object value)
           
 void setAttributes(Map attributes)
          set the attributes for this metadata object
 void setDocumentLocation(URL location)
           
 void setScripts(ScriptElement[] scripts)
          set the list of scripts to be associated with a document.
 int size()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ValidationDocumentRuleBaseMetadata

public ValidationDocumentRuleBaseMetadata()
Method Detail

getAliases

public Properties getAliases()
Description copied from interface: IDocumentRuleBaseMetadata
get the aliases associated with a document

Specified by:
getAliases in interface IDocumentRuleBaseMetadata
Returns:
map of alias name/value pairs or an empty map if no alias elements are present
See Also:
IDocumentRuleBaseMetadata.setAliases(Properties)

getDocumentLocation

public URL getDocumentLocation()
Specified by:
getDocumentLocation in interface IDocumentRuleBaseMetadata
Returns:
URL of document or null if no name is specified

getScripts

public ScriptElement[] getScripts()
Description copied from interface: IDocumentRuleBaseMetadata
retreave the scripts associated with a document

Specified by:
getScripts in interface IDocumentRuleBaseMetadata
Returns:
list of script elements or an empty list if no script elements are present

setAliases

public void setAliases(Properties aliases)
Description copied from interface: IDocumentRuleBaseMetadata
retreave the aliases for a document. Aliases are name-value pairs for convenient reference to fully-qualified names. Aliases are defined using the <raven:alias> element in a validation document.

Specified by:
setAliases in interface IDocumentRuleBaseMetadata
Parameters:
aliases - is a map of alias name/value pairs

setDocumentLocation

public void setDocumentLocation(URL location)
Specified by:
setDocumentLocation in interface IDocumentRuleBaseMetadata
Parameters:
location - URL of document

setScripts

public void setScripts(ScriptElement[] scripts)
Description copied from interface: IDocumentRuleBaseMetadata
set the list of scripts to be associated with a document. Scripts are defined in the document with the <raven:scripts> element.

Scripts will typically be executed by a ICodeProcessor object.

Specified by:
setScripts in interface IDocumentRuleBaseMetadata
Parameters:
scripts - is a list of script elements or an empty list if no script elements are present
See Also:
ICodeProcessor

clear

public void clear()
Description copied from interface: IRuleBaseMetadata
clear all attributes from this metadata object

Specified by:
clear in interface IRuleBaseMetadata

getAttribute

public Object getAttribute(String name)
Specified by:
getAttribute in interface IRuleBaseMetadata
Parameters:
name - of metadata attribute
Returns:
value of metadata attribute or null if no name is specified

getAttributeNames

public String[] getAttributeNames()
Description copied from interface: IRuleBaseMetadata
get all attribute names of this metadata object

Specified by:
getAttributeNames in interface IRuleBaseMetadata
Returns:
attribute names or empty array if this metadata object is empty

getAttributes

public Map getAttributes()
Description copied from interface: IRuleBaseMetadata
return the attributes of this metadata object

Specified by:
getAttributes in interface IRuleBaseMetadata
Returns:
all attributes of this metadata object

setAttribute

public void setAttribute(String name,
                         Object value)
Specified by:
setAttribute in interface IRuleBaseMetadata
Parameters:
name - of metadata attribute
value - of metadata attribute

setAttributes

public void setAttributes(Map attributes)
Description copied from interface: IRuleBaseMetadata
set the attributes for this metadata object

Specified by:
setAttributes in interface IRuleBaseMetadata

size

public int size()
Specified by:
size in interface IRuleBaseMetadata

getAliasValue

public String getAliasValue(String aliasName)
Description copied from interface: IDocumentRuleBaseMetadata
Get the alias value for the given alias name.

Specified by:
getAliasValue in interface IDocumentRuleBaseMetadata
Parameters:
aliasName - -- alias name
Returns:
value of alias or null if no alias is defined for the given name