Re: [dspace-tech] Bad Characters making OAI returning mal formed XML

2016-06-20 Thread Tiago Guimarães
java version is 1-7_85, the char giving me problems is 0xdbc0

Em quinta-feira, 9 de junho de 2016 21:36:13 UTC+1, Stuart Yeates escreveu:
>
> The issue may be that the code blocks in question are not supported by the 
> version of java in use. Different versions of java support different 
> versions of unicode which include different sets of code blocks. Please 
> include the exact version of java and the code point / code block in any 
> bug reports.
>
> For example, for a long time 'Linear B' was a problem for us, but now it's 
> not.
>
> cheers
> stuart
>
> --
> ...let us be heard from red core to black sky
>
> On Thu, Jun 9, 2016 at 11:09 PM, Tiago Guimarães  > wrote:
>
>> DB is in UTF.
>> Note that there is no error while using the JSPUI, only when trying to 
>> harvest the OAI, does that error appear.
>>
>> The log has that line that i posted:  
>> com.ctc.wstx.exc.WstxParsingException: Illegal character entity: 
>> expansion character (code 0xdbc0) not a valid XML character
>>
>> The really weird thing is that char code is not on the interval for 
>> invalid xml chars in the w3c documentation.
>>
>> From my understanding, this errors appear when somebody copy and pastes 
>> the the abstract from some pdf and carry over some weird chars.
>>
>>
>> Em quinta-feira, 9 de junho de 2016 12:02:17 UTC+1, Luiz dos Santos 
>> escreveu:
>>>
>>> Hi, 
>>>
>>>To me it seems a charset problem, are you sure that the database is 
>>> UTF-8? Do you see any error in the log?
>>>
>>> Best
>>> Luiz
>>>
>>> On Thursday, June 9, 2016, Tiago Guimarães  
>>> wrote:
>>>
>>>> Hi all,
>>>>
>>>>
>>>> I'm having problems with bad characters in OAI.
>>>>
>>>>
>>>> It's the same as this JIRA ticket:  
>>>> https://jira.duraspace.org/projects/DS/issues/DS-2806
>>>>
>>>>
>>>> this is a problem that is appearing here, basicaly, OAI returns 
>>>> mal-formed XML because of weird chars
>>>>
>>>> Example:  https://i.gyazo.com/22b7f355b0e71b830ec08378a9076c34.png
>>>>
>>>> Shouldn't dspace take care of that? At least warn the User when he 
>>>> pastes invalid chars when deposit an item.
>>>>
>>>>
>>>> DSpace should probably have a feature that detects characters that 
>>>> break the OAI XML. I'm up to creating a PR that does that, but i need 
>>>> guidance.
>>>>
>>>>
>>>>
>>>> Also, according to this https://www.w3.org/TR/REC-xml/#NT-Char the 
>>>> char 0xdbc0 should be valid to XML, but OAI is giving me this: 
>>>> com.ctc.wstx.exc.WstxParsingException: Illegal character entity: expansion 
>>>> character (code 0xdbc0) not a valid XML character
>>>>
>>>> -- 
>>>> You received this message because you are subscribed to the Google 
>>>> Groups "DSpace Technical Support" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send 
>>>> an email to dspace-tech+unsubscr...@googlegroups.com.
>>>> To post to this group, send email to dspace-tech@googlegroups.com.
>>>> Visit this group at https://groups.google.com/group/dspace-tech.
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "DSpace Technical Support" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to dspace-tech...@googlegroups.com .
>> To post to this group, send email to dspac...@googlegroups.com 
>> .
>> Visit this group at https://groups.google.com/group/dspace-tech.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dspace-tech+unsubscr...@googlegroups.com.
To post to this group, send email to dspace-tech@googlegroups.com.
Visit this group at https://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.


Re: [dspace-tech] Bad Characters making OAI returning mal formed XML

2016-06-09 Thread Tiago Guimarães
DB is in UTF.
Note that there is no error while using the JSPUI, only when trying to 
harvest the OAI, does that error appear.

The log has that line that i posted:  
com.ctc.wstx.exc.WstxParsingException: Illegal character entity: expansion 
character (code 0xdbc0) not a valid XML character

The really weird thing is that char code is not on the interval for invalid 
xml chars in the w3c documentation.

>From my understanding, this errors appear when somebody copy and pastes the 
the abstract from some pdf and carry over some weird chars.


Em quinta-feira, 9 de junho de 2016 12:02:17 UTC+1, Luiz dos Santos 
escreveu:
>
> Hi, 
>
>To me it seems a charset problem, are you sure that the database is 
> UTF-8? Do you see any error in the log?
>
> Best
> Luiz
>
> On Thursday, June 9, 2016, Tiago Guimarães  > wrote:
>
>> Hi all,
>>
>>
>> I'm having problems with bad characters in OAI.
>>
>>
>> It's the same as this JIRA ticket:  
>> https://jira.duraspace.org/projects/DS/issues/DS-2806
>>
>>
>> this is a problem that is appearing here, basicaly, OAI returns 
>> mal-formed XML because of weird chars
>>
>> Example:  https://i.gyazo.com/22b7f355b0e71b830ec08378a9076c34.png
>>
>> Shouldn't dspace take care of that? At least warn the User when he 
>> pastes invalid chars when deposit an item.
>>
>>
>> DSpace should probably have a feature that detects characters that break 
>> the OAI XML. I'm up to creating a PR that does that, but i need guidance.
>>
>>
>>
>> Also, according to this https://www.w3.org/TR/REC-xml/#NT-Char the char 
>> 0xdbc0 should be valid to XML, but OAI is giving me this: 
>> com.ctc.wstx.exc.WstxParsingException: Illegal character entity: expansion 
>> character (code 0xdbc0) not a valid XML character
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "DSpace Technical Support" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to dspace-tech+unsubscr...@googlegroups.com.
>> To post to this group, send email to dspace-tech@googlegroups.com.
>> Visit this group at https://groups.google.com/group/dspace-tech.
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dspace-tech+unsubscr...@googlegroups.com.
To post to this group, send email to dspace-tech@googlegroups.com.
Visit this group at https://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.


[dspace-tech] Bad Characters making OAI returning mal formed XML

2016-06-09 Thread Tiago Guimarães


Hi all,


I'm having problems with bad characters in OAI.


It's the same as this JIRA ticket:  
https://jira.duraspace.org/projects/DS/issues/DS-2806


this is a problem that is appearing here, basicaly, OAI returns mal-formed 
XML because of weird chars

Example:  https://i.gyazo.com/22b7f355b0e71b830ec08378a9076c34.png

Shouldn't dspace take care of that? At least warn the User when he pastes 
invalid chars when deposit an item.


DSpace should probably have a feature that detects characters that break 
the OAI XML. I'm up to creating a PR that does that, but i need guidance.



Also, according to this https://www.w3.org/TR/REC-xml/#NT-Char the char 
0xdbc0 should be valid to XML, but OAI is giving me this: 
com.ctc.wstx.exc.WstxParsingException: Illegal character entity: expansion 
character (code 0xdbc0) not a valid XML character

-- 
You received this message because you are subscribed to the Google Groups 
"DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dspace-tech+unsubscr...@googlegroups.com.
To post to this group, send email to dspace-tech@googlegroups.com.
Visit this group at https://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.


[dspace-tech] Vagrant-dspace is not finding mirrors for apt

2016-05-26 Thread Tiago Guimarães


Hi all,

i'm trying to run vagrant Dspace but i'm getting this error:

==> vagrant-dspace: ... apt-spy2 installed!
> ==> vagrant-dspace: ... Setting 'apt' sources.list for closest mirror to 
> country=PT
>
==> vagrant-dspace: The closest mirror is:
> ==> vagrant-dspace: Updating /etc/apt/sources.list
> ==> vagrant-dspace: Updated '/etc/apt/sources.list' with
> ==> vagrant-dspace: Run `apt-get update` to update
> ==> vagrant-dspace: Re-running apt-get update after sources updated...
> ==> vagrant-dspace: E
> ==> vagrant-dspace: :
> ==> vagrant-dspace: Malformed line 2 in source list /etc/apt/sources.list 
> (URI parse)
> ==> vagrant-dspace: E
> ==> vagrant-dspace: :
> ==> vagrant-dspace: The list of sources could not be read.
> The SSH command responded with a non-zero exit status. Vagrant
> assumes that this means the command failed. The output for this command
> should be in the log above. Please read the output to determine what
> went wrong.
>

I checked sources.list and it is like this:

## Updated on 2016-05-26 13:39:20 + by apt-spy2
> deb  trusty main restricted universe multiverse
> deb  trusty-updates main restricted universe multiverse
> deb  trusty-backports main restricted universe multiverse
> deb  trusty-security main restricted universe multiverse


It seems that it is not  finding the closing mirror to PT.
How do i fix this?

Even if i manually add the URL to sources.list, how do i continue the 
vagrant instalation?


-- 
You received this message because you are subscribed to the Google Groups 
"DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dspace-tech+unsubscr...@googlegroups.com.
To post to this group, send email to dspace-tech@googlegroups.com.
Visit this group at https://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.


[dspace-tech] Re: Replacing dc.rights text with a logo in the browsing list

2016-05-25 Thread Tiago Guimarães
Alright, found my way.
The code that needs editing is org.dspace.app.webui.jsptag.BrowseListTag.

Em terça-feira, 24 de maio de 2016 16:52:32 UTC+1, Tiago Guimarães escreveu:
>
>  Hi guys, newbie here, i'm having trouble with JSP, i not really used to 
> JSP, and i want to make  a change but i'm swimming around the code and not 
> finding what i want
>
> What i want is, when the user is browsing items, i want to show a small 
> logo in the dc.rights column depending on the dc.right of the item.
> I already added the dc.right column in dspace.cfg, but i don't know how to 
> replace the text from metadata, to an icon depending on the text
>
> My bet is somewhere on 
> https://github.com/DSpace/DSpace/blob/dspace-5_x/dspace-jspui/src/main/webapp/browse/full.jsp
>  
> but i'm not very good with jsp. I would appreciate some help like locating 
> where in that jsp the metadata is being read
>
> An example of what I want: https://estudogeral.sib.uc.pt/browse?type=title
> In the Acesso column, it is being shown some icons instead of the text 
> metadata
>

-- 
You received this message because you are subscribed to the Google Groups 
"DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dspace-tech+unsubscr...@googlegroups.com.
To post to this group, send email to dspace-tech@googlegroups.com.
Visit this group at https://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.


[dspace-tech] Replacing dc.rights text with a logo in the browsing list

2016-05-24 Thread Tiago Guimarães
 Hi guys, newbie here, i'm having trouble with JSP, i not really used to 
JSP, and i want to make  a change but i'm swimming around the code and not 
finding what i want

What i want is, when the user is browsing items, i want to show a small 
logo in the dc.rights column depending on the dc.right of the item.
I already added the dc.right column in dspace.cfg, but i don't know how to 
replace the text from metadata, to an icon depending on the text

My bet is somewhere on 
https://github.com/DSpace/DSpace/blob/dspace-5_x/dspace-jspui/src/main/webapp/browse/full.jsp
 
but i'm not very good with jsp. I would appreciate some help like locating 
where in that jsp the metadata is being read

An example of what I want: https://estudogeral.sib.uc.pt/browse?type=title
In the Acesso column, it is being shown some icons instead of the text 
metadata

-- 
You received this message because you are subscribed to the Google Groups 
"DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dspace-tech+unsubscr...@googlegroups.com.
To post to this group, send email to dspace-tech@googlegroups.com.
Visit this group at https://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.


[dspace-tech] pre 3.0 embargo on 5.x

2016-05-03 Thread Tiago Guimarães
According to the docs 
(https://wiki.duraspace.org/display/DSDOC5x/Embargo#Embargo-Pre-DSpace3.0EmbargoCompatibility)
 
you should be able to use the old embargo system in Dspace 5.x . 

I was trying to develop my own Embargo Lifter, but i noticed that my lifted 
was never being called, i went into the Dspace source and noticed that the 
line that called the lifter is commented in 5.x (line 179 
 
https://github.com/DSpace/DSpace/blob/dspace-5_x/dspace-api/src/main/java/org/dspace/embargo/EmbargoManager.java
 
)


Isn't this a bug? "Home made" lifters do not work because of that.

-- 
You received this message because you are subscribed to the Google Groups 
"DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dspace-tech+unsubscr...@googlegroups.com.
To post to this group, send email to dspace-tech@googlegroups.com.
Visit this group at https://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.


[dspace-tech] Re: Submitting Restricted Access Items

2016-04-19 Thread Tiago Guimarães
forgot link to the docs: 
 
https://wiki.duraspace.org/display/DSDOC5x/Embargo#Embargo-Item.inheritCollectionDefaultPolicies(Collectionc)


Em terça-feira, 19 de abril de 2016 18:10:01 UTC+1, Tiago Guimarães 
escreveu:
>
> In the  documentation for Item.inheritCollectionDefaultPolicies it says 
> that "This method has been adjusted to leave custom policies, added by 
> the users, in place and add the default collection policies only if there 
> are no custom policies." But this is wrong. It only checks if the 
> *colection* has policies, but it tests nothing about the item. That is 
> the reason my problem appeared, even tough i was placing custom policies, 
> the default anonymous policies were still appearing after my own. 
>
> Are you guys planning on checking this bug out? And patching it?
>
>
> Em terça-feira, 19 de abril de 2016 12:51:51 UTC+1, Tiago Guimarães 
> escreveu:
>>
>> Hi,
>>
>> I have to implement a feature that when a user deposits a item and 
>> specifies that it is restricted access, only the admins should be able to 
>> view the deposited bitstreams/pdf.
>>
>> First I went to the item-submission.xml, added a step to the end with my 
>> code to add the Administrator policy. It created the policy but later  an 
>> Anonymous group policy was added by the system. 
>> So i decided to implement a more intrusive approach, I used my own Java 
>> Class in the Complete Step, extending the CompleteStep class. It worked in 
>> my little virtual machine, because in that test environment i haven't 
>> assigned a group to accept the items in the collection. When i assigned 
>> Adminitrator group to the Collection, the problem came back. My item 
>> appeared with both Administrator policy and a Anonymous policy in the 
>> bitstream.
>>
>> So, how can i make possible for an item to be submitted with restricted 
>> access (only admins can read the deposited pdf) ?
>>
>> I'm using JSPUI so i can't using the Configurable Workflows.
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dspace-tech+unsubscr...@googlegroups.com.
To post to this group, send email to dspace-tech@googlegroups.com.
Visit this group at https://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.


[dspace-tech] Re: Submitting Restricted Access Items

2016-04-19 Thread Tiago Guimarães
In the  documentation for Item.inheritCollectionDefaultPolicies it says 
that "This method has been adjusted to leave custom policies, added by the 
users, in place and add the default collection policies only if there are 
no custom policies." But this is wrong. It only checks if the *colection* has 
policies, but it tests nothing about the item. That is the reason my 
problem appeared, even tough i was placing custom policies, the default 
anonymous policies were still appearing after my own. 

Are you guys planning on checking this bug out? And patching it?


Em terça-feira, 19 de abril de 2016 12:51:51 UTC+1, Tiago Guimarães 
escreveu:
>
> Hi,
>
> I have to implement a feature that when a user deposits a item and 
> specifies that it is restricted access, only the admins should be able to 
> view the deposited bitstreams/pdf.
>
> First I went to the item-submission.xml, added a step to the end with my 
> code to add the Administrator policy. It created the policy but later  an 
> Anonymous group policy was added by the system. 
> So i decided to implement a more intrusive approach, I used my own Java 
> Class in the Complete Step, extending the CompleteStep class. It worked in 
> my little virtual machine, because in that test environment i haven't 
> assigned a group to accept the items in the collection. When i assigned 
> Adminitrator group to the Collection, the problem came back. My item 
> appeared with both Administrator policy and a Anonymous policy in the 
> bitstream.
>
> So, how can i make possible for an item to be submitted with restricted 
> access (only admins can read the deposited pdf) ?
>
> I'm using JSPUI so i can't using the Configurable Workflows.
>

-- 
You received this message because you are subscribed to the Google Groups 
"DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dspace-tech+unsubscr...@googlegroups.com.
To post to this group, send email to dspace-tech@googlegroups.com.
Visit this group at https://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.


[dspace-tech] Submitting Restricted Access Items

2016-04-19 Thread Tiago Guimarães
Hi,

I have to implement a feature that when a user deposits a item and 
specifies that it is restricted access, only the admins should be able to 
view the deposited bitstreams/pdf.

First I went to the item-submission.xml, added a step to the end with my 
code to add the Administrator policy. It created the policy but later  an 
Anonymous group policy was added by the system. 
So i decided to implement a more intrusive approach, I used my own Java 
Class in the Complete Step, extending the CompleteStep class. It worked in 
my little virtual machine, because in that test environment i haven't 
assigned a group to accept the items in the collection. When i assigned 
Adminitrator group to the Collection, the problem came back. My item 
appeared with both Administrator policy and a Anonymous policy in the 
bitstream.

So, how can i make possible for an item to be submitted with restricted 
access (only admins can read the deposited pdf) ?

I'm using JSPUI so i can't using the Configurable Workflows.

-- 
You received this message because you are subscribed to the Google Groups 
"DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dspace-tech+unsubscr...@googlegroups.com.
To post to this group, send email to dspace-tech@googlegroups.com.
Visit this group at https://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.