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, #register

Constructor Details

This class inherits a constructor from DatatypeMapping

Instance Method Details

#appliesTo?(datatype) ⇒ Boolean

MATCHING_JAVA_NAME=[]

Returns:

  • (Boolean)


274
275
276
277
278
# File 'lib/ontomde-uml2/UMLdatatypeMapping.rb', line 274

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

#getHelpObject



282
283
284
# File 'lib/ontomde-uml2/UMLdatatypeMapping.rb', line 282

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

#getValidationRegexpObject



279
280
281
# File 'lib/ontomde-uml2/UMLdatatypeMapping.rb', line 279

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