@Override
  public void runMetric() {

    // class annotation cover
    // List<Property> classAnnotationList = new ArrayList<Property>();
    classMetricMap = new HashMap<Property, CoverageTriple>();

    totalClassCount = ontology.getClassesList().size();

    for (Node classNode : ontology.getClassesList()) {
      OntClass currentClass = (OntClass) classNode.getResource().as(OntClass.class);
      StmtIterator i = currentClass.listProperties();

      Map<Property, Boolean> countedMap = new HashMap<Property, Boolean>();
      while (i.hasNext()) {
        Statement s = (Statement) i.next();
        Property p = s.getPredicate();

        if (p.canAs(AnnotationProperty.class) && countedMap.get(p) == null) {
          // this is an annotation property
          if (classMetricMap.get(p) == null) {
            // this property doesn't exit
            CoverageTriple t = new CoverageTriple();
            t.count = 1;
            countedMap.put(p, new Boolean(true)); // avoid counting duplicate annotations
            classMetricMap.put(p, t);
          } else {
            CoverageTriple count = classMetricMap.get(p);
            count.count++;
            countedMap.put(p, new Boolean(true)); // avoid counting duplicate annotations
          }
        }
      }
    }

    totalPropertyCount = ontology.getPropertiesList().size();
    // property annotation cover
    propertyMetricMap = new HashMap<Property, CoverageTriple>();

    for (Node propertyNode : ontology.getPropertiesList()) {
      OntProperty currentProperty = (OntProperty) propertyNode.getResource().as(OntProperty.class);
      StmtIterator i = currentProperty.listProperties();

      Map<Property, Boolean> countedMap = new HashMap<Property, Boolean>();
      while (i.hasNext()) {
        Statement s = (Statement) i.next();
        Property p = s.getPredicate();

        if (p.canAs(AnnotationProperty.class)) {
          // this is an annotation property
          if (propertyMetricMap.get(p) == null && countedMap.get(p) == null) {
            // this property doesn't exit
            CoverageTriple t = new CoverageTriple();
            t.count = 1;
            propertyMetricMap.put(p, t);
            countedMap.put(p, new Boolean(true)); // avoid counting duplicate annotations
          } else {
            CoverageTriple count = propertyMetricMap.get(p);
            count.count++;
            countedMap.put(p, new Boolean(true)); // avoid counting duplicate annotations
          }
        }
      }
    }

    // compute the percent coverage
    for (Entry<Property, CoverageTriple> entry : classMetricMap.entrySet()) {
      entry.getValue().coverage = (double) entry.getValue().count / (double) totalClassCount;
      if (entry.getValue().count > totalClassCount) {
        // test?
        System.out.println("--");
      }
    }

    for (Entry<Property, CoverageTriple> entry : propertyMetricMap.entrySet()) {
      entry.getValue().coverage = (double) entry.getValue().count / (double) totalPropertyCount;
      if (entry.getValue().count > totalPropertyCount) {
        // test?
        System.out.println("--");
      }
    }
  }