Built in Types

'''This page contains information that is no longer up-to-date. See Semantic MediaWiki for a list of current features.'''

To make the use of types easier, we can introduce built-in types. This matches the current implementation best which doesn't care about Type-Definitions and should make the lives of Wikipedians easier when they want to define a new Attribute and don't want to care about things like Datatypes. Also this technique will be easier to implement and therefore lead to a release-date without the need to take care at things like user-side Type definitions. Also by making it possible to use fixed data-structures, it will be easier to implement seach engines based on these types. Built-in-Types are recognised by a parser which tries to get the meaning from the structure of the string.

Relations to current implementation plan
The current plan for implementation is already very close to this proposal. The general idea is that we provide a fixed (hard-coded) set of data types, which define not only the type of the stored data, but the whole input format that is allowed for an attribute. In general, users will assign these fixed types to the attributes on the attribute pages and the system then will use this type. Types can be "integer" or "string" but also "length" (where one can use units km, m, miles, etc. which are then converted automatically), date (where one can enter calendar dates in various formats), or "global coordinates" (where one uses specific syntax to denote two values of longitude and latitude). So this idea covers most of what is said below.

Now for the case that users employ new attributes for which no type was specified yet, we will try to do what we can to still use them. This will probably mean that we will try to evaluate the given input as a (floating point) number (possibly with a unit string), and if this fails, we will just treat the input as a string. Further differentiation will probably not be useful, since it is often ambiguous which type a given input belongs to.

'''It is easily possible to get your own code for supporting some unit into the system. In the file SMW_Datatype.php from the current CVS on Sourceforge, you will find the code that handles different types (integer, string, undefined,