Clover coverage report -
Coverage timestamp: Sun Nov 1 2009 23:08:24 UTC
file stats: LOC: 86   Methods: 11
NCLOC: 43   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
MetaService.java - 63.6% 63.6% 63.6%
coverage coverage
 1    /*
 2    * Licensed to the Apache Software Foundation (ASF) under one or more
 3    * contributor license agreements. See the NOTICE file distributed with
 4    * this work for additional information regarding copyright ownership.
 5    * The ASF licenses this file to You under the Apache License, Version 2.0
 6    * (the "License"); you may not use this file except in compliance with
 7    * the License. You may obtain a copy of the License at
 8    *
 9    * http://www.apache.org/licenses/LICENSE-2.0
 10    *
 11    * Unless required by applicable law or agreed to in writing, software
 12    * distributed under the License is distributed on an "AS IS" BASIS,
 13    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 14    * See the License for the specific language governing permissions and
 15    * limitations under the License.
 16    *
 17    * $Id: MetaService.java 541508 2007-05-25 01:54:12Z vgritsenko $
 18    */
 19   
 20    package org.apache.xindice.client.xmldb.services;
 21   
 22    import org.apache.xindice.client.xmldb.CommonConfigurable;
 23    import org.apache.xindice.client.xmldb.XindiceCollection;
 24    import org.apache.xindice.core.meta.MetaData;
 25   
 26    import org.xmldb.api.base.Collection;
 27    import org.xmldb.api.base.Service;
 28    import org.xmldb.api.base.XMLDBException;
 29   
 30    /**
 31    * Meta information service.
 32    *
 33    * @author <a href="mailto:vgritsenko@apache.org">Vadim Gritsenko</a>
 34    * @version $Revision: 541508 $, $Date: 2007-05-24 18:54:12 -0700 (Thu, 24 May 2007) $
 35    */
 36    public class MetaService extends CommonConfigurable implements Service {
 37   
 38    /**
 39    * Collection that this query service should query in
 40    */
 41    private Collection collection;
 42   
 43  3418 public String getVersion() {
 44  3418 return "1.0";
 45    }
 46   
 47  3418 public String getName() {
 48  3418 return "MetaService";
 49    }
 50   
 51  3418 public void setCollection(Collection collection) {
 52  3418 this.collection = collection;
 53    }
 54   
 55  21 public MetaData getMetaData() throws XMLDBException {
 56  21 return ((XindiceCollection) collection).getMetaData(null);
 57    }
 58   
 59  6 public void setMetaData(MetaData meta) throws XMLDBException {
 60  6 ((XindiceCollection) collection).setMetaData(null, meta);
 61    }
 62   
 63  33 public MetaData getMetaData(String id) throws XMLDBException {
 64  33 return ((XindiceCollection) collection).getMetaData(id);
 65    }
 66   
 67  12 public void setMetaData(String id, MetaData meta) throws XMLDBException {
 68  12 ((XindiceCollection) collection).setMetaData(id, meta);
 69    }
 70   
 71  0 public long getLastModifiedTime() throws XMLDBException {
 72  0 return ((XindiceCollection) collection).getMetaData(null).getLastModifiedTime();
 73    }
 74   
 75  0 public long getCreatedTime() throws XMLDBException {
 76  0 return ((XindiceCollection) collection).getMetaData(null).getCreatedTime();
 77    }
 78   
 79  0 public long getLastModifiedTime(String name) throws XMLDBException {
 80  0 return ((XindiceCollection) collection).getMetaData(name).getLastModifiedTime();
 81    }
 82   
 83  0 public long getCreatedTime(String name) throws XMLDBException {
 84  0 return ((XindiceCollection) collection).getMetaData(name).getCreatedTime();
 85    }
 86    }