throw new XMLDBException(ErrorCodes.INVALID_RESOURCE, "resource " + id + " already exists");
}
container = XMLContainer.newContainer(database, id);
//System.out.println("CollectionImpl.createResource() - created XMLContainer, adding id to the XMLCollection");
collection.addResource(id);
return new XMLResourceImpl(id, database, this, container);
} else if ( type.equals(BinaryResource.RESOURCE_TYPE) ) {
//return new BinaryResourceImpl(this, id);
throw new XMLDBException( ErrorCodes.VENDOR_ERROR, "BinaryResource: Not yet implemented");
} else {
throw new XMLDBException(ErrorCodes.UNKNOWN_RESOURCE_TYPE);