View Javadoc

1   /*
2    * Copyright 2001-2005 The Apache Software Foundation.
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    *      http://www.apache.org/licenses/LICENSE-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package net.sf.nxqd.xmldb;
17  
18  import java.util.List;
19  import java.util.ArrayList;
20  import java.util.logging.Level;
21  import java.util.logging.Logger;
22  
23  import net.sf.nxqd.NxqdException;
24  import org.xmldb.api.base.Collection;
25  import org.xmldb.api.base.Database;
26  import org.xmldb.api.base.XMLDBException;
27  import org.xmldb.api.base.ErrorCodes;
28  import org.xmldb.api.base.Resource;
29  import org.xmldb.api.modules.BinaryResource;
30  
31  
32  /**
33   * @see org.xmldb.api.base.Resource
34   *
35   * @author <a href="mailto:"></a>
36   * @version 1.0
37   */
38  public class NxqdBinaryResource extends NxqdResource implements BinaryResource {
39  
40      /**
41       * The variable <code>logger</code> is used for logging events.
42       *
43       */
44      private static Logger logger = Logger.getLogger(NxqdBinaryResource.class.getName());
45      private byte[] data;
46  
47      /**
48       * The a new <code>NxqdBinaryResource</code> constructor creates a new instance
49       * of NxqdBinaryResource.
50       *
51       */
52      public NxqdBinaryResource(Collection parent, String id, String type)
53  	throws NxqdException, XMLDBException {
54  	super(parent, id, type);
55      }
56  
57      public void setContent(Object data) {
58  	this.data = (byte[])data;
59      }
60  
61      public Object getContent() {
62  	return data;
63      }
64  
65  }
66