Class: CqlRuby::CqlNode
- Inherits:
-
Object
show all
- Defined in:
- lib/cql_ruby/cql_nodes.rb,
lib/cql_ruby/cql_to_solr.rb
Instance Method Summary
collapse
Constructor Details
Returns a new instance of CqlNode.
12
13
14
|
# File 'lib/cql_ruby/cql_nodes.rb', line 12
def initialize
end
|
Instance Method Details
#check_xml(xml) ⇒ Object
6
7
8
9
10
|
# File 'lib/cql_ruby/cql_nodes.rb', line 6
def check_xml( xml )
xml = Builder::XmlMarkup.new(:indent => 1) unless xml
xml
end
|
#getResultSetName ⇒ Object
16
17
18
|
# File 'lib/cql_ruby/cql_nodes.rb', line 16
def getResultSetName
nil
end
|
#render_prefixes(xml = nil, prefixes = nil) ⇒ Object
29
30
31
32
33
34
35
36
37
38
39
40
41
|
# File 'lib/cql_ruby/cql_nodes.rb', line 29
def render_prefixes( xml=nil, prefixes=nil )
return unless prefixes and prefixes.length > 0
xml = check_xml( xml )
xml.prefixes do
prefixes.each do |prefix|
xml.prefix do
xml.name( prefix.name )
xml.identifier( prefix.identifier )
end
end
end
end
|
#render_sortkeys(xml = nil, sortkeys = nil) ⇒ Object
43
44
45
46
47
48
49
50
51
52
|
# File 'lib/cql_ruby/cql_nodes.rb', line 43
def render_sortkeys( xml=nil, sortkeys=nil )
return "" unless sortkeys and sortkeys.any?
xml = check_xml( xml )
xml.sortKeys do
sortkeys.each do |key|
key.sortkey_to_xcql( xml )
end
end
end
|
#to_cql ⇒ Object
25
26
27
|
# File 'lib/cql_ruby/cql_nodes.rb', line 25
def to_cql
nil
end
|
#to_solr ⇒ Object
Default, raise not supported, will be implemented by specific classes where supported.
72
73
74
|
# File 'lib/cql_ruby/cql_to_solr.rb', line 72
def to_solr
raise CqlException.new("#to_solr not supported for #{self.class}: #{self.to_cql}")
end
|
#to_xcql(xml = nil, prefixes = nil, sortkeys = nil) ⇒ Object
arguments kept for symmetry
21
22
23
|
# File 'lib/cql_ruby/cql_nodes.rb', line 21
def to_xcql( xml=nil, prefixes=nil, sortkeys=nil )
nil
end
|