
com.harium.suneidesis.concept.substance.Molecule Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of core Show documentation
Show all versions of core Show documentation
Project to represent knowledge
The newest version!
package com.harium.suneidesis.concept.substance;
import com.harium.suneidesis.concept.Concept;
public class Molecule extends Substance {
public Molecule(String name) {
super(name);
}
public void add(Concept substance) {
Concept substanceFormula = substance.get(Substance.ATTRIBUTE_FORMULA);
if (substanceFormula.isUnknown()) {
return;
}
// Improve it
Concept formula = get(Substance.ATTRIBUTE_FORMULA);
String current;
if (formula.isUnknown()) {
current = "";
} else {
current = formula.getName();
}
current += substanceFormula.getName();
setFormula(current);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy