private Map<Literal, Collection<LabeledConcept>> orderResourcesByLabel() throws OpenRDFException {
    Map<Literal, Collection<LabeledConcept>> resourcesByLabel =
        new HashMap<Literal, Collection<LabeledConcept>>();

    for (LabeledConcept labeledResource : resourceLabelsCollector.getLabeledConcepts()) {
      Literal literal = labeledResource.getLiteral();

      Collection<LabeledConcept> resourcesForLiteral = resourcesByLabel.get(literal);
      if (resourcesForLiteral == null) {
        resourcesForLiteral = new HashSet<LabeledConcept>();
        resourcesByLabel.put(literal, resourcesForLiteral);
      }

      resourcesForLiteral.add(labeledResource);
    }

    return resourcesByLabel;
  }
 private boolean hasNonDisjointConflict(LabeledConcept resource1, LabeledConcept resource2) {
   return (resource1.getConcept() == resource2.getConcept())
       && (resource1.getLabelType() != resource2.getLabelType());
 }