01: /*
02: * Helma License Notice
03: *
04: * The contents of this file are subject to the Helma License
05: * Version 2.0 (the "License"). You may not use this file except in
06: * compliance with the License. A copy of the License is available at
07: * http://adele.helma.org/download/helma/license.txt
08: *
09: * Copyright 1998-2003 Helma Software. All Rights Reserved.
10: *
11: * $RCSfile$
12: * $Author: root $
13: * $Revision: 8604 $
14: * $Date: 2007-09-28 15:16:38 +0200 (Fre, 28 Sep 2007) $
15: */
16:
17: package helma.doc;
18:
19: import helma.framework.repository.Resource;
20:
21: /**
22: * abstract class for extracting doc information from files.
23: * not used at the moment but left in for further extensions-
24: */
25: public abstract class DocResourceElement extends DocElement {
26:
27: protected Resource resource;
28:
29: protected DocResourceElement(String name, Resource res, int type) {
30: super (name, type);
31: this .resource = res;
32: }
33:
34: /**
35: * Get a string describing this element's location
36: *
37: * @return string representation of the element's resource
38: */
39: public String toString() {
40: return resource.getName();
41: }
42:
43: /**
44: * Get the line number this element starts in. Defaults to 0.
45: * @return the first line of this element within its resource
46: */
47: public int getStartLine() {
48: return 0;
49: }
50: }
|