[Opensim-dev] AssetBase and metadata

Sean Dague sdague at gmail.com
Thu Jan 29 17:07:05 UTC 2009


Justin Clark-Casey wrote:
> Mike Mazur wrote:
>> Hi,
>>
>> In Cable Beach all asset information is split over two datatypes:
>>
>> - the Metadata class[1]
>> - a byte array containing the actual asset data
>>
>> In OpenSim we have the AssetBase class[2] which contains asset metadata
>> and data together. I'd like to modify the AssetBase class in OpenSim
>> so it's composed of one Metadata class.
>>
>> So instead of having:
>>
>>   AssetBase ab = new AssetBase();
>>   ab.Name = "some name";
>>   ab.Description = "some description";
>>
>> I would write:
>>
>>   AssetBase ab = new AssetBase();
>>   ab.Metadata.Name = "some name";
>>   ab.Metadata.Description = "some description";
>>
> 
> Just to clarify, you're anticipating changing the OpenSim.Framework.AssetBase class (instead of having a parallel class 
> in the AssetServer code)?  If so, sounds good to me.
> 
>> I would define the Metadata class in AssetBase.cs. The serialization
>> and deserialization methods currently in the Metadata class may or may
>> not be included; I see those methods belonging in the Utils class[3],
>> perhaps.
>>
>> The Metadata class itself will immediately be used within the new asset
>> server, and I can see it being useful elsewhere in the future.
>>
>> Should the Metadata class be renamed to AssetMetadata? Any other
>> thoughts?
> 
>  From a readability perspective I would rather see it remain as just Metadata, since something like
> 
> AssetBase myAsset = new AssetBase();
> myAsset.AssetMetadata.Name = "Heloooo";
> 
> looks kind of redundant to me (though this may just be a taste issue).

Agreed on the redundancy parts.  The foo.fooName that is everywhere in
the source just makes for a lot more typing.  Let's not do more of that. :)

	-Sean

-- 
Sean Dague / Neas Bade
sdague at gmail.com
http://dague.net


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
URL: <http://opensimulator.org/pipermail/opensim-dev/attachments/20090129/1ab785b3/attachment-0001.pgp>


More information about the Opensim-dev mailing list