Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DSpace 7 Upgrade Sprint 5 #251

Merged
merged 14 commits into from
Feb 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading