Oh, never mind. The problem was that the URI for the reification wasn't unique.

On Sun, Jan 8, 2012 at 11:30 AM, Benson Margulies <[email protected]> wrote:
> A little snippet of code follows. I'm getting an
> 'AlreadyReifiedException' for a statement that returned false for
> 'model.contains'. This doesn't strike me as plausible. I'm running
> 2.6.4, I'll update now and see if things improve.
>
>
>
>            Statement stmt = null;
>            if (rel.getLiteral() != null) {
>                stmt = model.createStatement(subResource, relProp,
> model.createLiteral(rel.getLiteral()));
>            } else {
>                objResource =
> mentionToCrossdocMap.get(rel.getObjectEntityOrdinal());
>                stmt = model.createStatement(subResource, relProp,
> objResource);
>            }
>            ReifiedStatement rstmt = null;
>            if (model.contains(stmt)) {
>                RSIterator reit = model.listReifiedStatements(stmt);
>                rstmt = reit.nextRS();
>            } else {
>                model.add(stmt);
>                String reUrl = RdfUtils.relationshipUri(docId, ordinal);
>                rstmt = model.createReifiedStatement(reUrl, stmt);
>            }

Reply via email to