def set(self, key, value, indexed=True):
		"""
			Sets a property.

			:param key: key of the property to set.
			:type key: str
			:param value: Any value to set tot the property.

			:param indexed: Defines if the value is indexed.
			:type indexed: bool

			:raises: :exc:`BadPropertyError` if the property name is the \
			empty string or not a string.
			:raises: :exc:`BadValueError` if the value is not a supported type.
		"""
		unindexed = list(self.getUnindexedProperties())

		if not indexed and not key in unindexed:
			unindexed.append(key)
			self.setUnindexedProperties(unindexed)
		elif indexed and key in unindexed:
			unindexed.remove(key)
			self.setUnindexedProperties(unindexed)

		self[key] = value