test_class.file: ontopia-engine/src/test/java/net/ontopia/topicmaps/utils/ImportExportUtilsTest.java
test_class.identifier: ImportExportUtilsTest
test_case.body: @Test
    public void testGetTopicMapId() {
      testId("1", 1L);
      testId("123", 123L);
      testId("M1", 1L);
      testId("M123", 123L);
      testId("x-ontopia:tm-rdbms:1", 1L);
      testId("x-ontopia:tm-rdbms:123", 123L);
      testId("x-ontopia:tm-rdbms:M1", 1L);
      testId("x-ontopia:tm-rdbms:M123", 123L);
    }
test_case.class_method_signature: ImportExportUtilsTest.testGetTopicMapId()
test_case.full_signature: @Test public void testGetTopicMapId()
test_case.identifier: testGetTopicMapId
test_case.invocations: testId testId testId testId testId testId testId testId
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testGetTopicMapId()
focal_class.declarator: ONTOPIA_RDBMS_URI_PREFIX = "x-ontopia:tm-rdbms:"
focal_class.modifier: private static final
focal_class.original_string: private static final String ONTOPIA_RDBMS_URI_PREFIX = "x-ontopia:tm-rdbms:";
focal_class.type: String
focal_class.var_name: ONTOPIA_RDBMS_URI_PREFIX
focal_class.declarator: XTM_EXTENSION = ".xtm"
focal_class.modifier: private static final
focal_class.original_string: private static final String XTM_EXTENSION = ".xtm";
focal_class.type: String
focal_class.var_name: XTM_EXTENSION
focal_class.declarator: TMX_EXTENSION = ".tmx"
focal_class.modifier: private static final
focal_class.original_string: private static final String TMX_EXTENSION = ".tmx";
focal_class.type: String
focal_class.var_name: TMX_EXTENSION
focal_class.declarator: LTM_EXTENSION = ".ltm"
focal_class.modifier: private static final
focal_class.original_string: private static final String LTM_EXTENSION = ".ltm";
focal_class.type: String
focal_class.var_name: LTM_EXTENSION
focal_class.declarator: CTM_EXTENSION = ".ctm"
focal_class.modifier: private static final
focal_class.original_string: private static final String CTM_EXTENSION = ".ctm";
focal_class.type: String
focal_class.var_name: CTM_EXTENSION
focal_class.declarator: services
focal_class.modifier: private static
focal_class.original_string: private static Set<ImportExportServiceIF> services;
focal_class.type: Set<ImportExportServiceIF>
focal_class.var_name: services
focal_class.file: ontopia-engine/src/main/java/net/ontopia/topicmaps/utils/ImportExportUtils.java
focal_class.identifier: ImportExportUtils
focal_class.class_method_signature: ImportExportUtils.loadServices()
focal_class.full_signature: private static void loadServices()
focal_class.identifier: loadServices
focal_class.modifiers: private static
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void loadServices()
focal_class.class_method_signature: ImportExportUtils.getServices()
focal_class.full_signature: @SuppressWarnings("unchecked") public static Set<ImportExportServiceIF> getServices()
focal_class.identifier: getServices
focal_class.modifiers: @SuppressWarnings("unchecked") public static
focal_class.parameters: ()
focal_class.return: Set<ImportExportServiceIF>
focal_class.signature: Set<ImportExportServiceIF> getServices()
focal_class.class_method_signature: ImportExportUtils.getReader(File file)
focal_class.full_signature: public static TopicMapReaderIF getReader(File file)
focal_class.identifier: getReader
focal_class.modifiers: public static
focal_class.parameters: (File file)
focal_class.return: TopicMapReaderIF
focal_class.signature: TopicMapReaderIF getReader(File file)
focal_class.class_method_signature: ImportExportUtils.getReader(String filename_or_url)
focal_class.full_signature: public static TopicMapReaderIF getReader(String filename_or_url)
focal_class.identifier: getReader
focal_class.modifiers: public static
focal_class.parameters: (String filename_or_url)
focal_class.return: TopicMapReaderIF
focal_class.signature: TopicMapReaderIF getReader(String filename_or_url)
focal_class.class_method_signature: ImportExportUtils.getReader(URL url)
focal_class.full_signature: public static TopicMapReaderIF getReader(URL url)
focal_class.identifier: getReader
focal_class.modifiers: public static
focal_class.parameters: (URL url)
focal_class.return: TopicMapReaderIF
focal_class.signature: TopicMapReaderIF getReader(URL url)
focal_class.class_method_signature: ImportExportUtils.getWriter(File tmfile)
focal_class.full_signature: public static TopicMapWriterIF getWriter(File tmfile)
focal_class.identifier: getWriter
focal_class.modifiers: public static
focal_class.parameters: (File tmfile)
focal_class.return: TopicMapWriterIF
focal_class.signature: TopicMapWriterIF getWriter(File tmfile)
focal_class.class_method_signature: ImportExportUtils.getWriter(File tmfile, String encoding)
focal_class.full_signature: public static TopicMapWriterIF getWriter(File tmfile, String encoding)
focal_class.identifier: getWriter
focal_class.modifiers: public static
focal_class.parameters: (File tmfile, String encoding)
focal_class.return: TopicMapWriterIF
focal_class.signature: TopicMapWriterIF getWriter(File tmfile, String encoding)
focal_class.class_method_signature: ImportExportUtils.getTopicMapId(String address)
focal_class.full_signature: public static long getTopicMapId(String address)
focal_class.identifier: getTopicMapId
focal_class.modifiers: public static
focal_class.parameters: (String address)
focal_class.return: long
focal_class.signature: long getTopicMapId(String address)
focal_method.body: public static long getTopicMapId (String address) {
      int offset = 0;
      if (address.startsWith("M"))
        offset = 1;
      else if (address.startsWith(ONTOPIA_RDBMS_URI_PREFIX)) {
        // Syntax: x-ontopia:tm-rdbms:12345
        offset = ONTOPIA_RDBMS_URI_PREFIX.length ();
        
        // Ignore M suffix on topic map id
        if (address.charAt (offset) == 'M')
          offset = offset + 1;
      }
      
      try {
        return Long.parseLong (address.substring (offset));
      } catch (NumberFormatException e) {
        throw new OntopiaRuntimeException ("'" + address
            + " is not a valid rdbms topic map URI.");
      }
    }
focal_method.class_method_signature: ImportExportUtils.getTopicMapId(String address)
focal_method.full_signature: public static long getTopicMapId(String address)
focal_method.identifier: getTopicMapId
focal_method.invocations: startsWith startsWith length charAt parseLong substring
focal_method.modifiers: public static
focal_method.parameters: (String address)
focal_method.return: long
focal_method.signature: long getTopicMapId(String address)