X-Git-Url: http://wamblee.org/gitweb/?a=blobdiff_plain;f=crawler%2Fbasic%2Fsrc%2Forg%2Fwamblee%2Fcrawler%2Fimpl%2FActionImpl.java;fp=crawler%2Fbasic%2Fsrc%2Forg%2Fwamblee%2Fcrawler%2Fimpl%2FActionImpl.java;h=c36637353b6ef2a1588c67e85b629ef3035db9f2;hb=5abc820d10495d559cac9aede0a62521659bced4;hp=e5dac7d0a00dca03ec72f547d0728c0de7b4eea5;hpb=2415e335184c5d6f58f261d26b95f6c22f55ae0d;p=utils diff --git a/crawler/basic/src/org/wamblee/crawler/impl/ActionImpl.java b/crawler/basic/src/org/wamblee/crawler/impl/ActionImpl.java index e5dac7d0..c3663735 100644 --- a/crawler/basic/src/org/wamblee/crawler/impl/ActionImpl.java +++ b/crawler/basic/src/org/wamblee/crawler/impl/ActionImpl.java @@ -12,7 +12,7 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */ + */ package org.wamblee.crawler.impl; @@ -24,53 +24,93 @@ import org.wamblee.crawler.PageException; import org.wamblee.crawler.PageType; /** - * + * Action implementation. */ public class ActionImpl implements Action { - - private Crawler _crawler; - private Element _content; - private String _name; - private String _reference; - private PageType _type; - - public ActionImpl(Crawler aCrawler, Element aContent, String aName, String aReference) { - _crawler = aCrawler; - _content = aContent; + + private Crawler _crawler; + + private Element _content; + + private String _name; + + private String _reference; + + private PageType _type; + + /** + * Constructs the action. + * + * @param aCrawler + * Crawler to use. + * @param aContent + * Content of the action element in the page where the action + * occurs. + * @param aName + * Name of the action. + * @param aReference + * URL of the reference. + */ + public ActionImpl(Crawler aCrawler, Element aContent, String aName, + String aReference) { + _crawler = aCrawler; + _content = aContent; _name = aName; _reference = aReference; - _type = null; + _type = null; } - - public ActionImpl(Crawler aCrawler, Element aContent, String aName, String aReference, PageType aType) { + + /** + * Constructs the action. + * + * @param aCrawler + * Crawler to use. + * @param aContent + * Content of the action element in the page where the action + * occurs. + * @param aName + * Name of the action. + * @param aReference + * URL of the reference. + * @param aType + * Type of the referenced page. + */ + public ActionImpl(Crawler aCrawler, Element aContent, String aName, + String aReference, PageType aType) { _crawler = aCrawler; - _content = aContent; + _content = aContent; _name = aName; - _reference = aReference; - _type = aType; + _reference = aReference; + _type = aType; } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see org.wamblee.crawler.Action#getName() */ public String getName() { return _name; } - - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see org.wamblee.crawler.Action#execute() */ public Page execute() throws PageException { - if ( _type == null) { + if (_type == null) { return _crawler.getPage(_reference); } return _crawler.getPage(_reference, _type); } - - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see org.wamblee.crawler.Action#getContent() */ public Element getContent() { - return _content; + return _content; } }