Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/EML_DATAMANAGER_0_9_BRANCH' into…
Browse files Browse the repository at this point in the history
… BRANCH_EML_2_2
  • Loading branch information
taojing2002 committed Sep 5, 2019
2 parents 3a9ae6d + 8d8d35c commit 08e9079
Show file tree
Hide file tree
Showing 7 changed files with 328 additions and 35 deletions.
11 changes: 11 additions & 0 deletions .project
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>eml</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
</buildSpec>
<natures>
</natures>
</projectDescription>
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<groupId>org.ecoinformatics.eml</groupId>
<artifactId>datamanager</artifactId>
<packaging>jar</packaging>
<version>0.9.1</version>
<version>0.9.2</version>
<name>datamanager</name>
<url>http://maven.apache.org</url>
<repositories>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,11 @@ public class DataPackage
private String title = null;
private String abstractText = null;
private List<Party> creators = null;

private String language = null;
private List<String> keywords = null;
private String abstract_str = null;
private Party publisher = null;


/*
* Constructors
Expand All @@ -118,7 +122,7 @@ public DataPackage(String packageId)
this.packageId = packageId;
this.qualityReport = new QualityReport(this);
this.creators = new ArrayList<Party>();

this.keywords = new ArrayList<String> ();
qualityCheckPackageId(packageId);
}

Expand Down Expand Up @@ -253,6 +257,56 @@ public Entity getEntity(String name) {
return null;
}

/**
* Get the language used in this eml document
* @return the language
*/
public String getLanguage() {
return language;
}

/**
* Set the language description
* @param language
*/
public void setLanguage(String language) {
this.language = language;
}


/**
* Get the list of keywords in this eml document
* @return
*/
public List<String> getKeywords() {
return keywords;
}

/**
* Set the keywords list
* @param keywords
*/
public void setKeywords(List<String> keywords) {
this.keywords = keywords;
}

/**
* Get the abstract of this eml document
* @return the abstract
*/
public String getAbstract() {
return abstract_str;
}

/**
* Set the abstract
* @param absctrac
*/
public void setAbstract(String abstract_str) {
this.abstract_str = abstract_str;
}



/**
* Determine whether the data package contains
Expand Down Expand Up @@ -1044,6 +1098,14 @@ public void setPubDate(String pubDate) {
}
}

/**
* Get the publication date of this package
* @return
*/
public String getPubDate() {
return this.pubDate;
}


/**
* Sets the value of the 'system' to the specified String
Expand Down Expand Up @@ -1120,12 +1182,29 @@ public String getTitle() {

public List<Party> getCreators() {
return creators;
}
}


public void setCreators(List<Party> creators) {
public void setCreators(List<Party> creators) {
this.creators = creators;
}
}

/**
* Get the publisher of this package
* @return
*/
public Party getPublisher() {
return publisher;
}

/**
* Set the publisher of this package
* @param publisher
*/
public void setPublisher(Party publisher) {
this.publisher = publisher;
}



/**
Expand Down
42 changes: 42 additions & 0 deletions src/main/java/org/ecoinformatics/datamanager/parser/Party.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@

package org.ecoinformatics.datamanager.parser;

import java.util.ArrayList;
import java.util.List;

/**
Expand All @@ -47,6 +48,8 @@ public class Party {
private String surName;
private List<String> givenNames;
private String organization;
private String positionName;
private List<UserId> userIdList = new ArrayList<UserId>();


/**
Expand Down Expand Up @@ -87,6 +90,45 @@ public String getOrganization() {
public void setOrganization(String organization) {
this.organization = organization;
}


public List<UserId> getUserIdList() {
return userIdList;
}


public void setUserIdList(List<UserId> userIdList) {
this.userIdList = userIdList;
}

/**
* Add a given userId object to the list
* @param userId
*/
public void addUserId(UserId userId) {
if(userId != null) {
if(this.userIdList == null) {
this.userIdList = new ArrayList<UserId>();
}
this.userIdList.add(userId);
}
}

/**
* Get the position name of this party
* @return
*/
public String getPositionName() {
return positionName;
}

/**
* Set the position name of this party
* @param positionName
*/
public void setPositionName(String positionName) {
this.positionName = positionName;
}


}
85 changes: 85 additions & 0 deletions src/main/java/org/ecoinformatics/datamanager/parser/UserId.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
/**
* '$RCSfile: UserId.java,v $'
*
* '$Author$'
* '$Date$'
* '$Revision$'
*
* For Details: http://kepler.ecoinformatics.org
*
* Copyright (c) 2019 The Regents of the University of California.
* All rights reserved.
*
* Permission is hereby granted, without written agreement and without
* license or royalty fees, to use, copy, modify, and distribute this
* software and its documentation for any purpose, provided that the
* above copyright notice and the following two paragraphs appear in
* all copies of this software.
*
* IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY
* FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
* ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
* IF THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY
* OF SUCH DAMAGE.
*
* THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
* PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY
* OF CALIFORNIA HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT,
* UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
*/
package org.ecoinformatics.datamanager.parser;


/**
* This object represent the userId - part of the party.
* It has a value and attribute - directory.
* @author tao
*
*/
public class UserId {

private String value = null;
private String directory = null;

/**
* Default constructor
*/
public UserId() {

}

/**
* Get the value of the user id
* @return the value
*/
public String getValue() {
return value;
}

/**
* Set the value of the user id
* @param value
*/
public void setValue(String value) {
this.value = value;
}

/**
* Get the value of the directory
* @return
*/
public String getDirectory() {
return directory;
}

/**
* Set the value of the directory
* @param directory
*/
public void setDirectory(String directory) {
this.directory = directory;
}

}
Loading

0 comments on commit 08e9079

Please sign in to comment.