01: /*
02: * Copyright Aduna (http://www.aduna-software.com/) (c) 1997-2007.
03: *
04: * Licensed under the Aduna BSD-style license.
05: */
06: package org.openrdf.http.protocol.transaction.operations;
07:
08: import org.openrdf.model.Resource;
09: import org.openrdf.repository.RepositoryConnection;
10: import org.openrdf.repository.RepositoryException;
11:
12: /**
13: * Operation that clears the whole repository.
14: *
15: * @author Arjohn Kampman
16: */
17: public class ClearOperation extends ContextOperation {
18:
19: public ClearOperation(Resource... contexts) {
20: super (contexts);
21: }
22:
23: public void execute(RepositoryConnection con)
24: throws RepositoryException {
25: con.clear(getContexts());
26: }
27:
28: @Override
29: public boolean equals(Object other) {
30: if (other instanceof ClearOperation) {
31: return super .equals(other);
32: }
33:
34: return false;
35: }
36: }
|