com.hp.hpl.jena.sparql.util.graph
Class GraphUtils

java.lang.Object
  extended by com.hp.hpl.jena.sparql.util.graph.GraphUtils

public class GraphUtils
extends Object

Graph utilities. See also GraphFactory.


Constructor Summary
GraphUtils()
           
 
Method Summary
static Iterator<Node> allNodes(Graph graph)
          All subjects and objects, no duplicates.
static boolean atmostOneProperty(Resource r, Property p)
           
static boolean exactlyOneProperty(Resource r, Property p)
           
static Resource findRootByType(Model model, Resource atype)
           
static String fmtURI(Resource r)
           
static String getAsStringValue(Resource r, Property p)
           
static Resource getResourceByType(Model model, Resource type)
           
static Resource getResourceValue(Resource r, Property p)
           
static String getStringValue(Resource r, Property p)
           
static List<RDFNode> multiValue(Resource r, Property p)
           
static List<Resource> multiValueResource(Resource r, Property p)
           
static List<String> multiValueString(Resource r, Property p)
           
static List<String> multiValueURI(Resource r, Property p)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GraphUtils

public GraphUtils()
Method Detail

multiValueString

public static List<String> multiValueString(Resource r,
                                            Property p)

multiValue

public static List<RDFNode> multiValue(Resource r,
                                       Property p)

multiValueResource

public static List<Resource> multiValueResource(Resource r,
                                                Property p)

multiValueURI

public static List<String> multiValueURI(Resource r,
                                         Property p)

exactlyOneProperty

public static boolean exactlyOneProperty(Resource r,
                                         Property p)

atmostOneProperty

public static boolean atmostOneProperty(Resource r,
                                        Property p)

getStringValue

public static String getStringValue(Resource r,
                                    Property p)

getAsStringValue

public static String getAsStringValue(Resource r,
                                      Property p)

getResourceValue

public static Resource getResourceValue(Resource r,
                                        Property p)

getResourceByType

public static Resource getResourceByType(Model model,
                                         Resource type)

findRootByType

public static Resource findRootByType(Model model,
                                      Resource atype)

fmtURI

public static String fmtURI(Resource r)

allNodes

public static Iterator<Node> allNodes(Graph graph)
All subjects and objects, no duplicates.



Licenced under the Apache License, Version 2.0