Class ServiceDescription

java.lang.Object
org.dlese.dpc.schemedit.ndr.util.ServiceDescription

public class ServiceDescription extends Object
Class to construct serviceDescription elements to be used in NDR Objects (i.e., MetadataProvider and Aggregator), as described at http://ndr.comm.nsdl.org/cgi-bin/wiki.pl?addMetadataProvider.
Version:
$Id: ServiceDescription.java,v 1.6 2009/08/19 18:25:45 ostwald Exp $
Author:
Jonathan Ostwald
  • Constructor Details

    • ServiceDescription

      public ServiceDescription()
      Constructor for the ServiceDescription object
    • ServiceDescription

      public ServiceDescription(String title, String description, String identifier)
      Constructor for the ServiceDescription object, given title, description and type values.
      Parameters:
      title - NOT YET DOCUMENTED
      description - NOT YET DOCUMENTED
      type - NOT YET DOCUMENTED
    • ServiceDescription

      public ServiceDescription(org.dom4j.Element element)
  • Method Details

    • addContact

      public void addContact(String name, String email, String info)
      Creates a Contact instance and adds it to the serviceDescription.
      Parameters:
      name - contact name
      email - contact email
      info - contact info
    • addContact

      public void addContact(Contact contact)
      Adds a contact instance to the serviceDescription.
      Parameters:
      contact - The Contact to be added
    • getContacts

      public List getContacts()
    • setImage

      public void setImage(String brandUrl, String title, String width, String height, String alttext)
      Creates an image instance and adds it to the ServiceDescription object
      Parameters:
      brandUrl - image brandUrl
      title - image title
      width - image width
      height - image height
      alttext - image alttext
    • setImage

      public void setImage(ServiceDescription.Image image)
      Sets the image attribute of the ServiceDescription object
      Parameters:
      image - The new image value
    • getImage

      public ServiceDescription.Image getImage()
    • setTitle

      public void setTitle(String title)
      Sets the title attribute of the ServiceDescription object
      Parameters:
      title - The new title value
    • setDescription

      public void setDescription(String description)
      Sets the description attribute of the ServiceDescription object
      Parameters:
      description - The new description value
    • setType

      public void setType(String type)
      Sets the type attribute of the ServiceDescription object
      Parameters:
      type - The new type value
    • setIdentifier

      public void setIdentifier(String type)
      Sets the identifier attribute of the ServiceDescription object
      Parameters:
      type - The new identifier value
    • asElement

      public org.dom4j.Element asElement()
      Returns serviceDescription as an dom4j.Element.
      Returns:
      NOT YET DOCUMENTED
    • main

      public static void main(String[] args) throws Exception
      The main program for the ServiceDescription class
      Parameters:
      args - The command line arguments
      Throws:
      Exception - NOT YET DOCUMENTED
    • makeServiceDescription

      public static ServiceDescription makeServiceDescription(NCSCollectReader ncsDocReader, NDRConstants.NDRObjectType ndrObjType)
      Creates a service description instance based on information provided as NCSCollectReader.
      Parameters:
      ncsDocReader - reader for a ncs_collect record.
      Returns:
      serviceDescription instance
    • makeServiceDescription

      public static ServiceDescription makeServiceDescription(DleseCollectionDocReader reader, NDRConstants.NDRObjectType ndrObjType)
      Creates a service description instance based on information provided as DleseCollectionDocReader.
      Parameters:
      reader - reader representing a dlese_collect record
      Returns:
      serviceDescription instance
    • getFakeServiceDescription

      public static ServiceDescription getFakeServiceDescription()
      Gets the fakeServiceDescription attribute of the ServiceDescription class
      Returns:
      The fakeServiceDescription value