View Javadoc
1 package net.sf.fastxmldb.impl; 2 3 import org.xmldb.api.base.Collection; 4 import org.xmldb.api.base.ErrorCodes; 5 import org.xmldb.api.base.XMLDBException; 6 import org.xmldb.api.modules.CollectionManagementService; 7 8 /*** 9 * 10 * @author jbirchfield 11 */ 12 public class LocalCollectionManagementService 13 implements CollectionManagementService { 14 15 /*** 16 * The CollectionManagementService name 17 */ 18 public static final String COLLECTION_MANAGEMENT_SERVICE_NAME = 19 "CollectionManagementService"; 20 21 /*** 22 * The CollectionManagementService version 23 */ 24 public static final String COLLECTION_MANAGEMENT_SERVICE_VERSION = "1.0"; 25 26 private final CollectionBroker collectionBroker = 27 CollectionBroker.getInstance(); 28 29 /*** 30 * 31 * @see org.xmldb.api.modules.CollectionManagementService#createCollection 32 */ 33 public Collection createCollection(String name) throws XMLDBException { 34 Collection collection = collectionBroker.getCollection(name); 35 if (collection == null) { 36 collection = new LocalCollection(name); 37 collectionBroker.addCollection(collection); 38 } 39 return collection; 40 } 41 42 /*** 43 * not yet implemented 44 * @see org.xmldb.api.modules.CollectionManagementService#removeCollection 45 */ 46 public void removeCollection(String s) throws XMLDBException { 47 throw new XMLDBException(ErrorCodes.NOT_IMPLEMENTED); 48 } 49 50 /*** 51 * 52 * @see org.xmldb.api.base.Service#getName() 53 */ 54 public String getName() throws XMLDBException { 55 return COLLECTION_MANAGEMENT_SERVICE_NAME; 56 } 57 58 /*** 59 * 60 * @see org.xmldb.api.base.Service#getVersion() 61 */ 62 public String getVersion() throws XMLDBException { 63 return COLLECTION_MANAGEMENT_SERVICE_VERSION; 64 } 65 66 /*** 67 * not yet implemented 68 * @see org.xmldb.api.base.Service#setCollection(Collection) 69 */ 70 public void setCollection(Collection collection) throws XMLDBException { 71 throw new XMLDBException(ErrorCodes.NOT_IMPLEMENTED); 72 } 73 74 /*** 75 * not yet implemented 76 * @see org.xmldb.api.base.Configurable#getProperty(String) 77 */ 78 public String getProperty(String s) throws XMLDBException { 79 throw new XMLDBException(ErrorCodes.NOT_IMPLEMENTED); 80 } 81 82 /*** 83 * not yet implemented 84 * @see org.xmldb.api.base.Configurable#setProperty(String, String) 85 */ 86 public void setProperty(String s, String s1) throws XMLDBException { 87 throw new XMLDBException(ErrorCodes.NOT_IMPLEMENTED); 88 } 89 }

This page was automatically generated by Maven