public MappedPredicate(String parentNs, Predicate predicate, @Nullable String elementName) { this.uid = UID.create(parentNs, predicate.ns(), predicate.ln(), elementName); this.inv = predicate.inv(); this.ignoreInvalid = predicate.ignoreInvalid(); this.includeInferred = predicate.includeInferred(); if (predicate.context().isEmpty()) { this.context = null; } else { this.context = new UID(predicate.context()); } }