/** * {@inheritDoc } */ public void setReadContexts(URI... contexts) { if(contexts != null) { connection.setReadContexts(contexts); } else { connection.setReadContexts(ALL_CONTEXTS); } }
/** * {@inheritDoc } */ public void setAllContexts(URI context) { if(context != null) { connection.setReadContexts(context); connection.setInsertContext(context); connection.setRemoveContexts(context); } else { connection.setReadContexts(ALL_CONTEXTS); connection.setInsertContext(null); connection.setRemoveContexts(ALL_CONTEXTS); } }
private ObjectConnection createObjectConnection(URI context) throws RepositoryException { ObjectConnection connection = objectRepository.getConnection(); if(context != null) { connection.setReadContexts(context); connection.setInsertContext(context); connection.setRemoveContexts(context); } else if (defaultContext != null) { connection.setReadContexts(defaultContext); connection.setInsertContext(defaultContext); connection.setRemoveContexts(defaultContext); } return connection; }
/** * Creates a new ObjectConnection that will need to be closed by the caller. */ @Override public ObjectConnection getConnection() throws RepositoryException { ObjectConnection con; RepositoryConnection conn = getDelegate().getConnection(); synchronized (compiled) { ObjectFactory factory = createObjectFactory(mapper, pm, literals, resolver, cl); con = new ObjectConnection(this, conn, factory, createTypeManager(), blobs); } con.setIncludeInferred(isIncludeInferred()); con.setMaxQueryTime(getMaxQueryTime()); // con.setQueryResultLimit(getQueryResultLimit()); con.setQueryLanguage(getQueryLanguage()); con.setReadContexts(getReadContexts()); con.setAddContexts(getAddContexts()); con.setRemoveContexts(getRemoveContexts()); con.setArchiveContexts(getArchiveContexts()); return con; }
/** * Creates a new ObjectConnection that will need to be closed by the caller. */ @Override public ObjectConnection getConnection() throws RepositoryException { BlobStore blobs; try { blobs = getBlobStore(); } catch (ObjectStoreConfigException e) { throw new RepositoryException(e); } ObjectFactory factory = service.createObjectFactory(); RepositoryConnection conn = getDelegate().getConnection(); ObjectConnection con = new ObjectConnection(this, conn, factory, createTypeManager(), blobs, idGenerator); con.setIncludeInferred(isIncludeInferred()); con.setMaxQueryTime(getMaxQueryTime()); // con.setQueryResultLimit(getQueryResultLimit()); con.setQueryLanguage(getQueryLanguage()); con.setReadContexts(getReadContexts()); con.setAddContexts(getAddContexts()); con.setRemoveContexts(getRemoveContexts()); con.setArchiveContexts(getArchiveContexts()); return con; }