Skip to content

Commit

Permalink
Merge pull request #251 from TAMULib/dspace-7_x-sprint5-staging
Browse files Browse the repository at this point in the history
DSpace 7 Upgrade Sprint 5
  • Loading branch information
wwelling authored Feb 22, 2024
2 parents 39b9930 + 6a78cc2 commit 6da0a8c
Show file tree
Hide file tree
Showing 9 changed files with 529 additions and 90 deletions.
8 changes: 4 additions & 4 deletions dspace/config/item-submission.xml
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@
<!--Step will be to Upload the item -->
<step id="upload"/>

<!-- <step id="extractionstep"/> -->
<step id="extractionstep"/>

<!-- Uncomment this step to allow the user to select a Creative Commons License -->
<step id="cclicense"/>
Expand Down Expand Up @@ -354,7 +354,7 @@
<!--Step will be to Upload the item -->
<step id="upload"/>

<!-- <step id="extractionstep"/> -->
<step id="extractionstep"/>

<!-- Uncomment this step to allow the user to select a Creative Commons License -->
<step id="cclicense"/>
Expand Down Expand Up @@ -386,7 +386,7 @@
<!--Step will be to Upload the item -->
<step id="upload"/>

<!-- <step id="extractionstep"/> -->
<step id="extractionstep"/>

<!-- Uncomment this step to allow the user to select a Creative Commons License -->
<step id="cclicense"/>
Expand Down Expand Up @@ -418,7 +418,7 @@
<!--Step will be to Upload the item -->
<step id="upload"/>

<!-- <step id="extractionstep"/> -->
<step id="extractionstep"/>

<!-- Uncomment this step to allow the user to select a Creative Commons License -->
<step id="cclicense"/>
Expand Down
28 changes: 28 additions & 0 deletions dspace/config/registries/thesis-types.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@
<namespace>http://digital.library.tamu.edu/schemas/thesis/</namespace>
</dc-schema>

<dc-type>
<schema>thesis</schema>
<element>degree</element>
<qualifier>college</qualifier>
<scope_note></scope_note>
</dc-type>

<dc-type>
<schema>thesis</schema>
<element>degree</element>
Expand Down Expand Up @@ -50,13 +57,34 @@
<scope_note>Level of education associated with the document. Examples: bachelor's, master's, doctoral, post-doctoral, other.</scope_note>
</dc-type>

<dc-type>
<schema>thesis</schema>
<element>degree</element>
<qualifier>major</qualifier>
<scope_note></scope_note>
</dc-type>

<dc-type>
<schema>thesis</schema>
<element>degree</element>
<qualifier>name</qualifier>
<scope_note>Name of the degree associated with the work as it appears within the work. (example: Masters in Operations Research)</scope_note>
</dc-type>

<dc-type>
<schema>thesis</schema>
<element>degree</element>
<qualifier>program</qualifier>
<scope_note></scope_note>
</dc-type>

<dc-type>
<schema>thesis</schema>
<element>degree</element>
<qualifier>school</qualifier>
<scope_note></scope_note>
</dc-type>

<dc-type>
<schema>thesis</schema>
<element>sequence</element>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
import java.nio.charset.StandardCharsets;
import java.sql.SQLException;
import java.util.ArrayList;
// TAMU Customization - Only index text bitstreams that are not restricted
import java.util.Date;
import java.util.Enumeration;
import java.util.Iterator;
import java.util.List;
Expand All @@ -26,6 +28,8 @@
import com.google.common.collect.Iterables;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
// TAMU Customization - Only index text bitstreams that are not restricted
import org.apache.commons.lang3.time.DateUtils;
import org.apache.logging.log4j.Logger;
import org.apache.solr.common.util.ContentStreamBase;
import org.dspace.authorize.AuthorizeException;
Expand Down Expand Up @@ -94,7 +98,13 @@ private void buildFullTextList(Item parentItem) throws SQLException {

for (ResourcePolicy rp:bundlePolicies) {
if (rp.getdSpaceObject().getID() == fulltextBitstream.getID()) {
if (rp.getGroup().getName().equalsIgnoreCase("anonymous")) {
Date start = rp.getStartDate();
Date end = rp.getEndDate();
Date now = new Date();
if (rp.getGroup().getName().equalsIgnoreCase("anonymous")
&& (start == null || ((start.before(now) || DateUtils.isSameDay(start, now))
&& (end == null || (end.after(now) || DateUtils.isSameDay(now, end)))))
) {
isIndexable = true;
}
break;
Expand Down
Loading

0 comments on commit 6da0a8c

Please sign in to comment.