Summary.java revision 1185
/*
* Copyright 2005 The Apache Software Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/** A document summary dynamically generated to match a query. */
public class Summary {
char c;
for(int i=0; i < q.length() ; i++) {
c = q.charAt(i);
if (c == '&') {
} else if(c == '>') {
} else if(c == '<') {
} else {
}
}
}
/** A fragment of text within a summary. */
public static class Fragment {
/** Constructs a fragment for the given text. */
/** Returns the text of this fragment. */
/** Returns true iff this fragment is to be highlighted. */
public boolean isHighlight() { return false; }
/** Returns true iff this fragment is an ellipsis. */
public boolean isEllipsis() { return false; }
/** Returns an HTML representation of this fragment. */
}
/** A highlighted fragment of text within a summary. */
/** Constructs a highlighted fragment for the given text. */
/** Returns true. */
public boolean isHighlight() { return true; }
/** Returns an HTML representation of this fragment. */
}
/** An ellipsis fragment within a summary. */
/** Constructs an ellipsis fragment for the given text. */
public Ellipsis() { super(" ... "); }
/** Returns true. */
public boolean isEllipsis() { return true; }
/** Returns an HTML representation of this fragment. */
}
/** Adds a fragment to a summary.*/
/** Returns an array of all of this summary's fragments.*/
public Fragment[] getFragments() {
}
/** Returns an HTML representation of this fragment. */
}
}
}