public RDFClass getRDFClass(URI pred) { Resource subj = model.filter(self, pred, null).objectResource(); if (subj == null) return null; return new RDFClass(model, subj); }
public RDFProperty getRDFProperty(URI pred) { Resource subj = model.filter(self, pred, null).objectResource(); if (subj == null) return null; return new RDFProperty(model, subj); }
public RDFClass getRDFClass(URI pred) { Resource subj = model.filter(self, pred, null).objectResource(); if (subj == null) return null; return new RDFClass(model, subj); }
public RDFProperty getRDFProperty(URI pred) { Resource subj = model.filter(self, pred, null).objectResource(); if (subj == null) return null; return new RDFProperty(model, subj); }
/** * method to find the triplesmap node referenced in a parent join condition * * @param myModel * - the Model of mappings * @param predobjNode * - the pred obj node containing the join condition * @return the Resource node refferred to in the condition */ public Resource getReferencedTripleMap(Model myModel, Resource predobjNode) { // process OBJECTMAP Model m = myModel.filter(predobjNode, R2RMLVocabulary.objectMap, null); if (!m.isEmpty()) { Resource object = m.objectResource(); // look for parentTriplesMap declaration m = myModel.filter(object, R2RMLVocabulary.parentTriplesMap, null); if (!m.isEmpty()) { return m.objectResource(); } } return null; }
private List<Value> copyTo(Value node, List<Value> list) { Value first = triples.match(node, RDF.FIRST, null).objectValue(); Resource rest = triples.match(node, RDF.REST, null).objectResource(); if (first == null) return list; list.add(first); return copyTo(rest, list); }
private List<Value> copyTo(Value node, List<Value> list) { Value first = triples.match(node, RDF.FIRST, null).objectValue(); Resource rest = triples.match(node, RDF.REST, null).objectResource(); if (first == null) return list; list.add(first); return copyTo(rest, list); }
private void addTo(Resource node, Value element) { if (triples.contains(node, RDF.FIRST, null)) { Resource rest = triples.match(node, RDF.REST, null).objectResource(); if (rest == null || rest.equals(RDF.NIL)) { rest = vf.createBNode(); triples.remove(node, RDF.REST, null); triples.add(node, RDF.REST, rest); } addTo(rest, element); } else { triples.add(node, RDF.FIRST, element); triples.add(node, RDF.REST, RDF.NIL); } }
/** * method to get the parent column in a join condition * * @param myModel * - the Model of mappings * @param predobjNode * - the pred obj node containing the join condition * @return the parent column condition as a string */ public String getParentColumn(Model myModel, Resource predobjNode) { // process OBJECTMAP Model m = myModel.filter(predobjNode, R2RMLVocabulary.objectMap, null); if (!m.isEmpty()) { Resource object = m.objectResource(); // look for joincondition declaration m = myModel.filter(object, R2RMLVocabulary.joinCondition, null); if (!m.isEmpty()) { Resource objectt = m.objectResource(); // look for parent declaration m = myModel.filter(objectt, R2RMLVocabulary.parent, null); if (!m.isEmpty()) { return trimTo1(m.objectString()); } } } return null; }
/** * method to get the child column in a join condition * * @param myModel * - the Model of mappings * @param predobjNode * - the pred obj node containing the join condition * @return the child column condition as a string */ public String getChildColumn(Model myModel, Resource predobjNode) { // process OBJECTMAP Model m = myModel.filter(predobjNode, R2RMLVocabulary.objectMap, null); if (!m.isEmpty()) { Resource object = m.objectResource(); // look for joincondition declaration m = myModel.filter(object, R2RMLVocabulary.joinCondition, null); if (!m.isEmpty()) { Resource objectt = m.objectResource(); // look for child declaration m = myModel.filter(objectt, R2RMLVocabulary.child, null); if (!m.isEmpty()) { return trimTo1(m.objectString()); } } } return null; }
private void addTo(Resource node, Value element) { if (triples.contains(node, RDF.FIRST, null)) { Resource rest = triples.match(node, RDF.REST, null).objectResource(); if (rest == null || rest.equals(RDF.NIL)) { rest = vf.createBNode(); triples.remove(node, RDF.REST, null); triples.add(node, RDF.REST, rest); } addTo(rest, element); } else { triples.add(node, RDF.FIRST, element); triples.add(node, RDF.REST, RDF.NIL); } }
Resource unionOf = ds.match(clazz, OWL.UNIONOF, null).objectResource(); if (unionOf != null) { return renameClass("", clazz, "Or", new RDFList(ds, unionOf) .objectResource(); if (intersectionOf != null) { return renameClass("", clazz, "And", new RDFList(ds, intersectionOf).asList()); Resource oneOf = ds.match(clazz, OWL.ONEOF, null).objectResource(); if (oneOf != null) { return renameClass("Is", clazz, "Or", new RDFList(ds, oneOf) .objectResource(); if (complement != null) { URI comp = complement instanceof URI ? (URI) complement : null;
Resource unionOf = ds.match(clazz, OWL.UNIONOF, null).objectResource(); if (unionOf != null) { return renameClass("", clazz, "Or", new RDFList(ds, unionOf) .objectResource(); if (intersectionOf != null) { return renameClass("", clazz, "And", new RDFList(ds, intersectionOf).asList()); Resource oneOf = ds.match(clazz, OWL.ONEOF, null).objectResource(); if (oneOf != null) { return renameClass("Is", clazz, "Or", new RDFList(ds, oneOf) .objectResource(); if (complement != null) { URI comp = complement instanceof URI ? (URI) complement : null;
.objectResource(); Resource inter = ds.match(e, OWL.INTERSECTIONOF, null) .objectResource(); if (cinter == null) { ds.add(subj, OWL.INTERSECTIONOF, inter); Resource co = ds.match(subj, OWL.ONEOF, null).objectResource(); Resource eo = ds.match(e, OWL.ONEOF, null).objectResource(); if (co == null) { ds.add(subj, OWL.ONEOF, ds.match(e, OWL.ONEOF, null) .objectResource()); } else if (!eo.equals(co)) { new RDFList(ds, co).addAllOthers(new RDFList(ds, eo)); if (!ds.contains(subj, OWL.COMPLEMENTOF, null)) { Resource comp = ds.match(e, OWL.COMPLEMENTOF, null) .objectResource(); ds.add(subj, OWL.COMPLEMENTOF, comp);
.objectResource(); Resource inter = ds.match(e, OWL.INTERSECTIONOF, null) .objectResource(); if (cinter == null) { ds.add(subj, OWL.INTERSECTIONOF, inter); Resource co = ds.match(subj, OWL.ONEOF, null).objectResource(); Resource eo = ds.match(e, OWL.ONEOF, null).objectResource(); if (co == null) { ds.add(subj, OWL.ONEOF, ds.match(e, OWL.ONEOF, null) .objectResource()); } else if (!eo.equals(co)) { new RDFList(ds, co).addAllOthers(new RDFList(ds, eo)); if (!ds.contains(subj, OWL.COMPLEMENTOF, null)) { Resource comp = ds.match(e, OWL.COMPLEMENTOF, null) .objectResource(); ds.add(subj, OWL.COMPLEMENTOF, comp);