Package org.dlese.dpc.schemedit.ndr.util
Class ServiceDescription
java.lang.Object
org.dlese.dpc.schemedit.ndr.util.ServiceDescription
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
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassClass representing an Image attribute of the serviceDescription. -
Constructor Summary
ConstructorsConstructorDescriptionConstructor for the ServiceDescription objectServiceDescription(String title, String description, String identifier) Constructor for the ServiceDescription object, given title, description and type values.ServiceDescription(org.dom4j.Element element) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddContact(String name, String email, String info) Creates a Contact instance and adds it to the serviceDescription.voidaddContact(Contact contact) Adds a contact instance to the serviceDescription.org.dom4j.ElementReturns serviceDescription as an dom4j.Element.static ServiceDescriptionGets the fakeServiceDescription attribute of the ServiceDescription classgetImage()static voidThe main program for the ServiceDescription classstatic ServiceDescriptionmakeServiceDescription(DleseCollectionDocReader reader, NDRConstants.NDRObjectType ndrObjType) Creates a service description instance based on information provided as DleseCollectionDocReader.static ServiceDescriptionmakeServiceDescription(NCSCollectReader ncsDocReader, NDRConstants.NDRObjectType ndrObjType) Creates a service description instance based on information provided as NCSCollectReader.voidsetDescription(String description) Sets the description attribute of the ServiceDescription objectvoidsetIdentifier(String type) Sets the identifier attribute of the ServiceDescription objectvoidCreates an image instance and adds it to the ServiceDescription objectvoidsetImage(ServiceDescription.Image image) Sets the image attribute of the ServiceDescription objectvoidSets the title attribute of the ServiceDescription objectvoidSets the type attribute of the ServiceDescription object
-
Constructor Details
-
ServiceDescription
public ServiceDescription()Constructor for the ServiceDescription object -
ServiceDescription
Constructor for the ServiceDescription object, given title, description and type values.- Parameters:
title- NOT YET DOCUMENTEDdescription- NOT YET DOCUMENTEDtype- NOT YET DOCUMENTED
-
ServiceDescription
public ServiceDescription(org.dom4j.Element element)
-
-
Method Details
-
addContact
Creates a Contact instance and adds it to the serviceDescription.- Parameters:
name- contact nameemail- contact emailinfo- contact info
-
addContact
Adds a contact instance to the serviceDescription.- Parameters:
contact- The Contact to be added
-
getContacts
-
setImage
Creates an image instance and adds it to the ServiceDescription object- Parameters:
brandUrl- image brandUrltitle- image titlewidth- image widthheight- image heightalttext- image alttext
-
setImage
Sets the image attribute of the ServiceDescription object- Parameters:
image- The new image value
-
getImage
-
setTitle
Sets the title attribute of the ServiceDescription object- Parameters:
title- The new title value
-
setDescription
Sets the description attribute of the ServiceDescription object- Parameters:
description- The new description value
-
setType
Sets the type attribute of the ServiceDescription object- Parameters:
type- The new type value
-
setIdentifier
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
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
Gets the fakeServiceDescription attribute of the ServiceDescription class- Returns:
- The fakeServiceDescription value
-