com.sun.syndication.io.impl
Class DCModuleParser

java.lang.Object
  extended by com.sun.syndication.io.impl.DCModuleParser
All Implemented Interfaces:
ModuleParser

public class DCModuleParser
extends java.lang.Object
implements ModuleParser

Parser for the Dublin Core module.


Field Summary
private static Namespace DC_NS
           
private static Namespace RDF_NS
           
private static java.lang.String RDF_URI
           
private static Namespace TAXO_NS
           
private static java.lang.String TAXO_URI
           
 
Constructor Summary
DCModuleParser()
           
 
Method Summary
private  Namespace getDCNamespace()
           
 java.lang.String getNamespaceUri()
          Returns the namespace URI this parser handles.
private  Namespace getRDFNamespace()
           
protected  java.lang.String getTaxonomy(Element desc)
          Utility method to parse a taxonomy from an element.
private  Namespace getTaxonomyNamespace()
           
 Module parse(Element dcRoot)
          Parse an element tree and return the module found in it.
protected  java.util.List parseElementList(java.util.List eList)
          Utility method to parse a list of strings out of a list of elements.
protected  java.util.List parseElementListDate(java.util.List eList)
          Utility method to parse a list of dates out of a list of elements.
protected  java.util.List parseSubjects(java.util.List eList)
          Utility method to parse a list of subjects out of a list of elements.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RDF_URI

private static final java.lang.String RDF_URI
See Also:
Constant Field Values

TAXO_URI

private static final java.lang.String TAXO_URI
See Also:
Constant Field Values

DC_NS

private static final Namespace DC_NS

RDF_NS

private static final Namespace RDF_NS

TAXO_NS

private static final Namespace TAXO_NS
Constructor Detail

DCModuleParser

public DCModuleParser()
Method Detail

getNamespaceUri

public final java.lang.String getNamespaceUri()
Description copied from interface: ModuleParser
Returns the namespace URI this parser handles.

Specified by:
getNamespaceUri in interface ModuleParser
Returns:
the namespace URI.

getDCNamespace

private final Namespace getDCNamespace()

getRDFNamespace

private final Namespace getRDFNamespace()

getTaxonomyNamespace

private final Namespace getTaxonomyNamespace()

parse

public Module parse(Element dcRoot)
Parse an element tree and return the module found in it.

Specified by:
parse in interface ModuleParser
Parameters:
dcRoot - the root element containing the module elements.
Returns:
the module parsed from the element tree, null if none.

getTaxonomy

protected final java.lang.String getTaxonomy(Element desc)
Utility method to parse a taxonomy from an element.

Parameters:
desc - the taxonomy description element.
Returns:
the string contained in the resource of the element.

parseSubjects

protected final java.util.List parseSubjects(java.util.List eList)
Utility method to parse a list of subjects out of a list of elements.

Parameters:
eList - the element list to parse.
Returns:
a list of subjects parsed from the elements.

parseElementList

protected final java.util.List parseElementList(java.util.List eList)
Utility method to parse a list of strings out of a list of elements.

Parameters:
eList - the list of elements to parse.
Returns:
the list of strings

parseElementListDate

protected final java.util.List parseElementListDate(java.util.List eList)
Utility method to parse a list of dates out of a list of elements.

Parameters:
eList - the list of elements to parse.
Returns:
the list of dates.


Copyright © Sun Microsystems. All Rights Reserved.