public function build()
	{
		if($this->displayName == NULL)
			throw new SocialRecordFormatException('SocialRecord: displayName must be specified for instantiation');
		if($this->profileLocation == NULL)
			throw new SocialRecordFormatException('SocialRecord: profileLocation must be specified for instantiation');
		if($this->personalPublicKey == NULL)
			throw new SocialRecordFormatException('SocialRecord: personalPublicKey must be specified for instantiation');
		if($this->accountPublicKey == NULL)
			throw new SocialRecordFormatException('SocialRecord: accountPublicKey must be specified for instantiation');
		if($this->type == NULL)
			throw new SocialRecordFormatException('SocialRecord: type must be specified for instantiation');
		
		if($this->type != SocialRecord::TYPE_PLATFORM && $this->type != SocialRecord::TYPE_USER && $this->type != SocialRecord::TYPE_PAGE)
			throw new SocialRecordFormatException('SocialRecord: Invalid type value [' . $this->type . ']');
		
		if($this->salt == NULL)
			$this->salt = Random::getRandom(SocialRecord::SALT_CHARS/2);
		if($this->datetime == NULL)
			$this->datetime = XSDDateTime::getXSDDateTime();
		if($this->globalID == NULL)
			$this->globalID = GID::createGID($this->personalPublicKey, $this->salt);
		if(!GID::isValid($this->globalID))
			throw new SocialRecordFormatException('SocialRecord: Invalid globalID value [' . $this->globalID . ']');
			
		if($this->platformGID == NULL && $this->type == SocialRecord::TYPE_PLATFORM)
			$this->platformGID = $this->globalID;
		if($this->platformGID == NULL)
			throw new SocialRecordFormatException('SocialRecord: platformGID must be specified for instantiation');
		if(!GID::isValid($this->platformGID))
			throw new SocialRecordFormatException('SocialRecord: Invalid platformGID value [' . $this->platformGID . ']');
		
		if($this->keyRevocationList == NULL)
			$this->keyRevocationList = array();
		if($this->active == NULL)
			$this->active = 1;
		
		return new SocialRecord($this);
	}