Class: Twb::ColumnField
- Inherits:
-
Object
- Object
- Twb::ColumnField
- Includes:
- Comparable
- Defined in:
- lib/twb/columnfield.rb
Instance Attribute Summary collapse
-
#aggregation ⇒ Object
readonly
Returns the value of attribute aggregation.
-
#alias ⇒ Object
readonly
Returns the value of attribute alias.
-
#autoColumn ⇒ Object
readonly
Returns the value of attribute autoColumn.
-
#caption ⇒ Object
readonly
Returns the value of attribute caption.
-
#dataType ⇒ Object
readonly
Returns the value of attribute dataType.
-
#datatypeCustomized ⇒ Object
readonly
Returns the value of attribute datatypeCustomized.
-
#defaultFormat ⇒ Object
readonly
Returns the value of attribute defaultFormat.
-
#hidden ⇒ Object
readonly
Returns the value of attribute hidden.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#node ⇒ Object
readonly
XML Attributes known to exist in TWB xml —————————————- aggregation aggregation-param alias auto-column caption datatype datatype-customized default-format default-role default-type hidden layered name param-domain-type pivot role semantic-role SplitFieldIndex SplitFieldOrigin type user-datatype value visual-totals.
-
#paramDomainType ⇒ Object
readonly
Returns the value of attribute paramDomainType.
-
#role ⇒ Object
readonly
Returns the value of attribute role.
-
#semanticRole ⇒ Object
readonly
Returns the value of attribute semanticRole.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
-
#uiname ⇒ Object
readonly
Returns the value of attribute uiname.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
- #<=>(other) ⇒ Object
-
#initialize(fieldNode) ⇒ ColumnField
constructor
A new instance of ColumnField.
- #load(nodeName) ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(fieldNode) ⇒ ColumnField
Returns a new instance of ColumnField.
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/twb/columnfield.rb', line 58 def initialize fieldNode @node = fieldNode @name = load 'name' @caption = load 'caption' @uiname = @caption.nil? ? @name : @caption @dataType = load 'datatype' @userDataType = load 'user-datatype' @defaultFormat = load 'default-format' @paramDomainType = load 'param-domain-type' @role = load 'role' @type = load 'type' @value = load 'value' @alias = load 'alias' @semanticRole = load 'semantic-role' @aggregation = load 'aggregation' @autoColumn = load 'auto-column' @hidden = load 'hidden' @datatypeCustomized = load 'datatype-customized' end |
Instance Attribute Details
#aggregation ⇒ Object (readonly)
Returns the value of attribute aggregation.
54 55 56 |
# File 'lib/twb/columnfield.rb', line 54 def aggregation @aggregation end |
#alias ⇒ Object (readonly)
Returns the value of attribute alias.
54 55 56 |
# File 'lib/twb/columnfield.rb', line 54 def alias @alias end |
#autoColumn ⇒ Object (readonly)
Returns the value of attribute autoColumn.
55 56 57 |
# File 'lib/twb/columnfield.rb', line 55 def autoColumn @autoColumn end |
#caption ⇒ Object (readonly)
Returns the value of attribute caption.
51 52 53 |
# File 'lib/twb/columnfield.rb', line 51 def caption @caption end |
#dataType ⇒ Object (readonly)
Returns the value of attribute dataType.
52 53 54 |
# File 'lib/twb/columnfield.rb', line 52 def dataType @dataType end |
#datatypeCustomized ⇒ Object (readonly)
Returns the value of attribute datatypeCustomized.
55 56 57 |
# File 'lib/twb/columnfield.rb', line 55 def datatypeCustomized @datatypeCustomized end |
#defaultFormat ⇒ Object (readonly)
Returns the value of attribute defaultFormat.
52 53 54 |
# File 'lib/twb/columnfield.rb', line 52 def defaultFormat @defaultFormat end |
#hidden ⇒ Object (readonly)
Returns the value of attribute hidden.
55 56 57 |
# File 'lib/twb/columnfield.rb', line 55 def hidden @hidden end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
51 52 53 |
# File 'lib/twb/columnfield.rb', line 51 def name @name end |
#node ⇒ Object (readonly)
XML Attributes known to exist in TWB xml
aggregation aggregation-param alias auto-column caption datatype datatype-customized default-format default-role default-type hidden layered name param-domain-type pivot role semantic-role SplitFieldIndex SplitFieldOrigin type user-datatype value visual-totals
50 51 52 |
# File 'lib/twb/columnfield.rb', line 50 def node @node end |
#paramDomainType ⇒ Object (readonly)
Returns the value of attribute paramDomainType.
52 53 54 |
# File 'lib/twb/columnfield.rb', line 52 def paramDomainType @paramDomainType end |
#role ⇒ Object (readonly)
Returns the value of attribute role.
53 54 55 |
# File 'lib/twb/columnfield.rb', line 53 def role @role end |
#semanticRole ⇒ Object (readonly)
Returns the value of attribute semanticRole.
54 55 56 |
# File 'lib/twb/columnfield.rb', line 54 def semanticRole @semanticRole end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
53 54 55 |
# File 'lib/twb/columnfield.rb', line 53 def type @type end |
#uiname ⇒ Object (readonly)
Returns the value of attribute uiname.
51 52 53 |
# File 'lib/twb/columnfield.rb', line 51 def uiname @uiname end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
53 54 55 |
# File 'lib/twb/columnfield.rb', line 53 def value @value end |
Instance Method Details
#<=>(other) ⇒ Object
88 89 90 |
# File 'lib/twb/columnfield.rb', line 88 def <=>(other) @name <=> other.name end |
#load(nodeName) ⇒ Object
78 79 80 81 82 |
# File 'lib/twb/columnfield.rb', line 78 def load nodeName attr = @node.attribute(nodeName) val = attr.nil? ? nil : attr.text.strip.gsub(/^\[|\]$/,'') return val end |
#to_s ⇒ Object
84 85 86 |
# File 'lib/twb/columnfield.rb', line 84 def to_s @name end |