1 /*
2 * Copyright 2004 University of Hannover
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17 package olr.viewer;
18
19 import olr.rdf.Resource;
20
21 /***
22 * @version $Id: CourseViewerRow.java,v 1.7 2004/08/03 08:33:53 roku Exp $
23 */
24 public class CourseViewerRow extends ModelViewerRow {
25
26 public CourseViewerRow(ModelViewer modelViewer, String resource, int level, boolean isPredicate) {
27 super(modelViewer, resource, level, isPredicate);
28 }
29
30 public CourseViewerRow(ModelViewer modelViewer, String resource, int level) {
31 super(modelViewer, resource, level);
32 }
33
34 public String getTitle() {
35 Resource resourceObj = super.modelViewer.getModel().getStatementPool().getResource(
36 super.resource);
37 if (resourceObj != null)
38 return resourceObj.getTitle();
39 else
40 return "<untitled>";
41 }
42
43 /* public boolean isExpandable() {
44 boolean expandable = super.isExpandable();
45 if (expandable && super.modelViewer.getModel().getSubjects().contains(super.resource))
46 return false;
47 else
48 return expandable;
49 }*/
50 }