@Test public void checkDatePointEquality() throws BuilderException { String dateString1 = "2009-08-25T12:00"; String dateFormatString = "yyyy-MM-dd'T'HH:mm"; String dateTypeCreated = "created"; ThreddsMetadataImpl.DatePointImpl date1 = new ThreddsMetadataImpl.DatePointImpl( dateString1, dateFormatString, dateTypeCreated ); ThreddsMetadataImpl.DatePointImpl date2 = new ThreddsMetadataImpl.DatePointImpl( dateString1, dateFormatString, dateTypeCreated ); ThreddsMetadataImpl.DatePointImpl dateDiff1 = new ThreddsMetadataImpl.DatePointImpl( dateString1, dateFormatString, dateTypeCreated ); assertEquals( date1, date2 ); date1.build(); assertEquals( date1, date2 ); date2.build(); assertEquals( date1, date2 ); }
public ThreddsMetadata build() throws BuilderException { if ( this.isBuilt ) return this; if ( this.docs != null ) for ( DocumentationImpl doc : this.docs ) doc.build(); if ( this.keyphrases != null ) for ( KeyphraseImpl keyphrase : this.keyphrases ) keyphrase.build(); if ( this.creators != null ) for ( ContributorImpl creator : this.creators ) creator.build(); if ( this.contributors != null ) for ( ContributorImpl contributor : this.contributors ) contributor.build(); if ( this.publishers != null ) for ( ContributorImpl publisher : this.publishers ) publisher.build(); if ( this.otherDates != null ) for ( DatePointImpl date : this.otherDates ) date.build(); if ( this.createdDate != null ) this.createdDate.build(); if ( this.modifiedDate != null ) this.modifiedDate.build(); if ( this.issuedDate != null ) this.issuedDate.build(); if ( this.validDate != null ) this.validDate.build(); if ( this.availableDate != null ) this.availableDate.build(); if ( this.metadataCreatedDate != null ) this.metadataCreatedDate.build(); if ( this.metadataModifiedDate != null ) this.metadataModifiedDate.build(); if ( this.geospatialCoverage != null ) this.geospatialCoverage.build(); if ( this.temporalCoverage != null ) this.temporalCoverage.build(); if ( this.variableGroups != null ) for ( VariableGroupImpl variableGroup : this.variableGroups ) variableGroup.build(); this.isBuilt = true; return this; }
ThreddsMetadataImpl implements ThreddsMetadata, ThreddsMetadataBuilder { public ThreddsMetadata build() throws BuilderException { if ( this.isBuilt ) return this; if ( this.docs != null ) for ( DocumentationImpl doc : this.docs ) doc.build(); if ( this.keyphrases != null ) for ( KeyphraseImpl keyphrase : this.keyphrases ) keyphrase.build(); if ( this.creators != null ) for ( ContributorImpl creator : this.creators ) creator.build(); if ( this.contributors != null ) for ( ContributorImpl contributor : this.contributors ) contributor.build(); if ( this.publishers != null ) for ( ContributorImpl publisher : this.publishers ) publisher.build(); if ( this.otherDates != null ) for ( DatePointImpl date : this.otherDates ) date.build(); if ( this.createdDate != null ) this.createdDate.build(); if ( this.modifiedDate != null ) this.modifiedDate.build(); if ( this.issuedDate != null ) this.issuedDate.build(); if ( this.validDate != null ) this.validDate.build(); if ( this.availableDate != null ) this.availableDate.build(); if ( this.metadataCreatedDate != null ) this.metadataCreatedDate.build(); if ( this.metadataModifiedDate != null ) this.metadataModifiedDate.build(); if ( this.geospatialCoverage != null ) this.geospatialCoverage.build(); if ( this.temporalCoverage != null ) this.temporalCoverage.build(); if ( this.variableGroups != null ) for ( VariableGroupImpl variableGroup : this.variableGroups ) variableGroup.build(); this.isBuilt = true; return this; } }
ThreddsMetadataImpl implements ThreddsMetadata, ThreddsMetadataBuilder { public ThreddsMetadata build() throws BuilderException { if ( this.isBuilt ) return this; if ( this.docs != null ) for ( DocumentationImpl doc : this.docs ) doc.build(); if ( this.keyphrases != null ) for ( KeyphraseImpl keyphrase : this.keyphrases ) keyphrase.build(); if ( this.creators != null ) for ( ContributorImpl creator : this.creators ) creator.build(); if ( this.contributors != null ) for ( ContributorImpl contributor : this.contributors ) contributor.build(); if ( this.publishers != null ) for ( ContributorImpl publisher : this.publishers ) publisher.build(); if ( this.otherDates != null ) for ( DatePointImpl date : this.otherDates ) date.build(); if ( this.createdDate != null ) this.createdDate.build(); if ( this.modifiedDate != null ) this.modifiedDate.build(); if ( this.issuedDate != null ) this.issuedDate.build(); if ( this.validDate != null ) this.validDate.build(); if ( this.availableDate != null ) this.availableDate.build(); if ( this.metadataCreatedDate != null ) this.metadataCreatedDate.build(); if ( this.metadataModifiedDate != null ) this.metadataModifiedDate.build(); if ( this.geospatialCoverage != null ) this.geospatialCoverage.build(); if ( this.temporalCoverage != null ) this.temporalCoverage.build(); if ( this.variableGroups != null ) for ( VariableGroupImpl variableGroup : this.variableGroups ) variableGroup.build(); this.isBuilt = true; return this; } ThreddsMetadataImpl(); }
ThreddsMetadataImpl implements ThreddsMetadata, ThreddsMetadataBuilder { public ThreddsMetadata build() throws BuilderException { if ( this.isBuilt ) return this; if ( this.docs != null ) for ( DocumentationImpl doc : this.docs ) doc.build(); if ( this.keyphrases != null ) for ( KeyphraseImpl keyphrase : this.keyphrases ) keyphrase.build(); if ( this.creators != null ) for ( ContributorImpl creator : this.creators ) creator.build(); if ( this.contributors != null ) for ( ContributorImpl contributor : this.contributors ) contributor.build(); if ( this.publishers != null ) for ( ContributorImpl publisher : this.publishers ) publisher.build(); if ( this.otherDates != null ) for ( DatePointImpl date : this.otherDates ) date.build(); if ( this.createdDate != null ) this.createdDate.build(); if ( this.modifiedDate != null ) this.modifiedDate.build(); if ( this.issuedDate != null ) this.issuedDate.build(); if ( this.validDate != null ) this.validDate.build(); if ( this.availableDate != null ) this.availableDate.build(); if ( this.metadataCreatedDate != null ) this.metadataCreatedDate.build(); if ( this.metadataModifiedDate != null ) this.metadataModifiedDate.build(); if ( this.geospatialCoverage != null ) this.geospatialCoverage.build(); if ( this.temporalCoverage != null ) this.temporalCoverage.build(); if ( this.variableGroups != null ) for ( VariableGroupImpl variableGroup : this.variableGroups ) variableGroup.build(); this.isBuilt = true; return this; } ThreddsMetadataImpl(); boolean isEmpty(); DocumentationBuilder addDocumentation( String docType, String title, String externalReference ); DocumentationBuilder addDocumentation( String docType, String content ); boolean removeDocumentation( DocumentationBuilder docBuilder ); List<DocumentationBuilder> getDocumentationBuilders(); List<Documentation> getDocumentation(); KeyphraseBuilder addKeyphrase( String authority, String phrase ); boolean removeKeyphrase( KeyphraseBuilder keyphraseBuilder ); List<KeyphraseBuilder> getKeyphraseBuilders(); List<Keyphrase> getKeyphrases(); ProjectNameBuilder addProjectName( String namingAuthority, String name ); boolean removeProjectName( ProjectNameBuilder projectNameBuilder ); List<ProjectNameBuilder> getProjectNameBuilders(); List<ProjectName> getProjectNames(); ContributorBuilder addCreator(); boolean removeCreator( ContributorBuilder creatorBuilder ); List<ContributorBuilder> getCreatorBuilder(); List<Contributor> getCreator(); ContributorBuilder addContributor(); boolean removeContributor( ContributorBuilder contributorBuilder ); List<ContributorBuilder> getContributorBuilder(); List<Contributor> getContributor(); ContributorBuilder addPublisher(); boolean removePublisher( ContributorBuilder publisherBuilder ); List<ContributorBuilder> getPublisherBuilder(); List<Contributor> getPublisher(); DatePointBuilder addOtherDatePointBuilder( String date, String format, String type ); boolean removeOtherDatePointBuilder( DatePointBuilder builder ); List<DatePointBuilder> getOtherDatePointBuilders(); List<DatePoint> getOtherDates(); DatePointBuilder setCreatedDatePointBuilder( String date, String format ); DatePointBuilder getCreatedDatePointBuilder(); DatePoint getCreatedDate(); DatePointBuilder setModifiedDatePointBuilder( String date, String format ); DatePointBuilder getModifiedDatePointBuilder(); DatePoint getModifiedDate(); DatePointBuilder setIssuedDatePointBuilder( String date, String format ); DatePointBuilder getIssuedDatePointBuilder(); DatePoint getIssuedDate(); DatePointBuilder setValidDatePointBuilder( String date, String format ); DatePointBuilder getValidDatePointBuilder(); DatePoint getValidDate(); DatePointBuilder setAvailableDatePointBuilder( String date, String format ); DatePointBuilder getAvailableDatePointBuilder(); DatePoint getAvailableDate(); DatePointBuilder setMetadataCreatedDatePointBuilder( String date, String format ); DatePointBuilder getMetadataCreatedDatePointBuilder(); DatePoint getMetadataCreatedDate(); DatePointBuilder setMetadataModifiedDatePointBuilder( String date, String format ); DatePointBuilder getMetadataModifiedDatePointBuilder(); DatePoint getMetadataModifiedDate(); GeospatialCoverageBuilder setNewGeospatialCoverageBuilder( URI crsUri ); void removeGeospatialCoverageBuilder(); GeospatialCoverageBuilder getGeospatialCoverageBuilder(); GeospatialCoverage getGeospatialCoverage(); DateRangeBuilder setTemporalCoverageBuilder( String startDate, String startDateFormat,
                                                      String endDate, String endDateFormat,
                                                      String duration, String resolution ); DateRangeBuilder getTemporalCoverageBuilder(); DateRange getTemporalCoverage(); VariableGroupBuilder addVariableGroupBuilder(); boolean removeVariableGroupBuilder( VariableGroupBuilder variableGroupBuilder ); List<VariableGroupBuilder> getVariableGroupBuilders(); List<VariableGroup> getVariableGroups(); void setDataSizeInBytes( long dataSizeInBytes ); long getDataSizeInBytes(); void setDataFormat( DataFormatType dataFormat ); void setDataFormat( String dataFormat ); DataFormatType getDataFormat(); void setDataType( FeatureType dataType ); void setDataType( String dataType); FeatureType getDataType(); void setCollectionType( String collectionType ); String getCollectionType(); boolean isBuilt(); BuilderIssues getIssues(); ThreddsMetadata build(); }
ThreddsMetadataImpl implements ThreddsMetadata, ThreddsMetadataBuilder { public ThreddsMetadata build() throws BuilderException { if ( this.isBuilt ) return this; if ( this.docs != null ) for ( DocumentationImpl doc : this.docs ) doc.build(); if ( this.keyphrases != null ) for ( KeyphraseImpl keyphrase : this.keyphrases ) keyphrase.build(); if ( this.creators != null ) for ( ContributorImpl creator : this.creators ) creator.build(); if ( this.contributors != null ) for ( ContributorImpl contributor : this.contributors ) contributor.build(); if ( this.publishers != null ) for ( ContributorImpl publisher : this.publishers ) publisher.build(); if ( this.otherDates != null ) for ( DatePointImpl date : this.otherDates ) date.build(); if ( this.createdDate != null ) this.createdDate.build(); if ( this.modifiedDate != null ) this.modifiedDate.build(); if ( this.issuedDate != null ) this.issuedDate.build(); if ( this.validDate != null ) this.validDate.build(); if ( this.availableDate != null ) this.availableDate.build(); if ( this.metadataCreatedDate != null ) this.metadataCreatedDate.build(); if ( this.metadataModifiedDate != null ) this.metadataModifiedDate.build(); if ( this.geospatialCoverage != null ) this.geospatialCoverage.build(); if ( this.temporalCoverage != null ) this.temporalCoverage.build(); if ( this.variableGroups != null ) for ( VariableGroupImpl variableGroup : this.variableGroups ) variableGroup.build(); this.isBuilt = true; return this; } ThreddsMetadataImpl(); boolean isEmpty(); DocumentationBuilder addDocumentation( String docType, String title, String externalReference ); DocumentationBuilder addDocumentation( String docType, String content ); boolean removeDocumentation( DocumentationBuilder docBuilder ); List<DocumentationBuilder> getDocumentationBuilders(); List<Documentation> getDocumentation(); KeyphraseBuilder addKeyphrase( String authority, String phrase ); boolean removeKeyphrase( KeyphraseBuilder keyphraseBuilder ); List<KeyphraseBuilder> getKeyphraseBuilders(); List<Keyphrase> getKeyphrases(); ProjectNameBuilder addProjectName( String namingAuthority, String name ); boolean removeProjectName( ProjectNameBuilder projectNameBuilder ); List<ProjectNameBuilder> getProjectNameBuilders(); List<ProjectName> getProjectNames(); ContributorBuilder addCreator(); boolean removeCreator( ContributorBuilder creatorBuilder ); List<ContributorBuilder> getCreatorBuilder(); List<Contributor> getCreator(); ContributorBuilder addContributor(); boolean removeContributor( ContributorBuilder contributorBuilder ); List<ContributorBuilder> getContributorBuilder(); List<Contributor> getContributor(); ContributorBuilder addPublisher(); boolean removePublisher( ContributorBuilder publisherBuilder ); List<ContributorBuilder> getPublisherBuilder(); List<Contributor> getPublisher(); DatePointBuilder addOtherDatePointBuilder( String date, String format, String type ); boolean removeOtherDatePointBuilder( DatePointBuilder builder ); List<DatePointBuilder> getOtherDatePointBuilders(); List<DatePoint> getOtherDates(); DatePointBuilder setCreatedDatePointBuilder( String date, String format ); DatePointBuilder getCreatedDatePointBuilder(); DatePoint getCreatedDate(); DatePointBuilder setModifiedDatePointBuilder( String date, String format ); DatePointBuilder getModifiedDatePointBuilder(); DatePoint getModifiedDate(); DatePointBuilder setIssuedDatePointBuilder( String date, String format ); DatePointBuilder getIssuedDatePointBuilder(); DatePoint getIssuedDate(); DatePointBuilder setValidDatePointBuilder( String date, String format ); DatePointBuilder getValidDatePointBuilder(); DatePoint getValidDate(); DatePointBuilder setAvailableDatePointBuilder( String date, String format ); DatePointBuilder getAvailableDatePointBuilder(); DatePoint getAvailableDate(); DatePointBuilder setMetadataCreatedDatePointBuilder( String date, String format ); DatePointBuilder getMetadataCreatedDatePointBuilder(); DatePoint getMetadataCreatedDate(); DatePointBuilder setMetadataModifiedDatePointBuilder( String date, String format ); DatePointBuilder getMetadataModifiedDatePointBuilder(); DatePoint getMetadataModifiedDate(); GeospatialCoverageBuilder setNewGeospatialCoverageBuilder( URI crsUri ); void removeGeospatialCoverageBuilder(); GeospatialCoverageBuilder getGeospatialCoverageBuilder(); GeospatialCoverage getGeospatialCoverage(); DateRangeBuilder setTemporalCoverageBuilder( String startDate, String startDateFormat,
                                                      String endDate, String endDateFormat,
                                                      String duration, String resolution ); DateRangeBuilder getTemporalCoverageBuilder(); DateRange getTemporalCoverage(); VariableGroupBuilder addVariableGroupBuilder(); boolean removeVariableGroupBuilder( VariableGroupBuilder variableGroupBuilder ); List<VariableGroupBuilder> getVariableGroupBuilders(); List<VariableGroup> getVariableGroups(); void setDataSizeInBytes( long dataSizeInBytes ); long getDataSizeInBytes(); void setDataFormat( DataFormatType dataFormat ); void setDataFormat( String dataFormat ); DataFormatType getDataFormat(); void setDataType( FeatureType dataType ); void setDataType( String dataType); FeatureType getDataType(); void setCollectionType( String collectionType ); String getCollectionType(); boolean isBuilt(); BuilderIssues getIssues(); ThreddsMetadata build();  }