Revision: 3606 http://archive-access.svn.sourceforge.net/archive-access/?rev=3606&view=rev Author: binzino Date: 2012-01-26 20:51:04 +0000 (Thu, 26 Jan 2012) Log Message: ----------- Add robots to list of meta tags. Modified Paths: -------------- tags/nutchwax-0_13-JIRA-WAX-75/archive/src/plugin/html-decorator/src/java/org/archive/nutchwax/html/HtmlDecorator.java Modified: tags/nutchwax-0_13-JIRA-WAX-75/archive/src/plugin/html-decorator/src/java/org/archive/nutchwax/html/HtmlDecorator.java =================================================================== --- tags/nutchwax-0_13-JIRA-WAX-75/archive/src/plugin/html-decorator/src/java/org/archive/nutchwax/html/HtmlDecorator.java 2012-01-26 02:45:25 UTC (rev 3605) +++ tags/nutchwax-0_13-JIRA-WAX-75/archive/src/plugin/html-decorator/src/java/org/archive/nutchwax/html/HtmlDecorator.java 2012-01-26 20:51:04 UTC (rev 3606) @@ -1,3 +1,19 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * 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.archive.nutchwax.html; @@ -15,7 +31,11 @@ import org.w3c.dom.DocumentFragment; - +/** + * Simple HtmlParseFilter which copies the important meta tags to the + * Content metadata. At the moment the important ones are: robots, + * description, keywords. + */ public class HtmlDecorator implements HtmlParseFilter { private Configuration conf; @@ -34,7 +54,7 @@ Metadata contentMeta = parseResult.get( content.getUrl( ) ).getData().getContentMeta(); - for ( String key : new String[] { "description", "keywords" } ) + for ( String key : new String[] { "description", "keywords", "robots" } ) { String value = metaTags.getGeneralTags().getProperty( key, "" ); @@ -44,11 +64,13 @@ return parseResult; } - public void setConf(Configuration conf) { + public void setConf(Configuration conf) + { this.conf = conf; } - public Configuration getConf() { + public Configuration getConf() + { return this.conf; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |