public class ModelUtils extends Object
Constructor and Description |
---|
ModelUtils() |
Modifier and Type | Method and Description |
---|---|
static RDFNode |
convertGraphNodeToRDFNode(Node n,
Model model) |
static boolean |
isValidAsStatement(Node s,
Node p,
Node o)
Determines whether a valid Statement can be formed from the given Subject, Predicate and Object
|
static Iterator<Triple> |
statementsToTriples(Iterator<Statement> it) |
static StmtIterator |
triplesToStatements(Iterator<Triple> it,
Model refModel) |
static Statement |
tripleToStatement(Model model,
Triple t) |
public static boolean isValidAsStatement(Node s, Node p, Node o)
This function reflects the fact that the Triple
API is flexible in allowing any Node type in any position (including non-RDF node types like Variable)
and as such not all Triples can be safely converted into Statements
s
- Subjectp
- Predicateo
- Objectpublic static StmtIterator triplesToStatements(Iterator<Triple> it, Model refModel)
Licenced under the Apache License, Version 2.0