swissbib / libadmin

a ZF3 (and Skeleton-App) based module for the administration of library institutions
BSD 3-Clause "New" or "Revised" License
1 stars 1 forks source link

empty space at the end of terms in the FORMETA API #9

Closed guenterh closed 9 years ago

guenterh commented 9 years ago

question Nicolas:


Und auch noch eine zusätzliche Frage:

Warum enden alle Angaben/Strings mit einem Leerzeichen?

Das kann ich mit Metamorph (mit Regex) ziemlich einfach korrigieren. Es sollte aber (meiner Meinung nach) in den Basisdaten korrigiert werden.

Beste Grüsse Nicolas


guenterh commented 9 years ago

fixed with https://github.com/swissbib/libadmin/commit/60a621dd9f095c7b5c867f654cad6b99b68d9dc9

background for Nicolas: I created a specialized Formeta API in the libadmin component because Metafacture core doesn't provide a Json decoder module at least so far. An encoder is available


encode-json description: Serialises an object as JSON options: prettyprinting (boolean) implementation: org.culturegraph.mf.stream.converter.JsonEncoder signature: org.culturegraph.mf.framework.StreamReceiver -> java.lang.String


but no decoder.

HBZ has written an enhancement but might be for specialized purposes. So far I haven't had the time to take a look at it.

Because the generic FORMETA format is easy to use in Metafacture I implemented a quick API for libadmin. But most of the times things are not 100% correct

pronguen commented 9 years ago

Dear Günter, Would you have - by any chance - deleted all the existing white spaces in the values?

label{
        'de': 'Eidg.ArchivfürDenkmalpflege,
        Bern',
        'fr': 'Archivesfédéralesdesmonumentshistoriques,
        Bern',
        'it': 'Archiviofederaledeimonumentistorici,
        Bern',
        'en': 'FederalArchivesofhistoricmonuments,
        Bern'}
guenterh commented 9 years ago

Dear Nicolas, @pronguen have you fetched the latest sources and restarted the process (because I updated the database)

I just started the flux by myself and I get the result

    <foaf:Organization rdf:about="http://data.swissbib.ch/organisation/SNL-CHARCH01">
        <dbp:isil>CH-001053-6</dbp:isil>
        <foaf:name>Eidgenössisches Archiv für Denkmalpflege (EAD)</foaf:name>
        <rdfs:label>Eidg. Archiv für Denkmalpflege, Bern</rdfs:label>
        <foaf:homepage rdf:resource="" />
        <foaf:mbox rdf:resource="mailto:" />
        <vcard:hasAddress>
            <vcard:Address>
                <vcard:street-address>Hallwylstrasse 15</vcard:street-address>
                <vcard:postal-code>3003</vcard:postal-code>
                <vcard:locality>Bern</vcard:locality>
                <vcard:hasRegion rdf:resource="http://sws.geonames.org/2661551/" />
            </vcard:Address>
        </vcard:hasAddress>
    </foaf:Organization>

We can skype if it helps Today I'm working with MF in general

pronguen commented 9 years ago

Oh... My JSON-Viewer (https://github.com/kapilratnani/JSON-Viewer) did that to me! :-(