4A Server -  2.0
 All Classes Namespaces Files Functions Variables Enumerator
cz.vutbr.fit.knot.annotations.modules.suggestionManager.attributes.SugAttributeManager Class Reference

Attribute manager provides a way how to create new attributes for prupose of suggestion. More...

Collaboration diagram for cz.vutbr.fit.knot.annotations.modules.suggestionManager.attributes.SugAttributeManager:
Collaboration graph

Static Public Member Functions

static SugBaseAttribute createAttribute ()
 
static SugBaseAttribute createAttribute (String name, String simpleType, Suggestion refSuggestion) throws ClassNotFoundException
 
static SugBaseAttribute createAttribute (String name, String simpleType, Object value, Suggestion refSuggestion) throws ClassNotFoundException
 
static SugBaseAttribute createAttribute (String name, String simpleType, AnnotType attributeType, Object value, Suggestion refSuggestion) throws ClassNotFoundException
 
static boolean containsType (String type)
 
static boolean hasAttributeRightInstance (SugBaseAttribute attr)
 
static SugBaseAttribute changeAttributeInstance (SugBaseAttribute attr)
 

Static Package Functions

 [static initializer]
 

Static Private Member Functions

static SugBaseAttribute createObject (String type) throws ClassNotFoundException
 

Static Private Attributes

static final HashMap< String,
Class > 
mapping = new HashMap<String,Class>()
 

Detailed Description

Attribute manager provides a way how to create new attributes for prupose of suggestion.

Attribute manager provides a way how to create new attributes for prupose of suggestion.

Definition at line 28 of file SugAttributeManager.java.

Member Function Documentation

cz.vutbr.fit.knot.annotations.modules.suggestionManager.attributes.SugAttributeManager.[static initializer] ( )
staticpackage
static SugBaseAttribute cz.vutbr.fit.knot.annotations.modules.suggestionManager.attributes.SugAttributeManager.changeAttributeInstance ( SugBaseAttribute  attr)
static

Cast the right Attribute class Attention! If simpletype is some bad string, then method returns the same attribute as inserted in parameters!

Parameters
attrquerried nested attribute
Returns
Right class instance

Definition at line 177 of file SugAttributeManager.java.

Here is the call graph for this function:

static boolean cz.vutbr.fit.knot.annotations.modules.suggestionManager.attributes.SugAttributeManager.containsType ( String  type)
static

Returns true if String type is correct type of attribute

Parameters
typeType of attribute
Returns
True if it can be created, false if not

Definition at line 150 of file SugAttributeManager.java.

static SugBaseAttribute cz.vutbr.fit.knot.annotations.modules.suggestionManager.attributes.SugAttributeManager.createAttribute ( )
static

Constructor

Definition at line 32 of file SugAttributeManager.java.

Here is the caller graph for this function:

static SugBaseAttribute cz.vutbr.fit.knot.annotations.modules.suggestionManager.attributes.SugAttributeManager.createAttribute ( String  name,
String  simpleType,
Suggestion  refSuggestion 
) throws ClassNotFoundException
static

Creates new empty attribute

Parameters
nameName of attribute
simpleTypeName of simple type of attribute
refSuggestionSuggestion to which this attribute belongs
Returns
Returns new empty attribute

Definition at line 102 of file SugAttributeManager.java.

Here is the call graph for this function:

static SugBaseAttribute cz.vutbr.fit.knot.annotations.modules.suggestionManager.attributes.SugAttributeManager.createAttribute ( String  name,
String  simpleType,
Object  value,
Suggestion  refSuggestion 
) throws ClassNotFoundException
static

Creates new attribute

Parameters
nameName of attribute
simpleTypeName of simple type of attribute
valueValue of attribute according to its type. For example, if type is Date then value is expected to be a date.
refSuggestionSuggestion to which this attribute belongs
Returns
Returns new attribute

Definition at line 119 of file SugAttributeManager.java.

Here is the call graph for this function:

static SugBaseAttribute cz.vutbr.fit.knot.annotations.modules.suggestionManager.attributes.SugAttributeManager.createAttribute ( String  name,
String  simpleType,
AnnotType  attributeType,
Object  value,
Suggestion  refSuggestion 
) throws ClassNotFoundException
static

Creates a new Attribute with structured type. (For example with nested annotation)

Parameters
nameName of attribute
simpleTypeName of simple type of attribute
attributeTypeStructured type of attribute (type of annotation)
valueNested value. Usually nested annotation
refSuggestionSuggestion to which this attribute belongs
Returns
Returns new attribute of structured type

Definition at line 138 of file SugAttributeManager.java.

static SugBaseAttribute cz.vutbr.fit.knot.annotations.modules.suggestionManager.attributes.SugAttributeManager.createObject ( String  type) throws ClassNotFoundException
staticprivate

Creates a new instance according to type

Parameters
typeType of new instance
Returns
Returns a new instance of appropriate class

Definition at line 77 of file SugAttributeManager.java.

Here is the caller graph for this function:

static boolean cz.vutbr.fit.knot.annotations.modules.suggestionManager.attributes.SugAttributeManager.hasAttributeRightInstance ( SugBaseAttribute  attr)
static

Returns true if attr has the right class instance of it's simpletype

Parameters
attrAttribute for check
Returns
True if simpletype matches the class instance, false otherwise

Definition at line 160 of file SugAttributeManager.java.

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

final HashMap<String,Class> cz.vutbr.fit.knot.annotations.modules.suggestionManager.attributes.SugAttributeManager.mapping = new HashMap<String,Class>()
staticprivate

Mapping of types of attributes to classes

Definition at line 37 of file SugAttributeManager.java.


The documentation for this class was generated from the following file: