next up previous contents
Next: Further information Up: Developer Manual Previous: Reusing Modules   Contents

Database layout

The databases used by the atomsnet applications are standard XML documents. This reduces system complexity, since data can be sent to a client without conversion. Formatting this data into webpages is done on the client's computer through the use of XSLt transformations. More about this client side processing can be found in the User's Manual.

The database layout follows a strict grammar, which has been written down as an XML schema document. Due to the poor validation engine currently part of the XML parser this document is not yet used by the application. Developers are, however, expected to comply to this guideline, so please read it before changing the database layout. The schema document can be found at http://atoms.sourceforge.net/atomsnet.xsd .

To summarize the grammar, the document consists of a standard namespace header and an < rdf > .. < /rdf > pair encapsulating the actual data. No actual rdf validation is used, but adherence to the Resource Description Format is encouraged. Within these tags the < atomsnet > .. < /atomsnet > tags set apart the atomsnet data from possibly other rdf data. This is the root of our actual database. It consist of an application- and a datatree. The application part contains accounting information, such as the number of nodes in the database and the server's ip address(es). The database node can have a possibly unlimited number of subtrees, but contains only 3 in the base distribution, namely the mime, cat and sys trees. These contain MIME-type, Open Directory Project categorization and filesystem dependent information, respectedly.

Each subtree of the database can contain a possibly unlimited number of < resource/ > nodes, describing files. They can also contain a possibly unlimited number of plug-ins as described above.

The resource nodes can contain both subnodes and attributes describing metadata. In the reference version of the application all data is written in attributes. One of these attributes, the ID, works as a key for quick lookups. It is especially useful when finding different resource tags belonging to the same file. As an example, the ID s1 responds to the file with ID 1 in the sys subtree. A resource with ID m1 will have to refer to the same file as the s1 resource, but will reside in the MIME-type subtree.

Apart from the features described in the schema the database can be extended and altered to your personal need. The restrictions laid upon the grammar are needed to allow interoperability between atomsnet applications network wide. An example database containing one file is shown below.

<?xml version="1.0"?>
<?xml-stylesheet type='text/xsl' href='ane_html.xsl'?>
<rdf>
	<atomsnet ip="http://0.0.0.0:80">
		<programdata version="1.1" idcount="1"/>
		<index>
			<sub name="mime">
				<plugin name="anedll_cat_dir_google.dll"/>
				<sub name="audio">
					<sub name="mpeg">
						<plugin name="anedll_mimempegaudio.dll"/>
					</sub>
				</sub>
				<sub name="application">
					<sub name="octet-stream">
						<resource id="m1" sysref="s1" catref="c1" name="atomsnet v1.lnk" size="378" date="2002-7-7" artist="atomsnet v1"/>
					</sub>
				</sub>
			</sub>
			<sub name="sys">
				<plugin name="anedll_mime.dll"/>
				<sub name="c:">
					<sub name="windows">
						<sub name="start menu">
							<sub name="programs">
								<sub name="atomsnet">
									<resource id="s1" mimeref="m1" name="atomsnet v1.lnk"/>
								</sub>
							</sub>
						</sub>
					</sub>
				</sub>
			</sub>
			<sub name="cat">
				<sub name="computers">
					<sub name="software">
						<sub name="operating_systems">
							<sub name="network">
								<sub name="distributed">
									<resource id="c1" mimeref="m1" sysref="s1" artist="atomsnet v1"/>
								</sub>
							</sub>
						</sub>
					</sub>
				</sub>
			</sub>
			<plugin name="anedll_sys.dll"/>
		</index>
	</atomsnet>
</rdf>


next up previous contents
Next: Further information Up: Developer Manual Previous: Reusing Modules   Contents
2002-08-28