2 * Copyright 2005 the original author or authors.
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 package org.wamblee.crawler.impl;
19 import org.dom4j.Element;
20 import org.wamblee.crawler.Action;
21 import org.wamblee.crawler.Crawler;
22 import org.wamblee.crawler.Page;
23 import org.wamblee.crawler.PageType;
28 public class ActionImpl implements Action {
30 private Crawler _crawler;
31 private Element _content;
33 private String _reference;
34 private PageType _type;
36 public ActionImpl(Crawler aCrawler, Element aContent, String aName, String aReference) {
40 _reference = aReference;
44 public ActionImpl(Crawler aCrawler, Element aContent, String aName, String aReference, PageType aType) {
48 _reference = aReference;
53 * @see org.wamblee.crawler.Action#getName()
55 public String getName() {
60 * @see org.wamblee.crawler.Action#execute()
62 public Page execute() {
64 return _crawler.getPage(_reference);
66 return _crawler.getPage(_reference, _type);
70 * @see org.wamblee.crawler.Action#getContent()
72 public Element getContent() {