⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 extensionpoint.java

📁 爬虫数据的改进,并修正了一些bug
💻 JAVA
字号:
/*
 * Copyright (c) 2003 The Nutch Organization. All rights reserved. Use subject
 * to the conditions in http://www.nutch.org/LICENSE.txt.
 */
package net.nutch.plugin;
import java.util.ArrayList;
/**
 * The <code>ExtensionPoint</code> provide meta information of a extension
 * point.
 * 
 * @author joa23
 */
public class ExtensionPoint {
  private String ftId;
  private String fName;
  private String fSchema;
  private ArrayList fExtensions;
  /**
   * Constructor
   * 
   * @param pId
   *            unique extension point Id
   * @param pName
   *            name of the extension poin
   * @param pSchema
   *            xml schema of the extension point
   */
  public ExtensionPoint(String pId, String pName, String pSchema) {
    setId(pId);
    setName(pName);
    setSchema(pSchema);
    fExtensions = new ArrayList();
  }
  /**
   * Returns the unique id of the extension point.
   * 
   * @return String
   */
  public String getId() {
    return ftId;
  }
  /**
   * Returns the name of the extension point.
   * 
   * @return String
   */
  public String getName() {
    return fName;
  }
  /**
   * Returns a path to the xml schema of a extension point.
   * 
   * @return String
   */
  public String getSchema() {
    return fSchema;
  }
  /**
   * Sets the extensionPointId.
   * 
   * @param extension point id
   *            The extensionPointId to set
   */
  private void setId(String pId) {
    ftId = pId;
  }
  /**
   * Sets the extension point name.
   * 
   * @param extensionPointName
   *            The extensionPointName to set
   */
  private void setName(String pName) {
    fName = pName;
  }
  /**
   * Sets the schema.
   * 
   * @param schema
   *            The schema to set
   */
  private void setSchema(String pSchema) {
    fSchema = pSchema;
  }
  /**
   * Install a  coresponding extension to this extension point.
   * 
   * @param extension
   */
  public void addExtension(Extension extension) {
    fExtensions.add(extension);
  }
  /**
   * Returns a array of extensions that lsiten to this extension point
   * 
   * @return Extension[]
   */
  public Extension[] getExtentens() {
    return (Extension[]) fExtensions.toArray(new Extension[fExtensions
                                                           .size()]);
  }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -