org.aksw.commons.jena
Class RDFNodePrettyComparator

java.lang.Object
  extended by org.aksw.commons.jena.RDFNodePrettyComparator
All Implemented Interfaces:
Comparator<com.hp.hpl.jena.rdf.model.RDFNode>

public class RDFNodePrettyComparator
extends Object
implements Comparator<com.hp.hpl.jena.rdf.model.RDFNode>

Pretty comparision of RDFNodes. Intended for a human readable sorting of RDFNodes: First the resources, then the literals, and finally the ugly blank nodes.


Constructor Summary
RDFNodePrettyComparator()
           
 
Method Summary
 int compare(com.hp.hpl.jena.rdf.model.RDFNode a, com.hp.hpl.jena.rdf.model.RDFNode b)
           
 int compareLiteral(com.hp.hpl.jena.rdf.model.Literal a, com.hp.hpl.jena.rdf.model.Literal b)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Constructor Detail

RDFNodePrettyComparator

public RDFNodePrettyComparator()
Method Detail

compareLiteral

public int compareLiteral(com.hp.hpl.jena.rdf.model.Literal a,
                          com.hp.hpl.jena.rdf.model.Literal b)

compare

public int compare(com.hp.hpl.jena.rdf.model.RDFNode a,
                   com.hp.hpl.jena.rdf.model.RDFNode b)
Specified by:
compare in interface Comparator<com.hp.hpl.jena.rdf.model.RDFNode>


Copyright © 2012. All Rights Reserved.