org.eclipse.ohf.stem.core.common.impl
Class DublinCoreImpl

java.lang.Object
  extended by org.eclipse.emf.common.notify.impl.BasicNotifierImpl
      extended by org.eclipse.emf.ecore.impl.BasicEObjectImpl
          extended by org.eclipse.emf.ecore.impl.EObjectImpl
              extended by org.eclipse.ohf.stem.core.common.impl.DublinCoreImpl
All Implemented Interfaces:
org.eclipse.emf.common.notify.Notifier, org.eclipse.emf.ecore.EObject, org.eclipse.emf.ecore.InternalEObject, DublinCore

public class DublinCoreImpl
extends org.eclipse.emf.ecore.impl.EObjectImpl
implements DublinCore

An implementation of the model object 'Dublin Core'.

The following features are implemented:


Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.emf.common.notify.impl.BasicNotifierImpl
org.eclipse.emf.common.notify.impl.BasicNotifierImpl.EAdapterList<E extends java.lang.Object & org.eclipse.emf.common.notify.Adapter>
 
Nested classes/interfaces inherited from interface org.eclipse.emf.ecore.InternalEObject
org.eclipse.emf.ecore.InternalEObject.EStore
 
Field Summary
static java.lang.String END
          This is the string used in the valid attribute to specify the ending date of the valid date range.
static java.lang.String START
          This is the string used in the valid attribute to specify the starting date of the valid date range.
 
Fields inherited from class org.eclipse.emf.ecore.impl.EObjectImpl
ELAST_EOBJECT_FLAG
 
Fields inherited from interface org.eclipse.ohf.stem.core.common.DublinCore
FORMAT, IDENTIFIER, TITLE
 
Fields inherited from interface org.eclipse.emf.ecore.InternalEObject
EOPPOSITE_FEATURE_BASE
 
Constructor Summary
DublinCoreImpl(org.eclipse.core.runtime.IConfigurationElement configElement)
          This constructor is used to create and initialize a Dublin Core instance from an IConfigurationElement instance.
 
Method Summary
static java.util.Date createDateFromISO8601DateString(java.lang.String iso8601DateString)
          Create a Date from a string that conforms to ISO 8601 http://www.w3.org/TR/NOTE-datetime.
static java.lang.String createISO8601DateString(java.util.Date date)
          Create a date string that conforms to ISO 8601 http://www.w3.org/TR/NOTE-datetime.
 java.lang.Object eGet(int featureID, boolean resolve, boolean coreType)
           
 boolean eIsSet(int featureID)
           
 void eSet(int featureID, java.lang.Object newValue)
           
 void eUnset(int featureID)
           
 java.lang.String getBibliographicCitation()
           
 java.lang.String getContributor()
           
 java.lang.String getCoverage()
           
 java.lang.String getCreated()
           
 java.lang.String getCreator()
           
 java.lang.String getDate()
           
 java.lang.String getDescription()
           
 java.lang.String getFormat()
           
 java.lang.String getIdentifier()
           
 java.lang.String getLanguage()
           
 java.lang.String getLicense()
           
 java.lang.String getPublisher()
           
 java.lang.String getRelation()
           
 java.lang.String getRequired()
           
 java.lang.String getRights()
           
 java.lang.String getSource()
           
 java.lang.String getSpatial()
           
 java.lang.String getSubject()
           
 java.lang.String getTitle()
           
 java.lang.String getType()
           
 java.lang.String getValid()
           
 java.util.Date getValidEndDate()
           
static java.util.Date getValidEndDate(java.lang.String validValue)
           
 java.util.Date getValidStartDate()
           
static java.util.Date getValidStartDate(java.lang.String validValue)
           
static boolean isValidEndDateValid(java.lang.String validValue)
           
static boolean isValidStartDateValid(java.lang.String validValue)
           
 DublinCore populate()
           
 void setBibliographicCitation(java.lang.String newBibliographicCitation)
           
 void setContributor(java.lang.String newContributor)
           
 void setCoverage(java.lang.String newCoverage)
           
 void setCreated(java.util.Date date)
          Set the date the resource was created.
 void setCreated(java.lang.String newCreated)
           
 void setCreator(java.lang.String newCreator)
           
 void setDate(java.util.Date date)
          Set the date.
 void setDate(java.lang.String newDate)
           
 void setDescription(java.lang.String newDescription)
           
 void setFormat(java.lang.String newFormat)
           
 void setIdentifier(java.lang.String newIdentifier)
           
 void setLanguage(java.lang.String newLanguage)
           
 void setLicense(java.lang.String newLicense)
           
 void setPublisher(java.lang.String newPublisher)
           
 void setRelation(java.lang.String newRelation)
           
 void setRequired(java.lang.String newRequired)
           
 void setRights(java.lang.String newRights)
           
 void setSource(java.lang.String newSource)
           
 void setSpatial(java.lang.String newSpatial)
           
 void setSubject(java.lang.String newSubject)
           
 void setTitle(java.lang.String newTitle)
           
 void setType(java.lang.String newType)
           
 void setValid(java.util.Date startDate)
          Set the starting date that the resource is value.
 void setValid(java.util.Date startDate, java.util.Date endDate)
          Set the starting and ending dates that the resource is valid.
 void setValid(java.lang.String newValid)
           
 java.lang.String toString()
           
 
Methods inherited from class org.eclipse.emf.ecore.impl.EObjectImpl
eAdapters, eClass, eContainerFeatureID, eDeliver, eInternalContainer, eIsProxy, eSetClass, eSetDeliver, eSetProxyURI
 
Methods inherited from class org.eclipse.emf.ecore.impl.BasicEObjectImpl
eAllContents, eBaseStructuralFeatureID, eBasicRemoveFromContainer, eBasicRemoveFromContainerFeature, eBasicSetContainer, eContainer, eContainingFeature, eContainmentFeature, eContains, eContents, eCrossReferences, eDerivedStructuralFeatureID, eDerivedStructuralFeatureID, eDirectResource, eDynamicBasicRemoveFromContainer, eDynamicGet, eDynamicGet, eDynamicInverseAdd, eDynamicInverseRemove, eDynamicIsSet, eDynamicIsSet, eDynamicSet, eDynamicSet, eDynamicUnset, eDynamicUnset, eGet, eGet, eGet, eInternalResource, eInverseAdd, eInverseAdd, eInverseRemove, eInverseRemove, eIsSet, eObjectForURIFragmentSegment, eOpenGet, eOpenIsSet, eOpenSet, eOpenUnset, eProxyURI, eResolveProxy, eResource, eSet, eSetResource, eSetStore, eSetting, eStore, eUnset, eURIFragmentSegment, eVirtualGet, eVirtualGet, eVirtualIsSet, eVirtualSet, eVirtualUnset
 
Methods inherited from class org.eclipse.emf.common.notify.impl.BasicNotifierImpl
eNotificationRequired, eNotify
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.emf.ecore.EObject
eAllContents, eClass, eContainer, eContainingFeature, eContainmentFeature, eContents, eCrossReferences, eGet, eGet, eIsProxy, eIsSet, eResource, eSet, eUnset
 
Methods inherited from interface org.eclipse.emf.common.notify.Notifier
eAdapters, eDeliver, eNotify, eSetDeliver
 
Methods inherited from interface org.eclipse.emf.ecore.InternalEObject
eNotificationRequired
 

Field Detail

START

public static final java.lang.String START
This is the string used in the valid attribute to specify the starting date of the valid date range.

See Also:
Constant Field Values

END

public static final java.lang.String END
This is the string used in the valid attribute to specify the ending date of the valid date range.

See Also:
Constant Field Values
Constructor Detail

DublinCoreImpl

public DublinCoreImpl(org.eclipse.core.runtime.IConfigurationElement configElement)
This constructor is used to create and initialize a Dublin Core instance from an IConfigurationElement instance. The configuration element is extracted from the extension definition in the plugin.xml file of a plug-in that is providing an Identifiable. This is used by the class IdentifiableDelegate in the class com.ibm.almaden.stem.ui.views.IdentifiablePluginView to create a "proxy" representation of the Dublin Core of the Identifiable from the configuration element so that the Identifiable itself does not have to be loaded.

Parameters:
configElement - the configuration element from the plugin.xml file
Method Detail

getTitle

public java.lang.String getTitle()

Specified by:
getTitle in interface DublinCore
Returns:
the title of the resource.

setTitle

public void setTitle(java.lang.String newTitle)

Specified by:
setTitle in interface DublinCore
Parameters:
newTitle - the new value of the 'Title' attribute.
See Also:
DublinCore.getTitle()

getCreator

public java.lang.String getCreator()

Specified by:
getCreator in interface DublinCore
Returns:
the creator of the resource.

setCreator

public void setCreator(java.lang.String newCreator)

Specified by:
setCreator in interface DublinCore
Parameters:
newCreator - the new value of the 'Creator' attribute.
See Also:
DublinCore.getCreator()

getSubject

public java.lang.String getSubject()

Specified by:
getSubject in interface DublinCore
Returns:
the subject of the resource.

setSubject

public void setSubject(java.lang.String newSubject)

Specified by:
setSubject in interface DublinCore
Parameters:
newSubject - the new value of the 'Subject' attribute.
See Also:
DublinCore.getSubject()

getDescription

public java.lang.String getDescription()

Specified by:
getDescription in interface DublinCore
Returns:
the description of the resource.

setDescription

public void setDescription(java.lang.String newDescription)

Specified by:
setDescription in interface DublinCore
Parameters:
newDescription - the new value of the 'Description' attribute.
See Also:
DublinCore.getDescription()

getPublisher

public java.lang.String getPublisher()

Specified by:
getPublisher in interface DublinCore
Returns:
the publisher of the resource.

setPublisher

public void setPublisher(java.lang.String newPublisher)

Specified by:
setPublisher in interface DublinCore
Parameters:
newPublisher - the new value of the 'Publisher' attribute.
See Also:
DublinCore.getPublisher()

getContributor

public java.lang.String getContributor()

Specified by:
getContributor in interface DublinCore
Returns:
the contributor of the resource.

setContributor

public void setContributor(java.lang.String newContributor)

Specified by:
setContributor in interface DublinCore
Parameters:
newContributor - the new value of the 'Contributor' attribute.
See Also:
DublinCore.getContributor()

getDate

public java.lang.String getDate()

Specified by:
getDate in interface DublinCore
Returns:
the date of the resource.

setDate

public void setDate(java.lang.String newDate)

Specified by:
setDate in interface DublinCore
Parameters:
newDate - the new value of the 'Date' attribute.
See Also:
DublinCore.getDate()

setDate

public void setDate(java.util.Date date)
Description copied from interface: DublinCore
Set the date.

Specified by:
setDate in interface DublinCore
See Also:
com.ibm.almaden.stem.common.DublinCore#setDate(java.util.Date)

getType

public java.lang.String getType()

Specified by:
getType in interface DublinCore
Returns:
the type of the resource.

setType

public void setType(java.lang.String newType)

Specified by:
setType in interface DublinCore
Parameters:
newType - the new value of the 'Type' attribute.
See Also:
DublinCore.getType()

getFormat

public java.lang.String getFormat()

Specified by:
getFormat in interface DublinCore
Returns:
the format of the resource.

setFormat

public void setFormat(java.lang.String newFormat)

Specified by:
setFormat in interface DublinCore
Parameters:
newFormat - the new value of the 'Format' attribute.
See Also:
DublinCore.getFormat()

getIdentifier

public java.lang.String getIdentifier()

Specified by:
getIdentifier in interface DublinCore
Returns:
the identifier of the resource.

setIdentifier

public void setIdentifier(java.lang.String newIdentifier)

Specified by:
setIdentifier in interface DublinCore
Parameters:
newIdentifier - the new value of the 'Identifier' attribute.
See Also:
DublinCore.getIdentifier()

getSource

public java.lang.String getSource()

Specified by:
getSource in interface DublinCore
Returns:
the source of the resource.

setSource

public void setSource(java.lang.String newSource)

Specified by:
setSource in interface DublinCore
Parameters:
newSource - the new value of the 'Source' attribute.
See Also:
DublinCore.getSource()

getLanguage

public java.lang.String getLanguage()

Specified by:
getLanguage in interface DublinCore
Returns:
the language of the resource.

setLanguage

public void setLanguage(java.lang.String newLanguage)

Specified by:
setLanguage in interface DublinCore
Parameters:
newLanguage - the new value of the 'Language' attribute.
See Also:
DublinCore.getLanguage()

getRelation

public java.lang.String getRelation()

Specified by:
getRelation in interface DublinCore
Returns:
the relation of the resource.

setRelation

public void setRelation(java.lang.String newRelation)

Specified by:
setRelation in interface DublinCore
Parameters:
newRelation - the new value of the 'Relation' attribute.
See Also:
DublinCore.getRelation()

getCoverage

public java.lang.String getCoverage()

Specified by:
getCoverage in interface DublinCore
Returns:
the coverage of the resource.

setCoverage

public void setCoverage(java.lang.String newCoverage)

Specified by:
setCoverage in interface DublinCore
Parameters:
newCoverage - the new value of the 'Coverage' attribute.
See Also:
DublinCore.getCoverage()

getRights

public java.lang.String getRights()

Specified by:
getRights in interface DublinCore
Returns:
the rights of the resource.

setRights

public void setRights(java.lang.String newRights)

Specified by:
setRights in interface DublinCore
Parameters:
newRights - the new value of the 'Rights' attribute.
See Also:
DublinCore.getRights()

getBibliographicCitation

public java.lang.String getBibliographicCitation()

Specified by:
getBibliographicCitation in interface DublinCore
Returns:
a bibliographic citation

setBibliographicCitation

public void setBibliographicCitation(java.lang.String newBibliographicCitation)

Specified by:
setBibliographicCitation in interface DublinCore
Parameters:
newBibliographicCitation - the new value of the 'Bibliographic Citation' attribute.
See Also:
DublinCore.getBibliographicCitation()

getCreated

public java.lang.String getCreated()

Specified by:
getCreated in interface DublinCore
Returns:
the date the resource was created.

setCreated

public void setCreated(java.lang.String newCreated)

Specified by:
setCreated in interface DublinCore
Parameters:
newCreated - the new value of the 'Created' attribute.
See Also:
DublinCore.getCreated()

setCreated

public void setCreated(java.util.Date date)
Description copied from interface: DublinCore
Set the date the resource was created.

Specified by:
setCreated in interface DublinCore
Parameters:
date - the creation date of the resource
See Also:
com.ibm.almaden.stem.common.DublinCore#setCreated(java.util.Date)

getLicense

public java.lang.String getLicense()

Specified by:
getLicense in interface DublinCore
Returns:
the license associated with the resource

setLicense

public void setLicense(java.lang.String newLicense)

Specified by:
setLicense in interface DublinCore
Parameters:
newLicense - the new value of the 'License' attribute.
See Also:
DublinCore.getLicense()

getRequired

public java.lang.String getRequired()

Specified by:
getRequired in interface DublinCore
Returns:
the identifier of a resource required by this resource

setRequired

public void setRequired(java.lang.String newRequired)

Specified by:
setRequired in interface DublinCore
Parameters:
newRequired - the new value of the 'Required' attribute.
See Also:
DublinCore.getRequired()

getSpatial

public java.lang.String getSpatial()

Specified by:
getSpatial in interface DublinCore
Returns:
the identifier of a resource providing spatial data

setSpatial

public void setSpatial(java.lang.String newSpatial)

Specified by:
setSpatial in interface DublinCore
Parameters:
newSpatial - the new value of the 'Spatial' attribute.
See Also:
DublinCore.getSpatial()

getValid

public java.lang.String getValid()

Specified by:
getValid in interface DublinCore
Returns:
the date, or range that the resource is valid.

getValidEndDate

public java.util.Date getValidEndDate()
Specified by:
getValidEndDate in interface DublinCore
Returns:
the ending Date of the valid date range, or null if the valid value is not set or the end date is not specified, or the value is not correctly formatted as an ISO 8601 date string http://www.w3.org/TR/NOTE-datetime.
See Also:
DublinCore.getValidEndDate()

getValidEndDate

public static java.util.Date getValidEndDate(java.lang.String validValue)
See Also:
DublinCore.getValidEndDate()

isValidEndDateValid

public static boolean isValidEndDateValid(java.lang.String validValue)
Parameters:
validValue -
Returns:
true if the end date in the valid string does not exist, or if it does, if it is properly formatted, false otherwise.

getValidStartDate

public java.util.Date getValidStartDate()
Specified by:
getValidStartDate in interface DublinCore
Returns:
the starting Date of the valid date range, or null if the valid value is not set or is not correctly formatted as an ISO 8601 date string http://www.w3.org/TR/NOTE-datetime.
See Also:
DublinCore.getValidEndDate()

getValidStartDate

public static java.util.Date getValidStartDate(java.lang.String validValue)
See Also:
DublinCore.getValidStartDate()

isValidStartDateValid

public static boolean isValidStartDateValid(java.lang.String validValue)
Parameters:
validValue -
Returns:
true if the start date in the valid string exists and is properly formatted

setValid

public void setValid(java.lang.String newValid)

Specified by:
setValid in interface DublinCore
Parameters:
newValid - the new value of the 'Valid' attribute.
See Also:
DublinCore.getValid()

populate

public DublinCore populate()

Specified by:
populate in interface DublinCore
Returns:
the instance
See Also:
DublinCore.setCreated(String), DublinCore.setDate(String), DublinCore.setValid(String), DublinCore.setCreator(String)

setValid

public void setValid(java.util.Date startDate,
                     java.util.Date endDate)
Description copied from interface: DublinCore
Set the starting and ending dates that the resource is valid.

Specified by:
setValid in interface DublinCore
Parameters:
startDate - the starting date
endDate - the ending date
See Also:
com.ibm.almaden.stem.common.DublinCore#setValid(java.util.Date, java.util.Date)

setValid

public void setValid(java.util.Date startDate)
Description copied from interface: DublinCore
Set the starting date that the resource is value. No end date will be set.

Specified by:
setValid in interface DublinCore
Parameters:
startDate - the starting date
See Also:
com.ibm.almaden.stem.common.DublinCore#setValid(java.util.Date)

eGet

public java.lang.Object eGet(int featureID,
                             boolean resolve,
                             boolean coreType)

Specified by:
eGet in interface org.eclipse.emf.ecore.InternalEObject
Overrides:
eGet in class org.eclipse.emf.ecore.impl.BasicEObjectImpl

eSet

public void eSet(int featureID,
                 java.lang.Object newValue)

Specified by:
eSet in interface org.eclipse.emf.ecore.InternalEObject
Overrides:
eSet in class org.eclipse.emf.ecore.impl.BasicEObjectImpl

eUnset

public void eUnset(int featureID)

Specified by:
eUnset in interface org.eclipse.emf.ecore.InternalEObject
Overrides:
eUnset in class org.eclipse.emf.ecore.impl.BasicEObjectImpl

eIsSet

public boolean eIsSet(int featureID)

Specified by:
eIsSet in interface org.eclipse.emf.ecore.InternalEObject
Overrides:
eIsSet in class org.eclipse.emf.ecore.impl.BasicEObjectImpl

toString

public java.lang.String toString()

Overrides:
toString in class org.eclipse.emf.ecore.impl.BasicEObjectImpl

createISO8601DateString

public static java.lang.String createISO8601DateString(java.util.Date date)
Create a date string that conforms to ISO 8601 http://www.w3.org/TR/NOTE-datetime.

See Also:
getDate(), getCreated(), getValid()

createDateFromISO8601DateString

public static java.util.Date createDateFromISO8601DateString(java.lang.String iso8601DateString)
                                                      throws java.text.ParseException
Create a Date from a string that conforms to ISO 8601 http://www.w3.org/TR/NOTE-datetime.

Throws:
java.text.ParseException - if the date string is not of the format "yyyy-MM-dd"
See Also:
getDate(), getCreated(), getValid()