this.preprocessTerm(o);
this.triplepatterns.add(new TriplePattern(s,p,o));
}
private void preprocessTerm(RDFTerm term) {
CURIE curie = null;
if (term instanceof CURIE) {
curie = (CURIE)term;
}
if (term instanceof Property) {
Property property = (Property)term;
curie = property.getType();
}
if (term instanceof Literal) {
Literal literal = (Literal)term;
curie = literal.getDatatype();
}
//FIXME: more?
if (curie != null) {
String label = curie.getPrefix();
String namespace = namespaces.getMapping(label);
Prefix prefix = new Prefix(label, namespace);
this.prefixes.add(prefix);
}
}