Confirmed users, Bureaucrats and Sysops emeriti
2,976
edits
(partly port over from my wiki) |
(more interfaces for the new rdf api) |
||
| Line 7: | Line 7: | ||
Support for reading, enumerating, and manipulating rdf:_1/_2 arcs in an ordered way is added as an intrinsic part of a datasource. This has the potential to reduce codesize and increase performance dramatically throughout the tree. | Support for reading, enumerating, and manipulating rdf:_1/_2 arcs in an ordered way is added as an intrinsic part of a datasource. This has the potential to reduce codesize and increase performance dramatically throughout the tree. | ||
== rdfINode == | |||
The RDF implementations of these interfaces will support [http://lxr.mozilla.org/mozilla/source/xpcom/components/nsIClassInfo.idl nsIClassInfo], so that JS will automatically flatten the interface. They will also support [http://lxr.mozilla.org/mozilla/source/caps/idl/nsISecurityCheckedComponent.idl nsISecurityCheckedComponent] (allowing all access, except for rdfIResourceInternal, which we may not need at all). | The RDF implementations of these interfaces will support [http://lxr.mozilla.org/mozilla/source/xpcom/components/nsIClassInfo.idl nsIClassInfo], so that JS will automatically flatten the interface. They will also support [http://lxr.mozilla.org/mozilla/source/caps/idl/nsISecurityCheckedComponent.idl nsISecurityCheckedComponent] (allowing all access, except for rdfIResourceInternal, which we may not need at all). | ||
| Line 26: | Line 26: | ||
''The noscript methods may be a premature optimization. The major drawback is that if we have noscript methods, COM can't proxy or remote this interface.'' | ''The noscript methods may be a premature optimization. The major drawback is that if we have noscript methods, COM can't proxy or remote this interface.'' | ||
== rdfIResource == | |||
Note: we are getting rid of resource factories, so nobody is allowed to implement RDF resources except the internal RDF service implementations. | Note: we are getting rid of resource factories, so nobody is allowed to implement RDF resources except the internal RDF service implementations. | ||
| Line 53: | Line 53: | ||
releaseDelegate(in AUTF8String aKey); | releaseDelegate(in AUTF8String aKey); | ||
}; | }; | ||
== rdfITripleVisitor == | |||
interface rdfITripleVisitor : nsISupports | |||
{ | |||
void visit(in nsIRDFResource aSubject, in nsIRDFResource aPredicate, | |||
in nsIRDFNode aObject, in boolean aTruthValue); | |||
}; | |||
RdfLiterals | RdfLiterals | ||
== rdfIDataSource == | |||
interface rdfIDataSource : nsISupports | |||
{ | |||
/** | |||
* Visit all the subject resources in the datasource. The order is | |||
* intederminate and may change from one invocation to the next. | |||
* The subjects will be in the aSubject argument in calls into | |||
* aVisitor, aPredicate and aObject will be null. | |||
* @note Implementations may throw NS_ERROR_NOT_IMPLEMENTED for | |||
* this method, but in this case RDF serializations of this | |||
* datasource will not be possible. | |||
*/ | |||
void visitAllSubjects(in rdfITripleVisitor aVisitor); | |||
/** | |||
* Visit all the triples in the datasource. The order is | |||
* intederminate and may change from one invocation to the next. | |||
* @note Implementations may throw NS_ERROR_NOT_IMPLEMENTED for | |||
* this method, but in this case RDF serializations of this | |||
* datasource will not be possible. | |||
*/ | |||
void visitAllTriples(in rdfITripleVisitor aVisitor); | |||
}; | |||
RdfService | RdfService | ||