01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */
17: package org.apache.cocoon.components.treeprocessor;
18:
19: import java.util.Map;
20:
21: import org.apache.avalon.framework.logger.AbstractLogEnabled;
22: import org.apache.cocoon.environment.SourceResolver;
23: import org.apache.cocoon.util.location.Location;
24:
25: /**
26: *
27: * @author <a href="mailto:sylvain@apache.org">Sylvain Wallez</a>
28: * @version CVS $Id: AbstractProcessingNode.java 446922 2006-09-16 19:24:36Z vgritsenko $
29: */
30:
31: public abstract class AbstractProcessingNode extends AbstractLogEnabled
32: implements ProcessingNode {
33:
34: protected Location location = Location.UNKNOWN;
35:
36: /**
37: * Get the <code>SourceResolver</code> in an object model.
38: */
39: protected static SourceResolver getSourceResolver(Map objectModel) {
40: return (SourceResolver) objectModel.get(OBJECT_SOURCE_RESOLVER);
41: }
42:
43: /**
44: * Get the location of this node.
45: */
46: public Location getLocation() {
47: return this .location;
48: }
49:
50: /**
51: * Set the location of this node.
52: */
53: public void setLocation(Location location) {
54: this.location = location;
55: }
56: }
|