func NewCompound(description Description, subclass Subclass) Compound {
	var newCompound Compound
	compoundType := subclass.Resource[23:]
	switch subclass.Resource {
	case "http://rdf.rhea-db.org/SmallMolecule", "http://rdf.rhea-db.org/Polymer":
		newCompound = Compound{
			ID:        description.ID,
			Accession: description.About,
			Position:  description.Position,
			Name:      description.Name,
			HTMLName:  description.HTMLName,
			Formula:   description.Formula,
			Charge:    description.Charge,
			ChEBI:     description.ChEBI.Resource,

			CompoundID:        description.ID,
			CompoundAccession: description.Accession,
			CompoundName:      description.Name,
			CompoundHTMLName:  description.HTMLName,
			CompoundType:      compoundType}
		if compoundType == "Polymer" {
			newCompound.ChEBI = description.UnderlyingChEBI.Resource
		}
		// Add subclass ChEBI
		for _, sc := range description.Subclass {
			if strings.Contains(sc.Resource, "CHEBI") {
				newCompound.SubclassOfChEBI = sc.Resource
			}
		}
	case "http://rdf.rhea-db.org/GenericPolypeptide", "http://rdf.rhea-db.org/GenericPolynucleotide", "http://rdf.rhea-db.org/GenericHeteropolysaccharide":
		newCompound = Compound{
			Accession:        description.About,
			CompoundID:       description.ID,
			CompoundName:     description.Name,
			CompoundHTMLName: description.HTMLName,
			CompoundType:     compoundType}
	}
	return newCompound
}
// NewCompound returns a Compound.
NewCompound returns a Compound.
// NewCompound returns a Compound .
func NewCompound(description Description, subclass Subclass) Compound {
	var newCompound Compound
	compoundType := subclass.Resource[23:]
	switch subclass.Resource {
	case "http://rdf.rhea-db.org/SmallMolecule", "http://rdf.rhea-db.org/Polymer":
		newCompound = Compound{
			ID:        description.ID,
			Accession: description.About,
			Position:  description.Position,
			Name:      description.Name,
			HTMLName:  description.HTMLName,
			Formula:   description.Formula,
			Charge:    description.Charge,
			ChEBI:     description.ChEBI.Resource,
			CompoundID:        description.ID,
			CompoundAccession: description.Accession,
			CompoundName:      description.Name,
			CompoundHTMLName:  description.HTMLName,
			CompoundType:      compoundType}
		if compoundType == "Polymer" {
			newCompound.ChEBI = description.UnderlyingChEBI.Resource
		}
		for _, sc := range description.Subclass {
			if strings.Contains(sc.Resource, "CHEBI") {
				newCompound.SubclassOfChEBI = sc.Resource
			}
		}
	case "http://rdf.rhea-db.org/GenericPolypeptide", "http://rdf.rhea-db.org/GenericPolynucleotide", "http://rdf.rhea-db.org/GenericHeteropolysaccharide":
		newCompound = Compound{
			Accession:        description.About,
			CompoundID:       description.ID,
			CompoundName:     description.Name,
			CompoundHTMLName: description.HTMLName,
			CompoundType:     compoundType}
	}
	return newCompound
}
func NewCompound ( description Description , subclass Subclass ) Compound { var newCompound Compound compoundType := subclass . Resource [ 23 : ] switch subclass . Resource { case " " , " " : newCompound = Compound { ID : description . ID , Accession : description . About , Position : description . Position , Name : description . Name , HTMLName : description . HTMLName , Formula : description . Formula , Charge : description . Charge , ChEBI : description . ChEBI . Resource , CompoundID : description . ID , CompoundAccession : description . Accession , CompoundName : description . Name , CompoundHTMLName : description . HTMLName , CompoundType : compoundType } if compoundType == " " { newCompound . ChEBI = description . UnderlyingChEBI . Resource } for _ , sc := range description . Subclass { if strings . Contains ( sc . Resource , " " ) { newCompound . SubclassOfChEBI = sc . Resource } } case " " , " " , " " : newCompound = Compound { Accession : description . About , CompoundID : description . ID , CompoundName : description . Name , CompoundHTMLName : description . HTMLName , CompoundType : compoundType } } return newCompound }
NewCompound returns a Compound.
NewCompound returns a Compound .
// Add subclass ChEBI