KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > cocoon > components > treeprocessor > AbstractProcessingNode


1 /*
2  * Copyright 1999-2004 The Apache Software Foundation.
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 package org.apache.cocoon.components.treeprocessor;
17
18 import java.util.Map JavaDoc;
19
20 import org.apache.avalon.framework.logger.AbstractLogEnabled;
21 import org.apache.cocoon.environment.SourceResolver;
22 import org.apache.cocoon.util.location.Location;
23
24 /**
25  *
26  * @author <a HREF="mailto:sylvain@apache.org">Sylvain Wallez</a>
27  * @version CVS $Id: AbstractProcessingNode.java 232400 2005-08-12 22:14:26Z sylvain $
28  */

29
30 public abstract class AbstractProcessingNode extends AbstractLogEnabled implements ProcessingNode {
31
32     protected Location location = Location.UNKNOWN;
33
34     /**
35      * Get the <code>SourceResolver</code> in an object model.
36      */

37     protected static final SourceResolver getSourceResolver(Map JavaDoc objectModel) {
38         return (SourceResolver)objectModel.get(OBJECT_SOURCE_RESOLVER);
39     }
40
41     /**
42      * Get the location of this node.
43      */

44     public Location getLocation() {
45         return this.location;
46     }
47
48     /**
49      * Set the location of this node.
50      */

51     public void setLocation(Location location) {
52         this.location = location;
53     }
54 }
55
Popular Tags