Class: JavaMappingEmailAddress
- Inherits:
-
JavaMappingText
- Object
- JavaMapping
- JavaMappingText
- JavaMappingEmailAddress
- Includes:
- Singleton
- Defined in:
- lib/ontomde-uml2-java/javaMapping.rb
Constant Summary collapse
- MATCHING_UML_NAME =
["EmailAdress"]
Instance Attribute Summary
Attributes inherited from JavaMapping
Instance Method Summary collapse
- #appliesTo?(datatype) ⇒ Boolean
-
#getValidationRegexp ⇒ Object
EMAIL address regexp cf : www.regular-expressions.info/email.html.
Methods inherited from JavaMappingText
Methods inherited from JavaMapping
#getGroovyCast, #getJavaType, #getMappings, #getTemplate, #initialize
Constructor Details
This class inherits a constructor from JavaMapping
Instance Method Details
#appliesTo?(datatype) ⇒ Boolean
386 387 388 389 |
# File 'lib/ontomde-uml2-java/javaMapping.rb', line 386 def appliesTo?(datatype) return true if MATCHING_UML_NAME.include?(datatype.uml_name_one) return false end |
#getValidationRegexp ⇒ Object
EMAIL address regexp cf : www.regular-expressions.info/email.html
393 394 395 |
# File 'lib/ontomde-uml2-java/javaMapping.rb', line 393 def getValidationRegexp return /[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}/ end |