[dspace-tech] DSpace Rest HTTP 206 Accept-Ranges

2016-06-20 Thread Pedro Amorim
Hello everyone,

I'm trying to configure the DSpace REST webapp to serve content with the 
Accept-Range header.
I stumbled upon this thread:
http://stackoverflow.com/questions/36665305/dspace-rest-api-creating-a-new-top-level-communtity-403-preflight-response-i

Which helped me with a cross-origin problem.
However content is always server with 200 code and no Accept-Range header 
is present.

*This is my current CorsFilter in web.xml in webapps/rest/WEB-INF:*


  CorsFilter
  org.apache.catalina.filters.CorsFilter
  
 cors.allowed.origins
 *
  
  
 cors.allowed.methods
 GET,POST,HEAD,OPTIONS,PUT
  
  
 cors.allowed.headers
 Range
  
  
 cors.exposed.headers

 
Accept-Ranges,Content-Encoding,Content-Length,Content-Range
  
  
 cors.support.credentials
 true
  
   

*These are the response headers I'm getting:*

   1. Access-Control-Allow-Credentials:
   true
   2. Access-Control-Allow-Origin:
   https://mydomain.localhost
   3. Access-Control-Expose-Headers:
   Content-Length,Content-Encoding,Accept-Ranges,Content-Range
   4. Content-Type:
   application/pdf
   5. Date:
   Mon, 20 Jun 2016 17:35:30 GMT
   6. Server:
   Apache-Coyote/1.1
   7. Strict-Transport-Security:
   max-age=31536000; includeSubDomains
   8. Transfer-Encoding:
   chunked
   
*I'm looking for something like this:*

   1. Accept-Ranges:
   bytes
   2. Content-Length:
   9255911
   3. Content-Type:
   application/pdf
   4. Date:
   Mon, 20 Jun 2016 17:35:17 GMT
   5. ETag:
   "8d3be7-535b7cf7e4700"
   6. Last-Modified:
   Mon, 20 Jun 2016 16:01:00 GMT
   7. Server:
   Apache/2.4.10 (Debian) PHP/5.6.12
   8. Strict-Transport-Security:
   max-age=31536000; includeSubDomains
   

Any help is greatly appreciated.

Thank you,

Pedro Amorim

-- 
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] importing metadata Schema

2016-06-20 Thread Claudia Jürgen

Hi Lewatle,

you may create a new schema by creating a registry file similar to:
https://github.com/DSpace/DSpace/tree/master/dspace/config/registries
the existing registries for bitstream formats and metadata.

Then use the command line operation see
https://wiki.duraspace.org/display/DSDOC4x/Command+Line+Operations

[dspace]/bin/dspace registry-loader -metadata Your-Registry-File.xml

to load the new schema and it's fields into an existing instance.

Hope this helps

Claudia Jürgen


Am 20.06.2016 um 16:11 schrieb Lewatle Johannes Phaladi:

Dear All,

Is there anyway of importing metadata schema to Dspace rather than manually
adding them, and also adding fields without adding them one by one?

please see attached image, i have added few metadata schemas and fields
manually, but i would like to know if there is a way to import them
automatically.

Regards,
Lewatle



--
Claudia Juergen
Eldorado

Technische Universität Dortmund
Universitätsbibliothek
Vogelpothsweg 76
44227 Dortmund

Tel.: +49 231-755 40 43
Fax: +49 231-755 40 32
claudia.juer...@tu-dortmund.de
www.ub.tu-dortmund.de

Wichtiger Hinweis: Die Information in dieser E-Mail ist vertraulich. Sie ist 
ausschließlich für den Adressaten bestimmt. Sollten Sie nicht der für diese 
E-Mail bestimmte Adressat sein, unterrichten Sie bitte den Absender und 
vernichten Sie diese Mail. Vielen Dank.
Unbeschadet der Korrespondenz per E-Mail, sind unsere Erklärungen 
ausschließlich final rechtsverbindlich, wenn sie in herkömmlicher Schriftform 
(mit eigenhändiger Unterschrift) oder durch Übermittlung eines solchen 
Schriftstücks per Telefax erfolgen.

Important note: The information included in this e-mail is confidential. It is 
solely intended for the recipient. If you are not the intended recipient of 
this e-mail please contact the sender and delete this message. Thank you. 
Without prejudice of e-mail correspondence, our statements are only legally 
binding when they are made in the conventional written form (with personal 
signature) or when such documents are sent by fax.

--
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] importing metadata Schema

2016-06-20 Thread Christian Loeschen

Dear Lewatle,

I've done this via a csv file and a some simple steps to push 
metadatafields directly into the postgres database. This is how it works:


1) create metadata-schema in dspace webinterface first and keep the 
schema-id in mind

2) update metadatafieldregistry.csv with the schema-id:
   sed -i 's/^/[schema-id]/' metadatafieldregistry.csv
3) copy csv into dspace database
   psql> copy metadatafieldregistry 
(metadata_schema_id,element,qualifier) from 
'/path/to/metadatafieldregistry.csv' (DELIMITER('|'));

4) correct null values:
   psql> update metadatafieldregistry set (qualifier) = (NULL) where 
qualifier = '';

5) restart tomcat or reload webapp

My csv file looks as follows:

$ head metadatafieldregistry.csv
|accessRights|
|acronym|
|additionalTitle|type#AlternativeTitle
|additionalTitle|type#Subtitle
|additionalTitle|type#TranslatedTitle
|alternateIdentifier|
|description|
|enddate|
|funder|
|funder|Other

After step 2) it should look like this (assuming your schema-id is 5):
$ head metadatafieldregistry.csv
5|accessRights|
5|acronym|
...

The actual values of this file are like 'schema-id|element|qualifier' 
(see step 3) ). You may easily extend it if you also need the scope_note.


HTH,
Christian


Am 20.06.2016 um 16:11 schrieb Lewatle Johannes Phaladi:
> Dear All,
>
> Is there anyway of importing metadata schema to Dspace rather than
> manually adding them, and also adding fields without adding them one 
by one?

>
> please see attached image, i have added few metadata schemas and fields
> manually, but i would like to know if there is a way to import them
> automatically.
>
> Regards,
> Lewatle
>
> --
> 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.




-
Christian Loeschen, Dipl.-Ing. (FH)
Wiss. Mitarbeiter/Research Associate

Technische Universität Dresden
Center for Information Services and HPC (ZIH)
Distributed and Data Intensive Computing

01062 Dresden (Germany)
Phone: +49 351 463-42330
Fax :+49 351 463-37773
E-Mail: christian.loesc...@tu-dresden.de
-


--
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.


smime.p7s
Description: S/MIME Cryptographic Signature


[dspace-tech] importing metadata Schema

2016-06-20 Thread Lewatle Johannes Phaladi
Dear All,

Is there anyway of importing metadata schema to Dspace rather than manually 
adding them, and also adding fields without adding them one by one?

please see attached image, i have added few metadata schemas and fields 
manually, but i would like to know if there is a way to import them 
automatically.

Regards,
Lewatle 

-- 
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] Make items to appear in another collection

2016-06-20 Thread Lewatle Johannes Phaladi
Hi Claudia,

It really helped, thanks alot for sharing, I have mapped items.

Regards,
Lewatle 

On Monday, 20 June 2016 10:21:56 UTC+2, Claudia Jürgen wrote:
>
> Hi Lewatle, 
>
> you can map items to other collections see: 
> https://wiki.duraspace.org/display/DSDOC4x/Mapping+Items 
>
> Hope this helps 
>
> Claudia Jürgen 
>
>
> Am 20.06.2016 um 09:47 schrieb Lewatle Johannes Phaladi: 
> > Dear All, 
> > 
> > I have items loaded in a collection, I would like same items to appears 
> in 
> > another collection, please assist to have copy of collection to another 
> > collection. 
> > I am using DSpace 4 
> > 
> > Regards, 
> > Lewatle 
> > 
>
> -- 
> Claudia Juergen 
> Eldorado 
>
> Technische Universität Dortmund 
> Universitätsbibliothek 
> Vogelpothsweg 76 
> 44227 Dortmund 
>
> Tel.: +49 231-755 40 43 
> Fax: +49 231-755 40 32 
> claudia...@tu-dortmund.de  
> www.ub.tu-dortmund.de 
>
> Wichtiger Hinweis: Die Information in dieser E-Mail ist vertraulich. Sie 
> ist ausschließlich für den Adressaten bestimmt. Sollten Sie nicht der für 
> diese E-Mail bestimmte Adressat sein, unterrichten Sie bitte den Absender 
> und vernichten Sie diese Mail. Vielen Dank. 
> Unbeschadet der Korrespondenz per E-Mail, sind unsere Erklärungen 
> ausschließlich final rechtsverbindlich, wenn sie in herkömmlicher 
> Schriftform (mit eigenhändiger Unterschrift) oder durch Übermittlung eines 
> solchen Schriftstücks per Telefax erfolgen. 
>
> Important note: The information included in this e-mail is confidential. 
> It is solely intended for the recipient. If you are not the intended 
> recipient of this e-mail please contact the sender and delete this message. 
> Thank you. Without prejudice of e-mail correspondence, our statements are 
> only legally binding when they are made in the conventional written form 
> (with personal signature) or when such documents are sent by fax. 
>

-- 
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-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] Make items to appear in another collection

2016-06-20 Thread Claudia Jürgen

Hi Lewatle,

you can map items to other collections see:
https://wiki.duraspace.org/display/DSDOC4x/Mapping+Items

Hope this helps

Claudia Jürgen


Am 20.06.2016 um 09:47 schrieb Lewatle Johannes Phaladi:

Dear All,

I have items loaded in a collection, I would like same items to appears in
another collection, please assist to have copy of collection to another
collection.
I am using DSpace 4

Regards,
Lewatle



--
Claudia Juergen
Eldorado

Technische Universität Dortmund
Universitätsbibliothek
Vogelpothsweg 76
44227 Dortmund

Tel.: +49 231-755 40 43
Fax: +49 231-755 40 32
claudia.juer...@tu-dortmund.de
www.ub.tu-dortmund.de

Wichtiger Hinweis: Die Information in dieser E-Mail ist vertraulich. Sie ist 
ausschließlich für den Adressaten bestimmt. Sollten Sie nicht der für diese 
E-Mail bestimmte Adressat sein, unterrichten Sie bitte den Absender und 
vernichten Sie diese Mail. Vielen Dank.
Unbeschadet der Korrespondenz per E-Mail, sind unsere Erklärungen 
ausschließlich final rechtsverbindlich, wenn sie in herkömmlicher Schriftform 
(mit eigenhändiger Unterschrift) oder durch Übermittlung eines solchen 
Schriftstücks per Telefax erfolgen.

Important note: The information included in this e-mail is confidential. It is 
solely intended for the recipient. If you are not the intended recipient of 
this e-mail please contact the sender and delete this message. Thank you. 
Without prejudice of e-mail correspondence, our statements are only legally 
binding when they are made in the conventional written form (with personal 
signature) or when such documents are sent by fax.

--
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] Make items to appear in another collection

2016-06-20 Thread Lewatle Johannes Phaladi
Dear All,

I have items loaded in a collection, I would like same items to appears in 
another collection, please assist to have copy of collection to another 
collection.
I am using DSpace 4

Regards,
Lewatle 

-- 
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.