Class: DatatypeMappingText
- Inherits:
-
DatatypeMapping
show all
- Defined in:
- lib/ontomde-java/struts/jsp_edit.rb,
lib/ontomde-java/flex/Editor.mxml.rb,
lib/ontomde-java/kbjava/rdfToJava.rb,
lib/ontomde-java/flex/ValueObjectAS.rb,
lib/ontomde-java/flex/Editor.mxml.as.rb,
lib/ontomde-java/struts/mappingForJsp.rb,
lib/ontomde-java/struts/mappingForBean.rb,
lib/ontomde-java/java/xsdDatatypeMapping.rb,
lib/ontomde-java/java/javaDatatypeMapping.rb
Instance Method Summary
collapse
#addActionFieldMethod!, #crank_validation_annotation, #flex_writeMXML_validate, #getFormType, #java_Name, #java_helper_addMethods!, #java_helper_customCode, #java_qualifiedName, #jpa_addTypeModificator, #prot_init, #rdf_uri, #struts_generateHelper
Instance Method Details
#flex_prefix ⇒ Object
<mx:TextInput id=“txtNom” text=“DatatypeMappingText.modelmodel.nom”/>
425
426
427
|
# File 'lib/ontomde-java/flex/Editor.mxml.rb', line 425
def flex_prefix
return "txt"
end
|
428
429
430
|
# File 'lib/ontomde-java/flex/Editor.mxml.rb', line 428
def flex_writeMXML_Form_item_property(prop)
prop.write(%{<mx:TextInput id="#{flex_prefix}#{prop.java_NameBean}" text="{model.#{prop.java_Name}}" #{maxStringLength.nil? ? "" : " maxChars=\"#{maxStringLength}\"" }/>\n})
end
|
435
436
437
|
# File 'lib/ontomde-java/flex/Editor.mxml.rb', line 435
def flex_writeMXML_Form_item_property_column(pcol)
pcol.write(%{<mx:DataGridColumn headerText="{getString('#{pcol.umlx_owner_one.java_qualifiedName}.#{pcol.java_Name}')}" dataField="#{pcol.java_Name}"/>\n})
end
|
#flex_writeMXML_MXvalidator(prop) ⇒ Object
<mx:StringValidator source=“txtNom” property=“text” required=“false”/>
141
142
143
144
145
146
147
148
149
150
|
# File 'lib/ontomde-java/flex/Editor.mxml.as.rb', line 141
def flex_writeMXML_MXvalidator(prop)
re=getValidationRegexp
validator= re.nil? ? "StringValidator" : "RegExpValidator"
prop.encloseWrite(" <mx:#{validator}","/>\n") {
prop.write(%{ source="{#{flex_prefix}#{prop.java_NameBean}}"})
prop.write(%{ property="text"})
prop.write(%{ required="#{prop.umlx_lowerValueIsZero? ? "false":"true"}"})
prop.write(%{ expression="#{re.source}"}) unless re.nil?
}
end
|
#flex_writeMXML_vo_mapping(prop) ⇒ Object
432
433
434
|
# File 'lib/ontomde-java/flex/Editor.mxml.rb', line 432
def flex_writeMXML_vo_mapping(prop)
prop.write(%{ #{prop.java_Name}="{#{flex_prefix}#{prop.java_NameBean}.text}"})
end
|
#flex_writeVO_getParameter(prop) ⇒ Object
EXAMPLE:
param.nom = nom;
186
187
188
|
# File 'lib/ontomde-java/flex/ValueObjectAS.rb', line 186
def flex_writeVO_getParameter(prop)
prop.write("param.#{prop.java_Name} = #{prop.java_Name};\n")
end
|
#flex_writeVO_initFromXML_mapping(prop) ⇒ Object
nom = DeserializeXMLUtil.getFormAttributValue(source, ‘nom’); id = DeserializeXMLUtil.getFormAttributValue(source, ‘id’);
192
193
194
|
# File 'lib/ontomde-java/flex/ValueObjectAS.rb', line 192
def flex_writeVO_initFromXML_mapping(prop)
prop.write("#{prop.java_Name} = DeserializeXMLUtil.getFormAttributValue(source, '#{prop.java_Name}');\n")
end
|
#flex_writeVO_initItemFromXML_mapping(prop) ⇒ Object
195
196
197
|
# File 'lib/ontomde-java/flex/ValueObjectAS.rb', line 195
def flex_writeVO_initItemFromXML_mapping(prop)
prop.write("#{prop.java_Name}=DeserializeXMLUtil.getOptionAttributValue(source,'#{prop.java_Name}');\n")
end
|
#flex_writeVO_vars_datatype(prop) ⇒ Object
EXAMPLES: public var nom:String; public var id:String;
180
181
182
|
# File 'lib/ontomde-java/flex/ValueObjectAS.rb', line 180
def flex_writeVO_vars_datatype(prop)
prop.write("public var #{prop.java_Name}:String;\n")
end
|
19
20
21
22
23
24
25
|
# File 'lib/ontomde-java/java/javaDatatypeMapping.rb', line 19
def getFormCopyTo(field)
if field.umlx_oneSide?
super
else
return %{_to.set#{field.java_NameBean}(xmda.struts.FormHelper.toBean(this.get#{field.java_NameBean}(),_to.get#{field.java_NameBean}()));\n}
end
end
|
26
27
28
29
30
31
32
33
34
|
# File 'lib/ontomde-java/java/javaDatatypeMapping.rb', line 26
def getFormInitFrom(field)
if field.umlx_oneSide?
super
else
return %{this.set#{field.java_NameBean}(xmda.struts.FormHelper.toFormArrayAsStringLine(_from.get#{field.java_NameBean}()));\n}
toFormArrayAsStringLine
end
end
|
#getJSP(datatype, field, owner) ⇒ Object
20
21
22
23
24
25
26
27
|
# File 'lib/ontomde-java/struts/mappingForJsp.rb', line 20
def getJSP(datatype,field,owner)
n=datatype.java_Name.downcase if field.umlx_oneSide?
return %{<html:text property="#{field.java_Name}" size="40%" maxlength="#{self.maxStringLength}" styleId="#{n}" #{::Muml_DataType::STRUTS_ERROR_STYLE}/>}
else
return %{<%-- one line per element in array --%><html:textarea cols="60" property="#{field.java_Name}" styleId="#{n}" #{::Muml_DataType::STRUTS_ERROR_STYLE}/>}
end
end
|
#java_getJavaParse(jsrc) ⇒ Object
33
34
35
|
# File 'lib/ontomde-java/struts/mappingForBean.rb', line 33
def java_getJavaParse(jsrc)
return jsrc
end
|
#java_getJavaToString(jsrc) ⇒ Object
30
31
32
|
# File 'lib/ontomde-java/struts/mappingForBean.rb', line 30
def java_getJavaToString(jsrc)
return jsrc
end
|
#java_getType ⇒ Object
12
13
14
|
# File 'lib/ontomde-java/java/javaDatatypeMapping.rb', line 12
def java_getType
return "java.lang.String"
end
|
#java_getUndefinedValue ⇒ Object
15
16
17
|
# File 'lib/ontomde-java/java/javaDatatypeMapping.rb', line 15
def java_getUndefinedValue
return %{""}
end
|
#prot_convertToJava(umlprop, valitem) ⇒ Object
Protege string to Java code conversions
353
354
355
|
# File 'lib/ontomde-java/kbjava/rdfToJava.rb', line 353
def prot_convertToJava(umlprop,valitem)
return %{"#{valitem}"}
end
|
#struts_edit_writeFieldGeneric_DisplayTable_displayTag_column(prop) ⇒ Object
857
858
859
|
# File 'lib/ontomde-java/struts/jsp_edit.rb', line 857
def struts_edit_writeFieldGeneric_DisplayTable_displayTag_column(prop)
prop.write %{<display:column property="#{prop.java_Name}" titleKey="#{prop.umlx_owner_one.java_qualifiedName}.#{prop.java_Name}" />\n}
end
|
#xsd_getType ⇒ Object
9
10
11
|
# File 'lib/ontomde-java/java/xsdDatatypeMapping.rb', line 9
def xsd_getType
return "xsd:string"
end
|