Subversion Repositories SmartDukaan

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
82 naveen 1
print "expFacetDef=" + `expFacetDef`
2
 
3
# Hard coded
4
# ref: irdatarules/*-battery-capacity-talktime.py
5
facetDefID = expFacetDef.getID()
83 naveen 6
xmlsnippet = "\t\t<Facet>\n"
7
xmlsnippet += "\t\t\t<FacetDefinitionID>" + str(facetDefID) + "</FacetDefinitionID>\n" 
82 naveen 8
 
9
target = expFacetDef.getTarget()
83 naveen 10
xmlsnippet += "\t\t\t<Label>" + target + "</Label>\n"
82 naveen 11
 
83 naveen 12
xmlsnippet += "\t\t\t<IsMultivalue>false</IsMultivalue>\n"
82 naveen 13
 
83 naveen 14
xmlsnippet += "\t\t\t<HierarchyType>Flat</HierarchyType>\n"
82 naveen 15
 
83 naveen 16
xmlsnippet += "\t\t\t<NullBehavior>Reject</NullBehavior>\n"
82 naveen 17
 
83 naveen 18
xmlsnippet += "\t\t\t<Datatype>string</Datatype>\n" 
82 naveen 19
 
83 naveen 20
xmlsnippet += "\t\t\t<FacetValues>\n" 
82 naveen 21
 
22
# High
83 naveen 23
xmlsnippet += "\t\t\t\t<FacetValue>\n" 
24
xmlsnippet += "\t\t\t\t\t<Value>High</Value>\n" 
25
xmlsnippet += "\t\t\t\t</FacetValue>\n"
82 naveen 26
 
27
# Medium
83 naveen 28
xmlsnippet += "\t\t\t\t<FacetValue>\n" 
29
xmlsnippet += "\t\t\t\t\t<Value>Medium</Value>\n" 
30
xmlsnippet += "\t\t\t\t</FacetValue>\n"
82 naveen 31
 
32
# Low
83 naveen 33
xmlsnippet += "\t\t\t\t<FacetValue>\n" 
34
xmlsnippet += "\t\t\t\t\t<Value>Low</Value>\n" 
35
xmlsnippet += "\t\t\t\t</FacetValue>\n"
82 naveen 36
 
83 naveen 37
xmlsnippet += "\t\t\t</FacetValues>\n"
82 naveen 38
 
88 naveen 39
xmlsnippet += "\t\t</Facet>"