org.eclipse.ohf.stem.internal.data
Class IdentifiableRecord

java.lang.Object
  extended by org.eclipse.ohf.stem.internal.data.IdentifiableRecord
All Implemented Interfaces:
java.lang.Comparable<IdentifiableRecord>
Direct Known Subclasses:
DataSetRecord, ModelRecord, ScenarioRecord

public abstract class IdentifiableRecord
extends java.lang.Object
implements java.lang.Comparable<IdentifiableRecord>

This class represents a generated Identifiable such as a Graph, Model, or Scenario.


Nested Class Summary
static class IdentifiableRecord.AdminLevel
          This class represents a UN Administration Level.
 
Field Summary
static java.lang.String BIBLIOGRAPHIC_CITATION_PROPERTY
          This is the property in a data file that specifies a citation for the data.
static java.lang.String CONTRIBUTOR_PROPERTY
          This is the property in a data file that specifies a contributor to the data.
static java.lang.String COVERAGE_PROPERTY
          This is the property in a data file that specifies the coverage of the data.
static java.lang.String CREATED_PROPERTY
          This is the property in a data file that specifies when the data was created.
static java.lang.String CREATOR_PROPERTY
          This is the property in a data file that specifies who created the data.
static java.lang.String DATE_PROPERTY
          This is the property in a data file that specifies a date of the data.
static java.lang.String DESCRIPTION_PROPERTY
          This is the property in a data file that specifies a description of the data.
static java.lang.String FORMAT_PROPERTY
          This is the property in a data file that specifies the format of the the data.
static java.lang.String identifiableURIPrefix
          This String is the prefix to use when creating the URI of each Identifiable.
static java.lang.String IDENTIFIER_PROPERTY
          This is the property in a data file that specifies the URI of the Identifiable the data.
static java.lang.String LANGUAGE_PROPERTY
          This is the property in a data file that specifies the language of the data.
static java.lang.String LICENSE_PROPERTY
          This is the property in a data file that specifies the license of the data.
static java.lang.String PUBLISHER_PROPERTY
          This is the property in a data file that specifies the publisher of the data.
static java.lang.String RELATION_PROPERTY
          This is the property in a data file that specifies any relationships of the data.
static java.lang.String REQUIRED_PROPERTY
          This is the property in a data file that specifies any requirements of the data.
static java.lang.String RIGHTS_PROPERTY
          This is the property in a data file that specifies any rights associated with the data.
static java.lang.String SERIALIZATION_DATE_RANGE_FORMAT_1_DATE
          This is the format used to create date range strings used in file and folder names.
static java.lang.String SERIALIZATION_DATE_RANGE_FORMAT_1_DATE_YEAR
          This is the format used to create date range strings used in file and folder names.
static java.lang.String SERIALIZATION_DATE_RANGE_FORMAT_2_DATES
          This is the format used to create date range strings used in file and folder names.
static java.lang.String SOURCE_PROPERTY
          This is the property in a data file that specifies the source of the data.
static java.lang.String SPATIAL_PROPERTY
          This is the property in a spatial (GML) data file that specifies the file that contains the latitude/longitude data.
static java.lang.String SUBJECT_PROPERTY
          This is the property in a data file that specifies the subject of the data.
static java.lang.String TITLE_PROPERTY
          This is the property in a relationship data file that specifies the title of the relationship data.
static java.lang.String TYPE_PROPERTY
          This is the property in a data file that specifies the type of the data.
static java.lang.String VALID_PROPERTY
          This is the property in a data file that specifies the date range that the data is valid for.
 
Method Summary
 void addAdminLevel(IdentifiableRecord.AdminLevel adminLevel)
           
 void addAdminLevel(int adminLevel)
           
 void addAdminLevels(java.util.List<IdentifiableRecord.AdminLevel> adminLevels)
          Add a list of administration levels to the colleciton of administration levels
 int compareTo(IdentifiableRecord ir)
           
 java.util.List<IdentifiableRecord.AdminLevel> getAdminLevels()
           
 java.lang.String getAdminLevelsAsString(java.lang.String delmiter)
           
 java.util.List<IdentifiableRecord.AdminLevel> getAdminLevelsMaxToMin()
           
 DublinCore getDublinCore()
           
 java.util.Date getEndDate()
           
 Identifiable getIdentifiable()
           
 IdentifiableRecord.AdminLevel getMaxAdminLevel()
           
 IdentifiableRecord.AdminLevel getMinAdminLevel()
           
 int getNumAdminLevels()
           
abstract  int getNumEdges()
           
abstract  int getNumLabels()
           
abstract  int getNumModelDecorators()
           
abstract  int getNumNodes()
           
abstract  int getNumScenarioDecorators()
           
 java.util.Date getStartDate()
           
 boolean inDateRange(java.util.Date startDate, java.util.Date endDate)
           
 boolean isYounger(IdentifiableRecord ir)
           
 void serialize(java.lang.String directory)
           
static void serializeIdentifiable(Identifiable identifiable, org.eclipse.emf.common.util.URI fileURI)
          Serialize an Identifiable
 void setDublinCore(DublinCore dublinCore)
           
 void setEndDate(java.util.Date endDate)
           
 void setIdentifiable(Identifiable identifiable)
           
 void setStartDate(java.util.Date startDate)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BIBLIOGRAPHIC_CITATION_PROPERTY

public static final java.lang.String BIBLIOGRAPHIC_CITATION_PROPERTY
This is the property in a data file that specifies a citation for the data.

See Also:
DublinCore.getBibliographicCitation(), Constant Field Values

CONTRIBUTOR_PROPERTY

public static final java.lang.String CONTRIBUTOR_PROPERTY
This is the property in a data file that specifies a contributor to the data.

See Also:
DublinCore.getContributor(), Constant Field Values

COVERAGE_PROPERTY

public static final java.lang.String COVERAGE_PROPERTY
This is the property in a data file that specifies the coverage of the data. Typically, this is a common seperated list of administration levels. Automatically generated if not specified.

See Also:
DublinCore.getCoverage(), Constant Field Values

CREATED_PROPERTY

public static final java.lang.String CREATED_PROPERTY
This is the property in a data file that specifies when the data was created. Automatically generated if not specified.

See Also:
DublinCore.getCreated(), Constant Field Values

CREATOR_PROPERTY

public static final java.lang.String CREATOR_PROPERTY
This is the property in a data file that specifies who created the data. Automatically generated if not specified.

See Also:
DublinCore.getCreator(), Constant Field Values

DATE_PROPERTY

public static final java.lang.String DATE_PROPERTY
This is the property in a data file that specifies a date of the data.

See Also:
DublinCore.getDate(), Constant Field Values

DESCRIPTION_PROPERTY

public static final java.lang.String DESCRIPTION_PROPERTY
This is the property in a data file that specifies a description of the data.

See Also:
DublinCore.getDescription(), Constant Field Values

FORMAT_PROPERTY

public static final java.lang.String FORMAT_PROPERTY
This is the property in a data file that specifies the format of the the data. Automatically generated if not specified.

See Also:
DublinCore.getFormat(), Constant Field Values

IDENTIFIER_PROPERTY

public static final java.lang.String IDENTIFIER_PROPERTY
This is the property in a data file that specifies the URI of the Identifiable the data. Automatically generated if not specified. Not typically used, nor recommended.

See Also:
DublinCore.getIdentifier(), Constant Field Values

LANGUAGE_PROPERTY

public static final java.lang.String LANGUAGE_PROPERTY
This is the property in a data file that specifies the language of the data. Not typically used, nor recommended.

See Also:
DublinCore.getLanguage(), Constant Field Values

LICENSE_PROPERTY

public static final java.lang.String LICENSE_PROPERTY
This is the property in a data file that specifies the license of the data.

See Also:
DublinCore.getLicense(), Constant Field Values

PUBLISHER_PROPERTY

public static final java.lang.String PUBLISHER_PROPERTY
This is the property in a data file that specifies the publisher of the data.

See Also:
DublinCore.getPublisher(), Constant Field Values

RELATION_PROPERTY

public static final java.lang.String RELATION_PROPERTY
This is the property in a data file that specifies any relationships of the data.

See Also:
DublinCore.getRelation(), Constant Field Values

REQUIRED_PROPERTY

public static final java.lang.String REQUIRED_PROPERTY
This is the property in a data file that specifies any requirements of the data.

See Also:
DublinCore.getRequired(), Constant Field Values

RIGHTS_PROPERTY

public static final java.lang.String RIGHTS_PROPERTY
This is the property in a data file that specifies any rights associated with the data.

See Also:
DublinCore.getRights(), Constant Field Values

SOURCE_PROPERTY

public static final java.lang.String SOURCE_PROPERTY
This is the property in a data file that specifies the source of the data.

See Also:
DublinCore.getSource(), Constant Field Values

SPATIAL_PROPERTY

public static final java.lang.String SPATIAL_PROPERTY
This is the property in a spatial (GML) data file that specifies the file that contains the latitude/longitude data.

See Also:
DublinCore.getSpatial(), Constant Field Values

SUBJECT_PROPERTY

public static final java.lang.String SUBJECT_PROPERTY
This is the property in a data file that specifies the subject of the data.

See Also:
DublinCore.getSubject(), Constant Field Values

TITLE_PROPERTY

public static final java.lang.String TITLE_PROPERTY
This is the property in a relationship data file that specifies the title of the relationship data. Automatically generated if not specified.

See Also:
DublinCore.getTitle(), Constant Field Values

TYPE_PROPERTY

public static final java.lang.String TYPE_PROPERTY
This is the property in a data file that specifies the type of the data. Automatically generated if not specified. Automatically generated if not specified. Not typically used, nor recommended.

See Also:
DublinCore.getType(), Constant Field Values

VALID_PROPERTY

public static final java.lang.String VALID_PROPERTY
This is the property in a data file that specifies the date range that the data is valid for.

See Also:
DublinCore.getValid(), Constant Field Values

identifiableURIPrefix

public static java.lang.String identifiableURIPrefix
This String is the prefix to use when creating the URI of each Identifiable. If it is set to a non-null value, the created Identifiables will have URIs that begin with this prefix. Typically it will begin with "platform:/plugin/....."


SERIALIZATION_DATE_RANGE_FORMAT_2_DATES

public static final java.lang.String SERIALIZATION_DATE_RANGE_FORMAT_2_DATES
This is the format used to create date range strings used in file and folder names.

See Also:
Constant Field Values

SERIALIZATION_DATE_RANGE_FORMAT_1_DATE

public static final java.lang.String SERIALIZATION_DATE_RANGE_FORMAT_1_DATE
This is the format used to create date range strings used in file and folder names.

See Also:
Constant Field Values

SERIALIZATION_DATE_RANGE_FORMAT_1_DATE_YEAR

public static final java.lang.String SERIALIZATION_DATE_RANGE_FORMAT_1_DATE_YEAR
This is the format used to create date range strings used in file and folder names.

See Also:
Constant Field Values
Method Detail

getIdentifiable

public final Identifiable getIdentifiable()
Returns:
the identifiable

setIdentifiable

public final void setIdentifiable(Identifiable identifiable)
Parameters:
identifiable - the identifiable to set

getEndDate

public final java.util.Date getEndDate()
Returns:
the endDate

setDublinCore

public final void setDublinCore(DublinCore dublinCore)
Parameters:
dublinCore -

setEndDate

public final void setEndDate(java.util.Date endDate)
Parameters:
endDate - the endDate to set

getStartDate

public final java.util.Date getStartDate()
Returns:
the startDate

setStartDate

public final void setStartDate(java.util.Date startDate)
Parameters:
startDate - the startDate to set

inDateRange

public boolean inDateRange(java.util.Date startDate,
                           java.util.Date endDate)
Parameters:
startDate - the start date of the date range
endDate - the end date of the date range
Returns:
true if the date range of this record overlaps the test range, false otherwise.

isYounger

public boolean isYounger(IdentifiableRecord ir)
Parameters:
ir - the IdentifiableRecord to test against
Returns:
true if this instance is "younger" than ir or if ir is null, false otherwise.

addAdminLevel

public final void addAdminLevel(int adminLevel)
Parameters:
adminLevel - the administration level to add to the record

addAdminLevel

public final void addAdminLevel(IdentifiableRecord.AdminLevel adminLevel)
Parameters:
adminLevel - the administration level to add to the record

addAdminLevels

public final void addAdminLevels(java.util.List<IdentifiableRecord.AdminLevel> adminLevels)
Add a list of administration levels to the colleciton of administration levels

Parameters:
adminLevels - a list of administration levels

getAdminLevels

public final java.util.List<IdentifiableRecord.AdminLevel> getAdminLevels()
Returns:
the administration levels

getAdminLevelsMaxToMin

public java.util.List<IdentifiableRecord.AdminLevel> getAdminLevelsMaxToMin()
Returns:
the administration levels in reverse order

getNumAdminLevels

public final int getNumAdminLevels()
Returns:
the number of administration levels represented in the identifiable.

getMaxAdminLevel

public final IdentifiableRecord.AdminLevel getMaxAdminLevel()
Returns:
the maximum administration level in the data

getMinAdminLevel

public final IdentifiableRecord.AdminLevel getMinAdminLevel()
Returns:
the minimum administration level in the data

getAdminLevelsAsString

public final java.lang.String getAdminLevelsAsString(java.lang.String delmiter)
Parameters:
delmiter - the string to place between the administration level integers
Returns:
the administration level integers concatenated together with a delimiter (e.g., "0_1").

getNumNodes

public abstract int getNumNodes()
Returns:
the number of Nodes in the Identifiable

getNumEdges

public abstract int getNumEdges()
Returns:
the number of Edges in the Identifiable

getNumLabels

public abstract int getNumLabels()
Returns:
the number of Labels in the Identifiable

getNumModelDecorators

public abstract int getNumModelDecorators()
Returns:
the number of model Decorators in the Identifiable

getNumScenarioDecorators

public abstract int getNumScenarioDecorators()
Returns:
the number of scenario Decorators in the Identifiable

getDublinCore

public final DublinCore getDublinCore()
Returns:
the dublinCore

serialize

public void serialize(java.lang.String directory)
Parameters:
directory - this is the root directory that the IdentifiableRecord should serilize the Identifiable it creates. Typically, the file will be in a sub-directory.

serializeIdentifiable

public static void serializeIdentifiable(Identifiable identifiable,
                                         org.eclipse.emf.common.util.URI fileURI)
Serialize an Identifiable

Parameters:
identifiable -
fileURI -

compareTo

public int compareTo(IdentifiableRecord ir)
Specified by:
compareTo in interface java.lang.Comparable<IdentifiableRecord>
Parameters:
ir - the IdentifiableRecord to compare against
Returns:
compare on minimum adminstration levels
See Also:
IdentifiableRecord.AdminLevel.compareTo(org.eclipse.ohf.stem.internal.data.IdentifiableRecord.AdminLevel), Comparable.compareTo(java.lang.Object)