Commits

Sam Adams committed 1ed4915

Fixed lots of checkstyle violations

  • Participants
  • Parent commits 0835003

Comments (0)

Files changed (11)

File compchem-common/src/main/java/net/chempound/compchem/rdf/impl/CompChemCalculationImpl.java

  */
 public class CompChemCalculationImpl extends ItemImpl implements CompChemCalculation {
 
-    public static Implementation factory = new Implementation() {
+    public static final Implementation factory = new Implementation() {
         @Override
         public EnhNode wrap(final Node node, final EnhGraph eg) {
             return new CompChemCalculationImpl(node, eg);

File compchem-common/src/main/java/net/chempound/compchem/rdf/ont/CompChem.java

         return NS;
     }
 
-    public static final Resource Calculation = m_model.createResource(NS+"Calculation");
+    public static final Resource Calculation = m_model.createResource(NS + "Calculation");
 
-    public static final Property nuclearEnergy = m_model.createProperty(NS+"nuclearEnergy");
+    public static final Property nuclearEnergy = m_model.createProperty(NS + "nuclearEnergy");
 
 
-    public static final Property title = m_model.createProperty(NS+"title");
+    public static final Property title = m_model.createProperty(NS + "title");
 
 
-    public static final Property packageName = m_model.createProperty(NS+"program");
+    public static final Property packageName = m_model.createProperty(NS + "program");
 
-    public static final Property packageVersion = m_model.createProperty(NS+"version");
+    public static final Property packageVersion = m_model.createProperty(NS + "version");
 
 
-    public static final Property hostname = m_model.createProperty(NS+"hostname");
+    public static final Property hostname = m_model.createProperty(NS + "hostname");
 
-    public static final Property jobname = m_model.createProperty(NS+"jobname");
+    public static final Property jobname = m_model.createProperty(NS + "jobname");
 
-    public static final Property runDate = m_model.createProperty(NS+"run.date");
+    public static final Property runDate = m_model.createProperty(NS + "run.date");
 
 
-    public static final Property method = m_model.createProperty(NS+"method");
+    public static final Property method = m_model.createProperty(NS + "method");
 
-    public static final Property basis = m_model.createProperty(NS+"basis");
+    public static final Property basis = m_model.createProperty(NS + "basis");
 
 
 
-    public static final Property formula = m_model.createProperty(NS+"formula");
+    public static final Property formula = m_model.createProperty(NS + "formula");
 
-    public static final Property pointGroup = m_model.createProperty(NS+"pointgroup");
+    public static final Property pointGroup = m_model.createProperty(NS + "pointgroup");
 
-    public static final Property electronicState = m_model.createProperty(NS+"electronicstate");
+    public static final Property electronicState = m_model.createProperty(NS + "electronicstate");
 
 
-    public static final Property hfEnergy = m_model.createProperty(NS+"hfenergy");
+    public static final Property hfEnergy = m_model.createProperty(NS + "hfenergy");
 
-    public static final Property convergenceRMSD = m_model.createProperty(NS+"rmsd");
+    public static final Property convergenceRMSD = m_model.createProperty(NS + "rmsd");
 
-    public static final Property convergenceRMSF = m_model.createProperty(NS+"rmsf");
+    public static final Property convergenceRMSF = m_model.createProperty(NS + "rmsf");
 
 
 
-    public static final Property hasDipole = m_model.createProperty(NS+"hasDipole");
+    public static final Property hasDipole = m_model.createProperty(NS + "hasDipole");
 
-    public static final Property hasMultipole = m_model.createProperty(NS+"hasMultipole");
+    public static final Property hasMultipole = m_model.createProperty(NS + "hasMultipole");
 
-    public static final Property hasVirtualorbs = m_model.createProperty(NS+"hasVirtualorbs");
+    public static final Property hasVirtualorbs = m_model.createProperty(NS + "hasVirtualorbs");
 
-    public static final Property hasMullikenPops = m_model.createProperty(NS+"hasMullikenPops");
+    public static final Property hasMullikenPops = m_model.createProperty(NS + "hasMullikenPops");
 
 
 }

File compchem-common/src/main/java/net/chempound/compchem/rdf/ont/Gaussian.java

         return NS;
     }
 
-    public static final Resource GaussianCalculation = m_model.createResource(NS+"GaussianCalculation");
+    public static final Resource GaussianCalculation = m_model.createResource(NS +  "GaussianCalculation");
 
 }

File compchem-handler/src/main/java/net/chempound/compchem/CompChemMoleculeProvider.java

                 return Collections.singletonList(molecule);
             }
         } catch (Exception e) {
-            LOG.warn("Error loading molecule ["+item.getURI()+"]", e);
+            LOG.warn("Error loading molecule [" + item.getURI() + "]", e);
         }
         return Collections.emptyList();
     }

File compchem-handler/src/main/java/net/chempound/compchem/CompChemTool.java

         final String localName = dictRef.substring(i + 1);
         final String uri = context.getNamespaceURI(prefix);
         if (uri == null) {
-            LOG.warn("No dictRef URI: "+dictRef);
+            LOG.warn("No dictRef URI: " + dictRef);
             return null;
         }
         return uri + localName;

File compchem-handler/src/main/java/net/chempound/compchem/display/CompChemSplashPageWriter.java

         try {
             return IOUtils.toString(in);
         } catch (IOException e) {
-            throw new RuntimeException("Error reading file: "+s, e);
+            throw new RuntimeException("Error reading file: " + s, e);
         } finally {
             IOUtils.closeQuietly(in);
         }

File compchem-handler/src/main/java/net/chempound/compchem/search/CompChemSparqlBuilder.java

 
     public void addInchiKey(final String value) {
         addMol();
-        statements.add(" ?mol <"+ CmlRdf.inchiKey +"> [<"+ RDF.value +"> ?val"+i+ "] .\n");
+        statements.add(" ?mol <" + CmlRdf.inchiKey + "> [<" + RDF.value + "> ?val" + i + "] .\n");
         statements.add("  FILTER (regex(?val" + i + ", \"^" + value + "\"))\n");
         i++;
     }
         addMol();
         statements.add("  ?mol <" + CmlRdf.inchi + "> [<" + RDFS.label + "> ?val" + i + "] .\n");
         statements.add("  FILTER (?val" + i + " = ?q" + i + ") \n");
-        queryBindings.put("q"+i, ResourceFactory.createPlainLiteral(value));
+        queryBindings.put("q" + i, ResourceFactory.createPlainLiteral(value));
         i++;
     }
 

File compchem-importer/src/main/java/net/chempound/compchem/CmlComp2RdfConverter.java

         if ("daylight:smiles".equals(convention)) {
             return CmlRdf.smiles;
         }
-        throw new IllegalArgumentException("Unsupported identifer: "+convention);
+        throw new IllegalArgumentException("Unsupported identifer: " + convention);
     }
 
 }

File compchem-importer/src/main/java/net/chempound/compchem/CompChemImporter.java

     protected void createImageResources(final Document doc, final String id) throws IOException {
         final List<Node> nodes = CMLUtil.getQueryNodes(doc, "//cml:module[@dictRef='cc:initialization' or @dictRef='cc:finalization']/cml:molecule", CML_XPATH);
         if (nodes.isEmpty()) {
-            System.err.println("**\n**\n** No molecule found!\n**\n**\n**");
             throw new RuntimeException("No molecule found!");
         }
         createImages((CMLMolecule) nodes.get(nodes.size() - 1), id);

File compchem-importer/src/main/java/net/chempound/compchem/GaussianLogImporter.java

         final String ext = FilenameUtils.getExtension(filename).toLowerCase();
         if ("log".equals(ext) || "txt".equals(ext) || "out".equals(ext) || "gau".equals(ext)) {
             final int l = filename.length();
-            return filename.substring(0, l-(ext.length()+1));
+            return filename.substring(0, l - (ext.length() + 1));
         }
         return filename;
     }
 
         final Element cml = convertLogToCml(logFile);
         final Document doc = reloadCml(cml);
-        List<Node> molecules = CMLUtil.getQueryNodes(doc, "//cml:molecule", CML_XPATH);
+        final List<Node> molecules = CMLUtil.getQueryNodes(doc, "//cml:molecule", CML_XPATH);
         for (final Node node : molecules) {
             attachIdentifiers((CMLMolecule) node);
         }

File compchem-importer/src/main/java/net/chempound/compchem/NWChemLogImporter.java

         final String ext = FilenameUtils.getExtension(filename).toLowerCase();
         if ("log".equals(ext) || "txt".equals(ext) || "out".equals(ext)) {
             final int l = filename.length();
-            return filename.substring(0, l-(ext.length()+1));
+            return filename.substring(0, l - (ext.length() + 1));
         }
         return filename;
     }