?? rewriter.html
字號:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_02) on Mon Jan 14 15:06:28 GMT 2008 -->
<TITLE>
Rewriter
</TITLE>
<META NAME="date" CONTENT="2008-01-14">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Rewriter";
}
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<HR>
<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/Rewriter.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
PREV CLASS
<A HREF="../../../../../org/semanticweb/kaon2/extensionapi/rewriter/RewriterContext.html" title="interface in org.semanticweb.kaon2.extensionapi.rewriter"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../index.html?org/semanticweb/kaon2/extensionapi/rewriter/Rewriter.html" target="_top"><B>FRAMES</B></A>
<A HREF="Rewriter.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
org.semanticweb.kaon2.extensionapi.rewriter</FONT>
<BR>
Interface Rewriter<IN,OUT></H2>
<HR>
<DL>
<DT><PRE>public interface <B>Rewriter<IN,OUT></B></DL>
</PRE>
<P>
Represents an object that can transform axioms and rules while processing queries. Rewriters are created by corresponding RewriterFactory objects that are registered with an instance of a Reasoner object. When a Reasoner processes a query, it retrieves the axioms from the accompanying ontology and passes them through a sequence of registerd rewriters, in order to obtain a set of rules used to evaluate the query. Certain rewriters, such as translating the OWL axioms into disjunctive datalog rules, are internal to the Reasoner. However, users can insert their own rewriters into the pipeline in order to apply some custom preprocessing of the rules. <p>It is important to understand that a rewriter is an object used by the reasoner in its internal processes. Hence, a rewriter should not attempt to perform reasoning tasks, such as answering queries, as this would lead to an infinite loop. A Rewriter is free to obtain the Ontology object from the RewriterContext and use the standard retrieval interface to obtain axioms and facts. A Rewriter should not attempt to modify the ontology: apart from an unintuitive semantics, this would require acquiring a write lock on the ontology; since the Reasoner calling the rewriter already holds a read lock, a deadlock would arise.
<P>
<P>
<HR>
<P>
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> java.util.Collection<<A HREF="../../../../../org/semanticweb/kaon2/extensionapi/rewriter/Rewriter.html" title="type parameter in Rewriter">OUT</A>></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/semanticweb/kaon2/extensionapi/rewriter/Rewriter.html#rewrite(org.semanticweb.kaon2.extensionapi.rewriter.RewriterContext, java.util.Collection)">rewrite</A></B>(<A HREF="../../../../../org/semanticweb/kaon2/extensionapi/rewriter/RewriterContext.html" title="interface in org.semanticweb.kaon2.extensionapi.rewriter">RewriterContext</A> rewriterContext,
java.util.Collection<<A HREF="../../../../../org/semanticweb/kaon2/extensionapi/rewriter/Rewriter.html" title="type parameter in Rewriter">IN</A>> objects)</CODE>
<BR>
Invoked to transform a collection of objects.</TD>
</TR>
</TABLE>
<P>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="rewrite(org.semanticweb.kaon2.extensionapi.rewriter.RewriterContext, java.util.Collection)"><!-- --></A><H3>
rewrite</H3>
<PRE>
java.util.Collection<<A HREF="../../../../../org/semanticweb/kaon2/extensionapi/rewriter/Rewriter.html" title="type parameter in Rewriter">OUT</A>> <B>rewrite</B>(<A HREF="../../../../../org/semanticweb/kaon2/extensionapi/rewriter/RewriterContext.html" title="interface in org.semanticweb.kaon2.extensionapi.rewriter">RewriterContext</A> rewriterContext,
java.util.Collection<<A HREF="../../../../../org/semanticweb/kaon2/extensionapi/rewriter/Rewriter.html" title="type parameter in Rewriter">IN</A>> objects)
throws <A HREF="../../../../../org/semanticweb/kaon2/api/KAON2Exception.html" title="class in org.semanticweb.kaon2.api">KAON2Exception</A>,
java.lang.InterruptedException</PRE>
<DL>
<DD>Invoked to transform a collection of objects.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>rewriterContext</CODE> - the object specifying the context in which the rewriter was called<DD><CODE>objects</CODE> - the objects to be transformed
<DT><B>Returns:</B><DD>the trasnformed collection of objects
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../org/semanticweb/kaon2/api/KAON2Exception.html" title="class in org.semanticweb.kaon2.api">KAON2Exception</A></CODE> - thrown if there is an error
<DD><CODE>java.lang.InterruptedException</CODE> - thrown if the process is interrupted</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/Rewriter.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
PREV CLASS
<A HREF="../../../../../org/semanticweb/kaon2/extensionapi/rewriter/RewriterContext.html" title="interface in org.semanticweb.kaon2.extensionapi.rewriter"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../index.html?org/semanticweb/kaon2/extensionapi/rewriter/Rewriter.html" target="_top"><B>FRAMES</B></A>
<A HREF="Rewriter.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
</BODY>
</HTML>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -