Class: DatatypeMappingTimeStamp

Inherits:
DatatypeMapping show all
Includes:
Singleton
Defined in:
lib/ontomde-uml2/UMLdatatypeMapping.rb,
lib/ontomde-uml2/kb/datatypeMapping.rb

Overview

struts jsp template for a timestamp datatype. A timestamp is a precise periode in time, including date,hours,minutes and seconds. NOTE:

"Date" datatype name is discourage because it is ambiguous.
(a java date is a timestamp)
Calendar and TimeStamp should be prefered.

Constant Summary collapse

MATCHING_UML_NAME =
["TimeStamp","Date"]

Instance Attribute Summary

Attributes inherited from DatatypeMapping

#maxStringLength

Instance Method Summary collapse

Methods inherited from DatatypeMapping

#getMapping, #getMappings, #initialize

Constructor Details

This class inherits a constructor from DatatypeMapping

Instance Method Details

#appliesTo?(datatype) ⇒ Boolean

MATCHING_JAVA_NAME=[]

Returns:

  • (Boolean)


264
265
266
267
268
# File 'lib/ontomde-uml2/UMLdatatypeMapping.rb', line 264

def appliesTo?(datatype)
  return true if MATCHING_UML_NAME.include?(datatype.uml_name_one)
  #return true if MATCHING_JAVA_NAME.include?(datatype.java_qualifiedName)
  return false
end

#getHelpObject



272
273
274
# File 'lib/ontomde-uml2/UMLdatatypeMapping.rb', line 272

def getHelp
  return "An absolute precise moment in time (independent of timezone)"
end

#getValidationRegexpObject



269
270
271
# File 'lib/ontomde-uml2/UMLdatatypeMapping.rb', line 269

def getValidationRegexp
  return nil
end

#prot_getProtegeTypeObject



49
50
51
# File 'lib/ontomde-uml2/kb/datatypeMapping.rb', line 49

def prot_getProtegeType
  return Muml_PrimitiveType::PROTEGE_STRING_DATATYPE
end