| 
DLESE Tools  v1.6.0  | 
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.dlese.dpc.xml.maps.DleseXMLReader
public class DleseXMLReader
This class provides mapping between DLESE metadata values and the corresponding XML metadata record.
  The accessor methods act as an interface with the XMLNode and XMLRecord classes. The XML processing details are handled by those classes,
  but the one requirement of this class is to have knowledge of the paths
  structure. Paths are used as keys into the XMLRecord map.
| Field Summary | |
|---|---|
protected  boolean | 
isValid
boolean value indicates success of initialization  | 
protected  HashMap | 
map
mapping of user-defined names to metadata values  | 
protected  File | 
xmlFile
source XML file  | 
protected  XMLRecord | 
xmlRecord
convenience abstraction of the XML DOM  | 
| Constructor Summary | |
|---|---|
protected  | 
DleseXMLReader()
Default constructor is restricted to assure that a file directory is provided on object creation.  | 
  | 
DleseXMLReader(File xmlfile)
 | 
  | 
DleseXMLReader(String filepath)
 | 
| Method Summary | |
|---|---|
 void | 
destroy()
Releases all resources and calls finalize method.  | 
protected  String | 
getAccessionedDate()
Retrieves the date the catalog record was created.  | 
protected  List | 
getAnnotations()
Retrieves the list of lifecycle contributors to a resource from the current record.  | 
protected  List | 
getAudiences()
Retrieves the list of intended audiences for a resource from the current record.  | 
protected  String | 
getComment(String key,
           String identifier)
Retrieves a specific comment from the XML node identified by the key.  | 
protected  String | 
getCopyright()
Retreives the copright information of a resource from the current record.  | 
protected  String | 
getCost()
Retrieves the cost information of a resource from the current record.  | 
protected  String | 
getCreatedDate()
Retrieves the date the catalog record was created.  | 
protected  String | 
getDescription()
Retreives the description of a resource from the current record.  | 
protected  List | 
getGeographyStds()
Retrieves the list of geography standards defined for the current resource.  | 
protected  List | 
getGeoReferences()
Retrieves the list of georeferences for a resource from the current record.  | 
protected  String | 
getID()
Retrieves the record ID from XML file.  | 
protected  String | 
getInformation()
Retrieves the additional information from the footnote comment of the current record.  | 
 String | 
getInitErrorMsg()
Gets a message describing the initialization error or empty string if no error occured.  | 
 List | 
getKeys()
Retrieves a list the keys contained in the map.  | 
protected  List | 
getKeywords()
Gets the keywords attribute of the DleseXMLReader object  | 
protected  List | 
getLifecycleContributors()
Retrieves the list of lifecycle contributors to a resource from the current record.  | 
protected  List | 
getMetametadataContributors()
Retrieves the list of metadata contributors for a resource from the current record.  | 
protected  String | 
getOtherTechnicalInfo()
Gets the otherTechnicalInfo attribute of the DleseXMLReader object  | 
protected  List | 
getRelations()
Retrieves the list of lifecycle contributors to a resource from the current record.  | 
protected  List | 
getResourceTypes()
Retrieves the list of learning resource types for a resource from the current record.  | 
protected  String | 
getResourceURL()
Retrieves the URL of the reource this record catalogs.  | 
protected  List | 
getScienceStds()
Retrieves the list of intended audiences for a resource from the current record.  | 
protected  String | 
getStringValue(String key)
Retrieves text content from the XML node identified by the key.  | 
protected  List | 
getSubjects()
Retrieves the list of subjects specified for a resource from the current record.  | 
protected  List | 
getTechnicalFormats()
Gets the technicalFormats attribute of the DleseXMLReader object  | 
protected  List | 
getTechnicalReqs()
Retrieves the list of technical requirements for a resource from the current record.  | 
protected  String | 
getTitle()
Retreives the resource title from the current record.  | 
protected  List | 
getURLs()
Retrieves the list of subjects specified for a resource from the current record.  | 
 Object | 
getValue(String name)
Getter method to retrieve a specific metadata value.  | 
 List | 
getValues()
Retrieves the list of metadata values held in the map.  | 
 boolean | 
init()
Creates XMLRecord and intializes local map.  | 
protected  void | 
insertToList(List list,
             Object o)
Simple insertion routine for constructing an ordered list of Objects  | 
protected  void | 
insertToList(List list,
             String s)
Simple insertion sort for building a sorted list of Strings.  | 
 void | 
setMap()
After successful initialization, this method creates the map of actual name:value pairs defined within this specific XMLMap instance.  | 
 void | 
setValue(String name,
         Object xmlObject)
Setter method for setting a specific metadata value.  | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
protected boolean isValid
protected File xmlFile
protected XMLRecord xmlRecord
protected HashMap map
| Constructor Detail | 
|---|
protected DleseXMLReader()
public DleseXMLReader(File xmlfile)
xmlfile - public DleseXMLReader(String filepath)
filepath - A qualified filepath to a well-formed XML file.| Method Detail | 
|---|
public boolean init()
init in interface XMLMappublic String getInitErrorMsg()
public void destroy()
destroy in interface XMLMappublic Object getValue(String name)
getValue in interface XMLMapname - the user-defined name identifying the specific value to
      retrieve.
public void setValue(String name,
                     Object xmlObject)
setValue in interface XMLMapname - the user-defined name identifying the specific value to
      update.xmlObject - the value to assoicate with the specified name.public void setMap()
setMap in interface XMLMappublic List getKeys()
getKeys in interface XMLMappublic List getValues()
getValues in interface XMLMap
protected String getComment(String key,
                            String identifier)
key - The path for the desired node.identifier - A string used to identify the specific comment.
protected String getID()
protected String getResourceURL()
protected String getCreatedDate()
protected String getAccessionedDate()
protected String getInformation()
protected String getTitle()
protected String getDescription()
protected String getCost()
protected String getCopyright()
protected String getOtherTechnicalInfo()
protected List getAudiences()
List of strings of intended audiences.protected List getTechnicalFormats()
protected List getSubjects()
List of strings of specified subjects.protected List getURLs()
List of strings of specified subjects.protected List getTechnicalReqs()
List of MeccaMain.TechnicalReq objects.protected List getResourceTypes()
List of DleseRecord.ResourceType
      objects.protected List getMetametadataContributors()
List of DleseRecord.Contributor objects
      identifying the metadata contributors.protected List getLifecycleContributors()
List of DleseRecord.Contributor objects
      identifying the lifecycle contributors.protected List getAnnotations()
List of DleseRecord.Contributor objects
      identifying the lifecycle contributors.protected List getRelations()
List of DleseRecord.Contributor objects
      identifying the lifecycle contributors.protected List getGeoReferences()
List of DleseRecord.Contributor objects
      identifying the lifecycle contributors.protected List getKeywords()
protected List getGeographyStds()
List of strings of intended audiences.protected List getScienceStds()
List of strings of intended audiences.protected String getStringValue(String key)
key - The path for the desired node.
protected void insertToList(List list,
                            String s)
list - List to add an item to.s - String to add to the list.
protected void insertToList(List list,
                            Object o)
list - List to add an item to.o - Object to add to the list.
  | 
DLESE Tools  v1.6.0  | 
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||