JMdRdf (Java Midori Rdf) : LGPL

[JMdRdf,RDF,RSS,XML,Generate,HTML,LGPL,Java] Generate RDF/RSS from HTML without programming.

English | Japanese

TOP

The outline of this software

This software is the tool which creates RDF/RSS. RDF/RSS creation library is also contained.
You can generate rss for your homepage rss, only configuring XML .Information is automatically extracted from a title, description, etc. in HTML, and RDF/RSS is created.

You can create RSS easily with this software.

Status of this software.

The example of XML parameter description to generate RDF

You must prepare the following XML parameter file in advance. (The following code is the contents of the sample file attached to an archive.)
Only the 1st time of the beginning, this file needs to be new created.

<?xml version="1.0" encoding="UTF-8"?>

<!-- JMdRdf definition file
     2001.03.12  -->
<jmdrdf version="1.0">

    <!-- channel registration. (already implemented)
         base: root of this home page.
          -->
    <channel>
        <title>My title</title>
        <description>My description</description>
        <link>http://www003.upp.so-net.ne.jp/midori/midosoft.html</link>
        <language>ja</language>
        <copyright>Copyright (C) 2001  Midori IGA</copyright>
    </channel>

    <!-- param registration. (already implemented)
         parameter for JMdSync.
          -->
    <param>
        <!-- Prefix of output file name.
             ex. demo -> demo.rss1.0.xml , demo.rss0.9.xml
              -->
        <filename>demo</filename>
        <!-- Base URI of files.
             ex. http://hoge.org/foo/bar/ -> http://hoge.org/foo/bar/index.html
              -->
        <baseuri>http://www003.upp.so-net.ne.jp/midori/</baseuri>
    </param>

    <!-- select registration. (already implemented)
         notStartsWith, notEndsWith : A file to except.
          -->
    <select name="default">
        <add>
            <filename endsWith=".html" />
        </add>
        <add>
            <filename endsWith=".htm" />
        </add>
        <remove>
            <filename startsWith="iga" />
        </remove>

        <!--  sort order by filedate. 
          --> 
        <sort order="filedate" desc="true" /> 
        <!-- <title startsWith="Diary: " /> -->
        <!-- <description startsWith="This " /> -->
    </select>

</jmdrdf>

XML parameter : file select (select) command

  1. Adding HTML files one by one.
        <select name="default">
            <add>
                <filename equals="Foo.html" />
            </add>
            <add>
                <filename equals="Bar.html" />
            </add>
        </select>
    
  2. Adding HTML files one by one and sort by time stamp.
        <select name="default">
            <add>
                <filename equals="Foo.html" />
            </add>
            <add>
                <filename equals="Bar.html" />
            </add>
            <sort order="filedate" desc="true" />
        </select>
  3. Adding HTML files all, and remove file from fileset, and specify recent file.
        <select name="default">
            <add>
                <filename endsWith=".html" />
            </add>
    
            <remove>
                <filename endsWith="midosoft.html" />
            </remove>
            <remove>
                <filename endsWith="Templete.html" />
            </remove>
            <remove>
                <filename endsWith="index.html" />
            </remove>
            <remove>
                <filename endsWith="folklore.html" />
            </remove>
            <remove>
                <filename startsWith="1998" />
            </remove>
    
            <where key="filedate" value="week" />
            <sort order="filedate" desc="true" />
        </select>

The example of paste RDF/RSS in homepage

copy html file to templete filename. ie, rename from index.html to index.Templete.html. After this write RDF/RSS paste parameter .
(warning) after run, original *.html will override by result of *.Templete.html processing.

Other libraries required in order to perform this software

Java2 Runtime Environment 1.4+ or Java2 Runtime Environment 1.3 and JAXP1.1 XML parser is requred to perform this software.

How to run this software

Please take out JMdFile.jar. It is contained in JMdRdf.jar archive.

From a command line Please type following command and perform program.

The example of an execution argument in Windows2000

How to paste RDF/RSS into Java Servlet program (case Jakarta Tomcat 3.2.2)

  1. Copy JMdRdf.jar and JMdFile.jar into TOMCAT_HOME/lib. And add these files into CLASSPATH.
  2. Write import jp.ne.nifty.iga.midori.rdf.*; into Java Servlet source code.
  3. Add below lines after out.println("<body>");
    JMdRdfHtmlUtil rdfutil=new JMdRdfHtmlUtil();
    rdfutil.replace_rdf("file://D:\\cd-image\\midori\\midori.dat\\mwork\\m-internelt\\midori\\index.rss1.0.xml",out);
    // If local file, write file name as URI (like file://).
    // If remote file, write URI directly.

Other libraries required in order to build this software.

The place of the registration author(s) registers a new version

Related resource

Credits (Thanx)

Sample of result

LICENSE

JMdRdf (Java Midori Rdf)
Copyright (C) 2001-2005 Midori IGA
(http://www003.upp.so-net.ne.jp/midori/midosoft.html)

This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

Miscellaneous

SourceForge Logo


midori.iga@nifty.ne.jp
$Date: 2005/06/20 18:15:20 $