test_class.file: descriptor/qsarmolecular/src/test/java/org/openscience/cdk/qsar/DescriptorEngineTest.java
test_class.identifier: DescriptorEngineTest
test_class.superclass: extends CDKTestCase
test_case.body: @Test
      public void testDictionaryType() {
          DescriptorEngine engine = new DescriptorEngine(IMolecularDescriptor.class,
                  DefaultChemObjectBuilder.getInstance());
  
          String className = "org.openscience.cdk.qsar.descriptors.molecular.ZagrebIndexDescriptor";
          DescriptorSpecification specRef = new DescriptorSpecification(
                  "http://www.blueobelisk.org/ontologies/chemoinformatics-algorithms/#zagrebIndex", this.getClass()
                          .getName(), "The Chemistry Development Kit");
  
          Assert.assertEquals("molecularDescriptor", engine.getDictionaryType(className));
          Assert.assertEquals("molecularDescriptor", engine.getDictionaryType(specRef));
      }
test_case.class_method_signature: DescriptorEngineTest.testDictionaryType()
test_case.full_signature: @Test public void testDictionaryType()
test_case.identifier: testDictionaryType
test_case.invocations: getInstance getName getClass assertEquals getDictionaryType assertEquals getDictionaryType
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testDictionaryType()
focal_class.declarator: rdfNS       = "http://www.w3.org/1999/02/22-rdf-syntax-ns#"
focal_class.modifier: private static
focal_class.original_string: private static String                      rdfNS       = "http://www.w3.org/1999/02/22-rdf-syntax-ns#";
focal_class.type: String
focal_class.var_name: rdfNS
focal_class.declarator: dict        = null
focal_class.modifier: private
focal_class.original_string: private Dictionary                         dict        = null;
focal_class.type: Dictionary
focal_class.var_name: dict
focal_class.declarator: classNames  = new ArrayList<String>(200)
focal_class.modifier: private
focal_class.original_string: private List<String>                       classNames  = new ArrayList<String>(200);
focal_class.type: List<String>
focal_class.var_name: classNames
focal_class.declarator: descriptors = new ArrayList<IDescriptor>(200)
focal_class.modifier: private
focal_class.original_string: private List<IDescriptor>                  descriptors = new ArrayList<IDescriptor>(200);
focal_class.type: List<IDescriptor>
focal_class.var_name: descriptors
focal_class.declarator: speclist    = null
focal_class.modifier: private
focal_class.original_string: private List<IImplementationSpecification> speclist    = null;
focal_class.type: List<IImplementationSpecification>
focal_class.var_name: speclist
focal_class.declarator: logger      = LoggingToolFactory
                                                                     .createLoggingTool(DescriptorEngine.class)
focal_class.modifier: private static
focal_class.original_string: private static ILoggingTool                logger      = LoggingToolFactory
                                                                     .createLoggingTool(DescriptorEngine.class);
focal_class.type: ILoggingTool
focal_class.var_name: logger
focal_class.declarator: builder
focal_class.modifier: private final
focal_class.original_string: private final IChemObjectBuilder           builder;
focal_class.type: IChemObjectBuilder
focal_class.var_name: builder
focal_class.file: descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/DescriptorEngine.java
focal_class.identifier: DescriptorEngine
focal_class.class_method_signature: DescriptorEngine.DescriptorEngine(List<String> classNames, IChemObjectBuilder builder)
focal_class.full_signature: public  DescriptorEngine(List<String> classNames, IChemObjectBuilder builder)
focal_class.identifier: DescriptorEngine
focal_class.modifiers: public
focal_class.parameters: (List<String> classNames, IChemObjectBuilder builder)
focal_class.signature:  DescriptorEngine(List<String> classNames, IChemObjectBuilder builder)
focal_class.class_method_signature: DescriptorEngine.DescriptorEngine(Class<? extends IDescriptor> c, IChemObjectBuilder builder)
focal_class.full_signature: public  DescriptorEngine(Class<? extends IDescriptor> c, IChemObjectBuilder builder)
focal_class.identifier: DescriptorEngine
focal_class.modifiers: public
focal_class.parameters: (Class<? extends IDescriptor> c, IChemObjectBuilder builder)
focal_class.signature:  DescriptorEngine(Class<? extends IDescriptor> c, IChemObjectBuilder builder)
focal_class.class_method_signature: DescriptorEngine.process(IAtomContainer molecule)
focal_class.full_signature: public void process(IAtomContainer molecule)
focal_class.identifier: process
focal_class.modifiers: public
focal_class.parameters: (IAtomContainer molecule)
focal_class.return: void
focal_class.signature: void process(IAtomContainer molecule)
focal_class.class_method_signature: DescriptorEngine.getDictionaryType(String identifier)
focal_class.full_signature: public String getDictionaryType(String identifier)
focal_class.identifier: getDictionaryType
focal_class.modifiers: public
focal_class.parameters: (String identifier)
focal_class.return: String
focal_class.signature: String getDictionaryType(String identifier)
focal_class.class_method_signature: DescriptorEngine.getDictionaryType(IImplementationSpecification descriptorSpecification)
focal_class.full_signature: public String getDictionaryType(IImplementationSpecification descriptorSpecification)
focal_class.identifier: getDictionaryType
focal_class.modifiers: public
focal_class.parameters: (IImplementationSpecification descriptorSpecification)
focal_class.return: String
focal_class.signature: String getDictionaryType(IImplementationSpecification descriptorSpecification)
focal_class.class_method_signature: DescriptorEngine.getDictionaryClass(String identifier)
focal_class.full_signature: public String[] getDictionaryClass(String identifier)
focal_class.identifier: getDictionaryClass
focal_class.modifiers: public
focal_class.parameters: (String identifier)
focal_class.return: String[]
focal_class.signature: String[] getDictionaryClass(String identifier)
focal_class.class_method_signature: DescriptorEngine.getDictionaryClass(IImplementationSpecification descriptorSpecification)
focal_class.full_signature: public String[] getDictionaryClass(IImplementationSpecification descriptorSpecification)
focal_class.identifier: getDictionaryClass
focal_class.modifiers: public
focal_class.parameters: (IImplementationSpecification descriptorSpecification)
focal_class.return: String[]
focal_class.signature: String[] getDictionaryClass(IImplementationSpecification descriptorSpecification)
focal_class.class_method_signature: DescriptorEngine.getDictionaryDefinition(String identifier)
focal_class.full_signature: public String getDictionaryDefinition(String identifier)
focal_class.identifier: getDictionaryDefinition
focal_class.modifiers: public
focal_class.parameters: (String identifier)
focal_class.return: String
focal_class.signature: String getDictionaryDefinition(String identifier)
focal_class.class_method_signature: DescriptorEngine.getDictionaryDefinition(DescriptorSpecification descriptorSpecification)
focal_class.full_signature: public String getDictionaryDefinition(DescriptorSpecification descriptorSpecification)
focal_class.identifier: getDictionaryDefinition
focal_class.modifiers: public
focal_class.parameters: (DescriptorSpecification descriptorSpecification)
focal_class.return: String
focal_class.signature: String getDictionaryDefinition(DescriptorSpecification descriptorSpecification)
focal_class.class_method_signature: DescriptorEngine.getDictionaryTitle(String identifier)
focal_class.full_signature: public String getDictionaryTitle(String identifier)
focal_class.identifier: getDictionaryTitle
focal_class.modifiers: public
focal_class.parameters: (String identifier)
focal_class.return: String
focal_class.signature: String getDictionaryTitle(String identifier)
focal_class.class_method_signature: DescriptorEngine.getDictionaryTitle(DescriptorSpecification descriptorSpecification)
focal_class.full_signature: public String getDictionaryTitle(DescriptorSpecification descriptorSpecification)
focal_class.identifier: getDictionaryTitle
focal_class.modifiers: public
focal_class.parameters: (DescriptorSpecification descriptorSpecification)
focal_class.return: String
focal_class.signature: String getDictionaryTitle(DescriptorSpecification descriptorSpecification)
focal_class.class_method_signature: DescriptorEngine.getDescriptorSpecifications()
focal_class.full_signature: public List<IImplementationSpecification> getDescriptorSpecifications()
focal_class.identifier: getDescriptorSpecifications
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: List<IImplementationSpecification>
focal_class.signature: List<IImplementationSpecification> getDescriptorSpecifications()
focal_class.class_method_signature: DescriptorEngine.setDescriptorSpecifications(List<IImplementationSpecification> specs)
focal_class.full_signature: public void setDescriptorSpecifications(List<IImplementationSpecification> specs)
focal_class.identifier: setDescriptorSpecifications
focal_class.modifiers: public
focal_class.parameters: (List<IImplementationSpecification> specs)
focal_class.return: void
focal_class.signature: void setDescriptorSpecifications(List<IImplementationSpecification> specs)
focal_class.class_method_signature: DescriptorEngine.getDescriptorClassNames()
focal_class.full_signature: public List<String> getDescriptorClassNames()
focal_class.identifier: getDescriptorClassNames
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: List<String>
focal_class.signature: List<String> getDescriptorClassNames()
focal_class.class_method_signature: DescriptorEngine.getDescriptorInstances()
focal_class.full_signature: public List<IDescriptor> getDescriptorInstances()
focal_class.identifier: getDescriptorInstances
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: List<IDescriptor>
focal_class.signature: List<IDescriptor> getDescriptorInstances()
focal_class.class_method_signature: DescriptorEngine.setDescriptorInstances(List<IDescriptor> descriptors)
focal_class.full_signature: public void setDescriptorInstances(List<IDescriptor> descriptors)
focal_class.identifier: setDescriptorInstances
focal_class.modifiers: public
focal_class.parameters: (List<IDescriptor> descriptors)
focal_class.return: void
focal_class.signature: void setDescriptorInstances(List<IDescriptor> descriptors)
focal_class.class_method_signature: DescriptorEngine.getAvailableDictionaryClasses()
focal_class.full_signature: public String[] getAvailableDictionaryClasses()
focal_class.identifier: getAvailableDictionaryClasses
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: String[]
focal_class.signature: String[] getAvailableDictionaryClasses()
focal_class.class_method_signature: DescriptorEngine.getDescriptorClassNameByInterface(String interfaceName, String[] jarFileNames)
focal_class.full_signature: public static List<String> getDescriptorClassNameByInterface(String interfaceName, String[] jarFileNames)
focal_class.identifier: getDescriptorClassNameByInterface
focal_class.modifiers: public static
focal_class.parameters: (String interfaceName, String[] jarFileNames)
focal_class.return: List<String>
focal_class.signature: List<String> getDescriptorClassNameByInterface(String interfaceName, String[] jarFileNames)
focal_class.class_method_signature: DescriptorEngine.getDescriptorClassNameByPackage(String packageName, String[] jarFileNames)
focal_class.full_signature: public static List<String> getDescriptorClassNameByPackage(String packageName, String[] jarFileNames)
focal_class.identifier: getDescriptorClassNameByPackage
focal_class.modifiers: public static
focal_class.parameters: (String packageName, String[] jarFileNames)
focal_class.return: List<String>
focal_class.signature: List<String> getDescriptorClassNameByPackage(String packageName, String[] jarFileNames)
focal_class.class_method_signature: DescriptorEngine.instantiateDescriptors(List<String> descriptorClassNames)
focal_class.full_signature: public List<IDescriptor> instantiateDescriptors(List<String> descriptorClassNames)
focal_class.identifier: instantiateDescriptors
focal_class.modifiers: public
focal_class.parameters: (List<String> descriptorClassNames)
focal_class.return: List<IDescriptor>
focal_class.signature: List<IDescriptor> instantiateDescriptors(List<String> descriptorClassNames)
focal_class.class_method_signature: DescriptorEngine.instantiate(Class<? extends IDescriptor> c)
focal_class.full_signature: private IDescriptor instantiate(Class<? extends IDescriptor> c)
focal_class.identifier: instantiate
focal_class.modifiers: private
focal_class.parameters: (Class<? extends IDescriptor> c)
focal_class.return: IDescriptor
focal_class.signature: IDescriptor instantiate(Class<? extends IDescriptor> c)
focal_class.class_method_signature: DescriptorEngine.initializeSpecifications(List<IDescriptor> descriptors)
focal_class.full_signature: public List<IImplementationSpecification> initializeSpecifications(List<IDescriptor> descriptors)
focal_class.identifier: initializeSpecifications
focal_class.modifiers: public
focal_class.parameters: (List<IDescriptor> descriptors)
focal_class.return: List<IImplementationSpecification>
focal_class.signature: List<IImplementationSpecification> initializeSpecifications(List<IDescriptor> descriptors)
focal_class.class_method_signature: DescriptorEngine.getSpecRef(String identifier)
focal_class.full_signature: private String getSpecRef(String identifier)
focal_class.identifier: getSpecRef
focal_class.modifiers: private
focal_class.parameters: (String identifier)
focal_class.return: String
focal_class.signature: String getSpecRef(String identifier)
focal_method.body: public String getDictionaryType(String identifier) {
  
          Entry[] dictEntries = dict.getEntries();
          String specRef = getSpecRef(identifier);
  
          logger.debug("Got identifier: " + identifier);
          logger.debug("Final spec ref: " + specRef);
  
          for (Entry dictEntry : dictEntries) {
              if (!dictEntry.getClassName().equals("Descriptor")) continue;
              if (dictEntry.getID().equals(specRef.toLowerCase())) {
                  Element rawElement = (Element) dictEntry.getRawContent();
                  // assert(rawElement != null);
                  // We're not fully Java 1.5 yet, so commented it out now. If it is
                  // really important to have it, then add @cdk.require java1.5 in the
                  // Class javadoc (and all classes that use this class)
                  Elements classifications = rawElement.getChildElements("isClassifiedAs", dict.getNS());
  
                  for (int i = 0; i < classifications.size(); i++) {
                      Element element = classifications.get(i);
                      Attribute attr = element.getAttribute("resource", rdfNS);
                      if ((attr.getValue().indexOf("molecularDescriptor") != -1)
                              || (attr.getValue().indexOf("atomicDescriptor") != -1)) {
                          String[] tmp = attr.getValue().split("#");
                          return tmp[1];
                      }
                  }
              }
          }
          return null;
      }
focal_method.class_method_signature: DescriptorEngine.getDictionaryType(String identifier)
focal_method.full_signature: public String getDictionaryType(String identifier)
focal_method.identifier: getDictionaryType
focal_method.invocations: getEntries getSpecRef debug debug equals getClassName equals getID toLowerCase getRawContent getChildElements getNS size get getAttribute indexOf getValue indexOf getValue split getValue
focal_method.modifiers: public
focal_method.parameters: (String identifier)
focal_method.return: String
focal_method.signature: String getDictionaryType(String identifier)