github.com/slspeek/camlistore_namedsearch@v0.0.0-20140519202248-ed6f70f7721a/pkg/importer/feed/rdf/rdf.go (about)

     1  /*
     2   * Copyright (c) 2013 Matt Jibson <matt.jibson@gmail.com>
     3   *
     4   * Permission to use, copy, modify, and distribute this software for any
     5   * purpose with or without fee is hereby granted, provided that the above
     6   * copyright notice and this permission notice appear in all copies.
     7   *
     8   * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
     9   * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
    10   * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
    11   * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
    12   * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
    13   * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
    14   * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
    15   */
    16  
    17  // Package rdf defines XML data structures for an RDF feed.
    18  package rdf
    19  
    20  import (
    21  	"encoding/xml"
    22  )
    23  
    24  type RDF struct {
    25  	XMLName xml.Name `xml:"RDF"`
    26  	Channel *Channel `xml:"channel"`
    27  	Item    []*Item  `xml:"item"`
    28  }
    29  
    30  type Channel struct {
    31  	Title       string `xml:"title"`
    32  	Description string `xml:"description"`
    33  	Link        string `xml:"link"`
    34  	Date        string `xml:"date"`
    35  }
    36  
    37  type Item struct {
    38  	About       string `xml:"about,attr"`
    39  	Format      string `xml:"format"`
    40  	Date        string `xml:"date"`
    41  	Source      string `xml:"source"`
    42  	Creator     string `xml:"creator"`
    43  	Title       string `xml:"title"`
    44  	Link        string `xml:"link"`
    45  	Description string `xml:"description"`
    46  	Content     string `xml:"encoded"`
    47  }