/** * Creates a new StatementCollector that stores reported statements in the * supplied collection and that uses a new LinkedHashMap to store the * reported namespaces. */ public ContextStatementCollector(Collection<Statement> statements, ValueFactory vf, Resource... contexts) { OpenRDFUtil.verifyContextNotNull(contexts); if (statements instanceof Model) { this.namespaces = Namespaces.wrap(((Model)statements).getNamespaces()); } else { this.namespaces = new LinkedHashMap<String, String>(); } this.statements = statements; this.vf = vf; this.contexts = contexts; }