@Override
  public void write(final Concept c) throws IOException, ParseException {
    final String id = NS_SNOMED_CONCEPT_IDENTIFIER + ':' + c.getSerialisedId();

    // Master
    writeDatatypeProperties(c, id);

    // Description
    if ((c.getDescription() != null) && !c.getDescription().isEmpty()) {
      for (Description d : c.getDescription()) {
        writer.write(
            id
                + ' '
                + PROPERTY_SNOMED_DESCRIPTION
                + ' '
                + NS_SNOMED_DESCRIPTION_IDENTIFIER
                + ':'
                + d.getSerialisedId()
                + LINE_ENDING);
      }
    }

    // History
    if ((c.getHistory() != null) && !c.getHistory().isEmpty()) {
      int counter = 1;
      for (Concept hc : c.getHistory()) {
        String hid = id + "_h" + counter++;

        writeDatatypeProperties(hc, hid);

        // History Entry
        writer.write(id + ' ' + PROPERTY_SNOMED_HISTORY_ENTRY + ' ' + hid + LINE_ENDING);
      }
    }
  }
 @Override
 public boolean equals(Object o) {
   if (o instanceof Concept) {
     Concept c = (Concept) o;
     if (c.getSerialisedId() == this.getSerialisedId()) {
       return true;
     }
   }
   return false;
 }
 public XmlRefsetConcept(Concept c) {
   setId(c.getSerialisedId());
   setTitle(c.getFullySpecifiedName());
   setEffectiveTime(c.getEffectiveTime());
   setActive(c.isActive());
   try {
     setHref(UrlBuilder.createConceptUrl(c));
   } catch (MalformedURLException e) {
     LOG.error("Unable to build concept href url, setting null: " + e.getMessage(), e);
     setHref(null);
   }
 }