@Test public void test_ExtractMeaningfulNames_NoParserRecognized() throws Exception { Frame frame = mock(Frame.class); String testUri = "jdbc:mydb:scheme: List<ExternalResourceDescriptor> result = dbAnalyzer.extractMeaningfulNames(frame, testUri); String tohash = "mydb" + "" + "server-address" + 8080; assertEquals(1, result.size()); ExternalResourceDescriptor res = result.get(0); assertEquals("mydb", res.getVendor()); assertEquals("", res.getLabel()); assertEquals("server-address", res.getHost()); assertEquals(8080, res.getPort()); assertEquals("mydb:1:" + MD5NameGenerator.getName(tohash), res.getName()); assertEquals(Boolean.FALSE, Boolean.valueOf(res.isIncoming())); }
public List<ExternalResourceDescriptor> extractMeaningfulNames(Frame frame, String connectionString) { List<ExternalResourceDescriptor> parserRecognizedDescriptors = getParserRecognizedDescriptors(frame, connectionString); if (ListUtil.size(parserRecognizedDescriptors) > 0) { return parserRecognizedDescriptors; } return getFallbackDescriptor(frame, connectionString); }
DatabaseJDBCURIAnalyzer extends AbstractExternalResourceAnalyzer { public List<ExternalResourceDescriptor> extractMeaningfulNames(Frame frame, String connectionString) { List<ExternalResourceDescriptor> parserRecognizedDescriptors = getParserRecognizedDescriptors(frame, connectionString); if (ListUtil.size(parserRecognizedDescriptors) > 0) { return parserRecognizedDescriptors; } return getFallbackDescriptor(frame, connectionString); } }
DatabaseJDBCURIAnalyzer extends AbstractExternalResourceAnalyzer { public List<ExternalResourceDescriptor> extractMeaningfulNames(Frame frame, String connectionString) { List<ExternalResourceDescriptor> parserRecognizedDescriptors = getParserRecognizedDescriptors(frame, connectionString); if (ListUtil.size(parserRecognizedDescriptors) > 0) { return parserRecognizedDescriptors; } return getFallbackDescriptor(frame, connectionString); } protected  DatabaseJDBCURIAnalyzer(OperationType type); }
DatabaseJDBCURIAnalyzer extends AbstractExternalResourceAnalyzer { public List<ExternalResourceDescriptor> extractMeaningfulNames(Frame frame, String connectionString) { List<ExternalResourceDescriptor> parserRecognizedDescriptors = getParserRecognizedDescriptors(frame, connectionString); if (ListUtil.size(parserRecognizedDescriptors) > 0) { return parserRecognizedDescriptors; } return getFallbackDescriptor(frame, connectionString); } protected  DatabaseJDBCURIAnalyzer(OperationType type); Collection<ExternalResourceDescriptor> locateExternalResourceName(Trace trace, Collection<Frame> dbFrames); List<ExternalResourceDescriptor> extractMeaningfulNames(Frame frame, String connectionString); }
DatabaseJDBCURIAnalyzer extends AbstractExternalResourceAnalyzer { public List<ExternalResourceDescriptor> extractMeaningfulNames(Frame frame, String connectionString) { List<ExternalResourceDescriptor> parserRecognizedDescriptors = getParserRecognizedDescriptors(frame, connectionString); if (ListUtil.size(parserRecognizedDescriptors) > 0) { return parserRecognizedDescriptors; } return getFallbackDescriptor(frame, connectionString); } protected  DatabaseJDBCURIAnalyzer(OperationType type); Collection<ExternalResourceDescriptor> locateExternalResourceName(Trace trace, Collection<Frame> dbFrames); List<ExternalResourceDescriptor> extractMeaningfulNames(Frame frame, String connectionString);  }