Source code: javax/ide/model/Recognizer.java
1 package javax.ide.model;
2
3 import java.net.URI;
4
5 import javax.ide.util.MetaClass;
6
7 /**
8 * The {@link Recognizer} interface provides the API for recognizing
9 * data types from specific uris.<P>
10 *
11 * Data model frameworks can register their own recognizer with the
12 * {@link DocumentFactory}.
13 *
14 * @see DocumentFactory
15 */
16 public abstract class Recognizer
17 {
18 /**
19 * Gets the {@link Class} of the data item associated with the
20 * specified {@link URI}. Implementations must return
21 * <CODE>null</CODE> if the {@link URI} is not recognized. The
22 * {@link Class} returned must be the data model class.
23 *
24 * @param uri unique {@link URI} identifying the document.
25 * @return the document {@link MetaClass}.
26 */
27 public abstract MetaClass recognize( URI uri );
28
29 }