Hi Sören,
What you need to do is this:
- when including exhibit-api.js, add ?autoCreate=false to the end of the
URL.
- add an onload handler to <body>.
- in that onload handler, you want to do something like the code here
http://static.simile.mit.edu/exhibit/api-2.0/scripts/create.js
but you also want to do your auto configuration before
window.exhibit = Exhibit.create();
The database object has a few methods for inspecting the properties.
var propertyIDs = window.database.getAllProperties();
for (var i = 0; i < propertyIDs.length; i++) {
var propertyID = propertyIDs[i];
var property = window.database.getProperty(propertyID);
switch (property.getValueType()) {
case "number": ...
case "date": ...
...
}
}
The database is implemented here:
http://static.simile.mit.edu/exhibit/api-2.0/scripts/data/database.js
Hope that helps,
David
Sören Auer wrote:
> Hi all,
>
> We use Exhibit as a facet-based data browser for RDF/N3 data sources on
> Triplify [1]. Since, we don't know the vocabulary used in the data
> sources in advance, we thought it could be nice to have some kind of
> auto-configuration feature in Exhibit.
>
> The auto-configuration should analyze the used properties and property
> values within the data source and create facet filters based on some
> heuristics. E.g., when property values of a certain property take only a
> small number of values this property should be used as a facet. I think
> some similar functionality is implemented in Longwell.
>
> I was searching the docs for any clues on how to start an
> implementation, but the technical architecture of Exhibit does not seem
> to be much documented (or am I wrong)? What's your opinion about such a
> feature? Do you have some hints how an implementation should be
> performed? Is there anybody who would like to work on such a feature?
>
> I already pledged some money for such an implementation on Cofundos.org
> [2] - if some more people do the same maybe this could be an incentive
> for somebody to start an implementation.
>
> Sören
>
>
> [1] http://triplify.org
> [2] http://cofundos.org/project.php?id=105
>
> --------------------------------------------------------------
> Dr. Sören Auer - University of Leipzig, Computer Science Dept.
> http://www.informatik.uni-leipzig.de/~auer, +49 (32) 222201209
> _______________________________________________
> General mailing list
> [email protected]
> http://simile.mit.edu/mailman/listinfo/general
>
_______________________________________________
General mailing list
[email protected]
http://simile.mit.edu/mailman/listinfo/general