private NODE toRDFValue(Object o, @Nullable UID context) { if (o instanceof NODE) { return (NODE) o; } Class<?> type = getClass(o); if (configuration.isMapped(type)) { return toRDF(o, context); } else if (o instanceof UID) { return (UID) o; } else { return toRDFLiteral(o); } }
@Override public ID save(Object instance) { boolean flush = false; if (seen == null) { seen = new HashSet<Object>(); flush = true; } assertMapped(instance); assertHasIdProperty(instance); ID subject = toRDF(instance, null); if (flush) { seen = null; if (flushMode == FlushMode.ALWAYS) { flush(); } } return subject; }
if (object != null) { UID subContext = getContext(object, subject, context); toRDF(object, subject, subContext, configuration.getMappedClass(getClass(object)), update); UID predicate = toRDF(entry.getKey(), context).asURI(); if (entry.getValue() instanceof Collection) { for (Object value : ((Collection) entry.getValue())) {
toRDF(beanMap, subject, context, mappedClass, update);