Class ToString
- java.lang.Object
-
- edu.cornell.mannlib.vitro.webapp.utils.logging.ToString
-
public class ToString extends Object
Some useful methods for printing out the contents of data structures: OntModels, Models, Datasets, etc.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringgraphToString(org.apache.jena.graph.Graph graph)Local implementations of Graph can display themselves.static StringhashHex(Object o)static booleanisVitroClass(Object o)static StringmodelName(String name)If the string is found in ModelNames, return the name of the constant.static StringmodelToString(org.apache.jena.rdf.model.Model model)Local implementations of Model can display themselves.static StringontModelToString(org.apache.jena.ontology.OntModel ontModel)Local implementations of OntModel can display themselves.static StringreplaceModelNames(String raw)Replace all Model URIs with their short names.static StringsimpleName(Object o)
-
-
-
Method Detail
-
ontModelToString
public static String ontModelToString(org.apache.jena.ontology.OntModel ontModel)
Local implementations of OntModel can display themselves. Built-in Jena OntModels will show their hashcodes, base models, and sub-models.
-
modelToString
public static String modelToString(org.apache.jena.rdf.model.Model model)
Local implementations of Model can display themselves. Built-in Jena Graphs will show their hashcodes and graphs.
-
graphToString
public static String graphToString(org.apache.jena.graph.Graph graph)
Local implementations of Graph can display themselves. Built-in Jena Graphs will show their hashcodes.
-
modelName
public static String modelName(String name)
If the string is found in ModelNames, return the name of the constant. If the name is a filegraph, convert it to filegraph:[suffix] Otherwise, return the string itself.
-
replaceModelNames
public static String replaceModelNames(String raw)
Replace all Model URIs with their short names. If the filegraph URI root is found, replace it with "filegraph:".
-
isVitroClass
public static boolean isVitroClass(Object o)
-
-