@Override
	public AttributesDao getAttributesDao(Contents contents) {

		if (contents == null) {
			throw new GeoPackageException("Non null "
					+ Contents.class.getSimpleName()
					+ " is required to create "
					+ AttributesDao.class.getSimpleName());
		}
		if (contents.getDataType() != ContentsDataType.ATTRIBUTES) {
			throw new GeoPackageException(Contents.class.getSimpleName()
					+ " is required to be of type "
					+ ContentsDataType.ATTRIBUTES + ". Actual: "
					+ contents.getDataTypeString());
		}

		// Read the existing table and create the dao
		AttributesTableReader tableReader = new AttributesTableReader(
				contents.getTableName());
		AttributesConnection userDb = new AttributesConnection(database);
		final AttributesTable attributesTable = tableReader.readTable(userDb);
		attributesTable.setContents(contents);
		AttributesDao dao = new AttributesDao(getName(), database, userDb,
				attributesTable);

		return dao;
	}
@ Override public AttributesDao getAttributesDao ( Contents contents ) { if ( contents == null ) { throw new GeoPackageException ( "Non null " + Contents . class . getSimpleName ( ) + " is required to create " + AttributesDao . class . getSimpleName ( ) ) ; } if ( contents . getDataType ( ) != ContentsDataType . ATTRIBUTES ) { throw new GeoPackageException ( Contents . class . getSimpleName ( ) + " is required to be of type " + ContentsDataType . ATTRIBUTES + ". Actual: " + contents . getDataTypeString ( ) ) ; } AttributesTableReader tableReader = new AttributesTableReader ( contents . getTableName ( ) ) ; AttributesConnection userDb = new AttributesConnection ( database ) ; final AttributesTable attributesTable = tableReader . readTable ( userDb ) ; attributesTable . setContents ( contents ) ; AttributesDao dao = new AttributesDao ( getName ( ) , database , userDb , attributesTable ) ; return dao ; }
{@inheritDoc}