Module: RTM::IO::ToRDF::TopicMap
- Defined in:
- rtm/lib/rtm/io/to_rdf.rb,
rtm/spec/rtm/io/to_rdf_spec.rb
Instance Method Summary
-
- (Object) to_rdf
If this topic map is an Ontopia tmapi2 topic map to_rdf_ontopia is called and the RDF reprensentation is returned.
-
- (Object) to_rdf_ontopia
Returns the RDF representation according to RDF2TM of this topic map as String.
Instance Method Details
- (Object) to_rdf
If this topic map is an Ontopia tmapi2 topic map to_rdf_ontopia is called and the RDF reprensentation is returned.
Else, a “Not supported” error is raised.
:call-seq:
to_rdf -> String
19 20 21 22 23 24 |
# File 'rtm/lib/rtm/io/to_rdf.rb', line 19 def to_rdf case self when Java::NetOntopiaTopicmapsImplTmapi2::TopicMapImpl then to_rdf_ontopia else raise "Not supported for #{self}" end end |
- (Object) to_rdf_ontopia
Returns the RDF representation according to RDF2TM of this topic map as String.
34 35 36 37 38 39 |
# File 'rtm/lib/rtm/io/to_rdf.rb', line 34 def to_rdf_ontopia @out = java.io.StringWriter.new w=Java::NetOntopiaTopicmapsUtilsRdf::RDFTopicMapWriter.new @out w.write self.getWrapped @out.to_s end |