01 /* This file is part of the project "Hilbert II" - http://www.qedeq.org
02 *
03 * Copyright 2000-2013, Michael Meyling <mime@qedeq.org>.
04 *
05 * "Hilbert II" is free software; you can redistribute
06 * it and/or modify it under the terms of the GNU General Public
07 * License as published by the Free Software Foundation; either
08 * version 2 of the License, or (at your option) any later version.
09 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 */
15
16 package org.qedeq.kernel.se.base.module;
17
18
19 /**
20 * Marker interface for different node types. Might be a definition or theorem or else.
21 *
22 * TODO mime 20050707: an interface must not know its implementations. This one does! This was
23 * necessary as a quick hack to get some information in QedeqBoFactory and Context2XPath.
24 * mime 20051216 I still see no solution to get round this. Some JUnit tests work against
25 * this interface and get no information about the instance.
26 *
27 * @author Michael Meyling
28 */
29 public interface NodeType {
30
31 /**
32 * Get axiom, if this is an instance of {@link Axiom}.
33 *
34 * @return Axiom, maybe <code>null</code>.
35 */
36 public Axiom getAxiom();
37
38 /**
39 * Get definition, if this is an instance of {@link PredicateDefinition}.
40 *
41 * @return Definition, maybe <code>null</code>.
42 */
43 public PredicateDefinition getPredicateDefinition();
44
45 /**
46 * Get initial definition, if this is an instance of {@link InitialPredicateDefinition}.
47 *
48 * @return Definition, maybe <code>null</code>.
49 */
50 public InitialPredicateDefinition getInitialPredicateDefinition();
51
52 /**
53 * Get definition, if this is an instance of {@link InitialFunctionDefinition}.
54 *
55 * @return Definition, maybe <code>null</code>.
56 */
57 public InitialFunctionDefinition getInitialFunctionDefinition();
58
59 /**
60 * Get definition, if this is an instance of {@link FunctionDefinition}.
61 *
62 * @return Definition, maybe <code>null</code>.
63 */
64 public FunctionDefinition getFunctionDefinition();
65
66 /**
67 * Get proposition, if this is an instance of {@link Proposition}.
68 *
69 * @return Proposition, maybe <code>null</code>.
70 */
71 public Proposition getProposition();
72
73 /**
74 * Get rule, if this is an instance of {@link Rule}.
75 *
76 * @return Rule, maybe <code>null</code>.
77 */
78 public Rule getRule();
79
80 }
|