Find file
Fetching contributors…
Cannot retrieve contributors at this time
54 lines (45 sloc) 2.41 KB
#This is some knowledge that is used in the Tabulator.
#As opposed to the Tabulator ontology, this should be totally configurable.
@prefix tabont: <>.
@prefix rdfs: <>.
@prefix dc: <>.
@prefix owl: <>.
@prefix log: <>.
@prefix rdf: <>.
@keywords a.
#### Ontological (if accepted, move to tabont)
tabont:onfillin a owl:DatatypeProperty, rdf:Property;
rdfs:domain tabont:Request.
#### Template for new documents
#{?file a tabont:NewRDFDocument} => {?file...}
tabont:NewRDFDocument rdfs:subClassOf tabont:Document.
#confusion between document and it's content formula, anyway, a shortcut
defaultNew a tabont:NewRDFDocument, log:Formula;
dc:format [a tabont:Request; tabont:message "(Please select a document format.)"];
owl:unionOf [a tabont:Request;
tabont:message "(Please drag data you want to output into this field.)";
tabont:onfillin """
// function WriteToFileRepresentedBy (subject){
var filePath=subject.uri.split('file://')[1];
var file = Components.classes[";1"]
var foStream = Components.classes[";1"]
foStream.init(file, 0x02 | 0x10 ,0666,0); // write, append
var outputFormulaTerm=kb.any(subject,OWL('unionOf'));
var accesskey=kb.the(outputFormulaTerm,tabont('accesskey')).value
var theClass=(accesskey=="knowledge base")?kb.constructor.SuperClass:RDFFormula;
var outputFormula=theClass.instances[accesskey];
var data=outputFormula.toString().slice(2,-1);
foStream.write(data, data.length);
// }
#interesting logic we should discuss...
log:Formula dc:alternative "RDFCollection";
tabont:collectionOf rdf:Statement.
log:Formula rdfs:subClassOf tabont:Collection.
tabont:Collection dc:alternative "Set";
rdfs:seeAlso <urn:isbn:0412808307>.
tabont:Collection subClassOf owl:Class.