Skip to content

Commit

Permalink
#3: Documentation updated. Fixed #23.
Browse files Browse the repository at this point in the history
  • Loading branch information
Bystroushaak committed Mar 18, 2015
1 parent b8d38f1 commit 5ee5a1a
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 156 deletions.
Binary file modified docs/_static/relations.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
87 changes: 19 additions & 68 deletions docs/_static/relations.uml
Original file line number Diff line number Diff line change
@@ -1,32 +1,17 @@
package xslt {
class mods_nonp_single as "MARC21slim2MODS3-4-NDK.xsl" <<X, Green>> {
Converts Aleph's non-periodical
non-multi-monograph metadata to
MODS.
package marcxml2mods {
class xslt_transformer as "xslt_transformer.py" <<M, Green>> {
Used to transform Aleph's metadata to MODS.
}
class mods_nonp_multi as "MARC21toMultiMonographTitle.xsl" <<X, Green>> {
Converts Aleph's non-periodical
multi-monograph metadata to MODS.
}
class mods_per as "MARC21toPeriodicalTitle.xsl" <<X, Green>> {
Converts Aleph's periodical
metadata to MODS.
}
}

class xslt_transformer as "xslt_transformer.py" <<M, Red>> {
Used to transform Aleph's metadata to MODS.
package mods_postprocessor {
class shared_funcs as "shared_funcs.py" <<M, Green>> {
Functions shared in mods_postprocessor/ module.

oai_to_xml(marc_oai)
transform(xml, template)
transform_to_mods(marc_xml, uuid)
remove_hairs()
}
}
}

mods_nonp_single -d-> xslt_transformer: reads
mods_nonp_multi .d.> xslt_transformer: reads
mods_per .d.> xslt_transformer: reads

class fn_composers as "fn_composers.py" <<M, Red>> {
class fn_composers as "fn_composers.py" <<M, Green>> {
Dynamically creates filenames.

original_fn(book_id, ebook_fn)
Expand All @@ -36,53 +21,22 @@ class fn_composers as "fn_composers.py" <<M, Red>> {
info_fn(book_id)
}

class checksum_generator as "checksum_generator.py" <<M, Red>> {
class checksum_generator as "checksum_generator.py" <<M, Green>> {
Generates checksums for all files in SIP
package.

generate_checksums(directory, blacklist)
generate_hashfile(directory, blacklist)
}

package mods_postprocessor {
class mp_init as "_​_init__.py" <<M, Red>> {
Used to fix data after XSLT templates.

}
class shared_funcs as "shared_funcs.py" <<M, Red>> {
Functions shared in mods_postprocessor/ module.

remove_hairs(inp, hairs)
insert_tag(tag, before, root)
transform_content(tags, content_transformer)
}
class monograph as "monograph.py" <<M, Red>> {
Functions used to postprocess Monograph
MODS XML.

get_mods_tag(dom)
add_missing_xml_attributes(dom, counter)
fix_invalid_type_parameter(dom)
add_uuid(dom, uuid)
add_marccountry_tag(dom)
add_genre(dom)
remove_hairs_from_tags(dom)
postprocess_monograph(mods, uuid, counter)
}
}

shared_funcs -d-> monograph: uses
monograph -d-> mp_init: is imported


class settings as "settings.py" <<M, Red>> {
class settings as "settings.py" <<M, Green>> {
Project settings.

get_all_constants()
substitute_globals(config_dict)
}

class structures as "structures.py" <<M, Red>> {
class structures as "structures.py" <<M, Green>> {
AMQP communication structures.
---
class ExportRequest
Expand All @@ -91,27 +45,27 @@ class structures as "structures.py" <<M, Red>> {
class TrackingResult
}

class info_composer as "info_composer.py" <<M, Red>> {
class info_composer as "info_composer.py" <<M, Green>> {
Create the info.xml file.

compose_info(root_dir, files, hash_fn, aleph_record)
}

class ltp as "ltp.py" <<M, Red>> {
class ltp as "ltp.py" <<M, Green>> {
Creates SIP package for LTP.

create_ltp_package(aleph_record, book_id, ebook_fn, b64_data)
}

class init as "_​_init__.py" <<M, Red>> {
class init as "_​_init__.py" <<M, Green>> {
Handles AMQP communication.

reactToAMQPMessage(message, send_back)
}

shared_funcs -d----> info_composer
shared_funcs -d----> info_composer: uses remove_hairs()
xslt_transformer <--d-> ltp: transforms MARC XML to MODS

xslt_transformer --d-> ltp
settings -l-> ltp

fn_composers -d-> ltp
Expand All @@ -120,7 +74,4 @@ checksum_generator -d-> ltp

ltp -d-> init
structures -l-> init
settings -d-> init

mp_init -r-> xslt_transformer: fixes
xslt_transformer --> mp_init
settings -d-> init
77 changes: 19 additions & 58 deletions docs/_static/template_relations.uml
Original file line number Diff line number Diff line change
@@ -1,98 +1,62 @@
package xslt {
class mods_nonp_single as "MARC21slim2MODS3-4-NDK.xsl" <<X, Green>> {
Converts Aleph's non-periodical
non-multi-monograph metadata to
MODS.
package marcxml2mods {
class xslt_transformer as "xslt_transformer.py" <<M, Green>> {
Used to transform Aleph's metadata to MODS.
}
class mods_nonp_multi as "MARC21toMultiMonographTitle.xsl" <<X, Green>> {
Converts Aleph's non-periodical
multi-monograph metadata to MODS.
}
class mods_per as "MARC21toPeriodicalTitle.xsl" <<X, Green>> {
Converts Aleph's periodical
metadata to MODS.
}
}
package mods_postprocessor {
class shared_funcs as "shared_funcs.py" <<M, Green>> {
Functions shared in mods_postprocessor/ module.

class xslt_transformer as "xslt_transformer.py" <<M, Red>> {
Used to transform Aleph's metadata to MODS.

$templater:module:xslt_transformer
remove_hairs()
}
}
}

mods_nonp_single -d-> xslt_transformer: reads
mods_nonp_multi .d.> xslt_transformer: reads
mods_per .d.> xslt_transformer: reads

class fn_composers as "fn_composers.py" <<M, Red>> {
class fn_composers as "fn_composers.py" <<M, Green>> {
Dynamically creates filenames.

$templater:module:fn_composers
}

class checksum_generator as "checksum_generator.py" <<M, Red>> {
class checksum_generator as "checksum_generator.py" <<M, Green>> {
Generates checksums for all files in SIP
package.

$templater:module:checksum_generator
}

package mods_postprocessor {
class mp_init as "_​_init__.py" <<M, Red>> {
Used to fix data after XSLT templates.

$templater:module:mods_postprocessor/__init__
}
class shared_funcs as "shared_funcs.py" <<M, Red>> {
Functions shared in mods_postprocessor/ module.

$templater:module:mods_postprocessor/shared_funcs
}
class monograph as "monograph.py" <<M, Red>> {
Functions used to postprocess Monograph
MODS XML.

$templater:module:mods_postprocessor/monograph
}
}

shared_funcs -d-> monograph: uses
monograph -d-> mp_init: is imported


class settings as "settings.py" <<M, Red>> {
class settings as "settings.py" <<M, Green>> {
Project settings.

$templater:module:settings
}

class structures as "structures.py" <<M, Red>> {
class structures as "structures.py" <<M, Green>> {
AMQP communication structures.
---
$templater:module:structures
}

class info_composer as "info_composer.py" <<M, Red>> {
class info_composer as "info_composer.py" <<M, Green>> {
Create the info.xml file.

$templater:module:info_composer
}

class ltp as "ltp.py" <<M, Red>> {
class ltp as "ltp.py" <<M, Green>> {
Creates SIP package for LTP.

$templater:module:ltp
}

class init as "_​_init__.py" <<M, Red>> {
class init as "_​_init__.py" <<M, Green>> {
Handles AMQP communication.

$templater:module:__init__
}

shared_funcs -d----> info_composer
shared_funcs -d----> info_composer: uses remove_hairs()
xslt_transformer <--d-> ltp: transforms MARC XML to MODS

xslt_transformer --d-> ltp
settings -l-> ltp

fn_composers -d-> ltp
Expand All @@ -101,7 +65,4 @@ checksum_generator -d-> ltp

ltp -d-> init
structures -l-> init
settings -d-> init

mp_init -r-> xslt_transformer: fixes
xslt_transformer --> mp_init
settings -d-> init
14 changes: 0 additions & 14 deletions docs/api/ltp.mods_postprocessor.rst

This file was deleted.

14 changes: 0 additions & 14 deletions docs/api/ltp.xslt_transformer.rst

This file was deleted.

8 changes: 6 additions & 2 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ edeposit.amqp.ltp
This project provides AMQP bindings for LTP (Long Time Preservation) system
used in Czech National Library.

The LTP is basically archive for digital documents for long time periods
(hundred of years).

Access to this archive is restricted, so if you wish to use this module for
yourself, you will need to negotiate access for yourself.

API
---
.. toctree::
Expand All @@ -16,9 +22,7 @@ API

/api/ltp.ltp
/api/ltp.fn_composers
/api/ltp.xslt_transformer
/api/ltp.checksum_generator
/api/ltp.mods_postprocessor

.. toctree::
:maxdepth: 1
Expand Down

0 comments on commit 5ee5a1a

Please sign in to comment.