lib/rtm/javatmapi/core/topic.rb in rtm-javatmapi-0.2.1 vs lib/rtm/javatmapi/core/topic.rb in rtm-javatmapi-0.3.0
- old
+ new
@@ -208,20 +208,10 @@
def parent
getParent
end
alias :reverse_children :parent
- # Calls TMAPI TopicMap.getIndex which
- # returns the index for the TypeInstanceIndex.
- #
- # :call-seq:
- # type_instance_index -> TypeInstanceIndex
- #
- def type_instance_index
- topic_map.type_instance_index
- end
-
superised
# Returns the Roles played by this Topic.
#
# If given, rtype specifies the type of the Roles to be returned;
# If given, atype specifies the type of the Association
@@ -299,11 +289,11 @@
if identifier.is_a? Java::OrgTmapiCore::Locator
addSubjectIdentifier(identifier)
else
addSubjectIdentifier(topic_map.create_locator(identifier))
end
- rescue org.tmapi.core.IdentityConstraintException => ice
+ rescue Java::OrgTmapiCore::IdentityConstraintException => ice
# TODO add condition to switch off automerge
self.mergeIn(self.topic_map.get(identifier))
end
end
@@ -343,11 +333,11 @@
if identifier.is_a? Java::OrgTmapiCore::Locator
addSubjectLocator(identifier)
else
addSubjectLocator(topic_map.create_locator(identifier))
end
- rescue org.tmapi.core.IdentityConstraintException => ice
+ rescue Java::OrgTmapiCore::IdentityConstraintException => ice
# TODO add condition to switch off automerge
self.mergeIn(self.topic_map.topic_by_subject_locator(identifier))
end
end
@@ -509,10 +499,10 @@
self.remove
end
private
def new_empty_java_topic_array
- [].to_java(org.tmapi.core.Topic)
+ [].to_java(Java::OrgTmapiCore::Topic)
end
class NoDatatypeHandlerAvailableException < Exception
def initialize(value)
super "Cannot map #{value} to an occurrence value+datatype. Maybe you need to add a handler for your Ruby object type."