com.mkdoc.jspider
Class RdfContentTypeOnlyRule

java.lang.Object
  |
  +--net.javacoding.jspider.core.rule.impl.BaseRuleImpl
        |
        +--com.mkdoc.jspider.RdfContentTypeOnlyRule
All Implemented Interfaces:
net.javacoding.jspider.spi.Rule

public class RdfContentTypeOnlyRule
extends net.javacoding.jspider.core.rule.impl.BaseRuleImpl

A rule for processing only RDF content types.

Version:
0.1 2005-04-11
Author:
Philip Shaw

Field Summary
private static java.lang.String[] TYPES
          An array of accepted content types.
 
Constructor Summary
RdfContentTypeOnlyRule()
           
 
Method Summary
private  boolean accept(java.lang.String mime)
          Check whether a MIME type is accepted by this rule.
 net.javacoding.jspider.api.model.Decision apply(net.javacoding.jspider.core.SpiderContext context, net.javacoding.jspider.api.model.Site currentSite, java.net.URL url)
          Decide whether to process a given URL.
 
Methods inherited from class net.javacoding.jspider.core.rule.impl.BaseRuleImpl
getName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TYPES

private static final java.lang.String[] TYPES
An array of accepted content types.

Since:
Version 0.1 2005-04-11
Constructor Detail

RdfContentTypeOnlyRule

public RdfContentTypeOnlyRule()
Method Detail

apply

public final net.javacoding.jspider.api.model.Decision apply(net.javacoding.jspider.core.SpiderContext context,
                                                             net.javacoding.jspider.api.model.Site currentSite,
                                                             java.net.URL url)
Decide whether to process a given URL.

Specified by:
apply in interface net.javacoding.jspider.spi.Rule
Specified by:
apply in class net.javacoding.jspider.core.rule.impl.BaseRuleImpl
Parameters:
context - The spidering context for the URL.
currentSite - The site the URL belongs to.
url - The URL to decide upon.
Returns:
A decision whether to accept this URL for processing.
Since:
Version 0.1 2005-04-11

accept

private final boolean accept(java.lang.String mime)
Check whether a MIME type is accepted by this rule.

Parameters:
mime - The MIME type declared by the origin server.
Returns:
true if the type is accepted.
Since:
Version 0.1 2005-04-11