XML Alto file wrapper to crn::Document.
More...
#include <CRNAltoWrapper.h>
|
static std::unique_ptr
< AltoWrapper > | NewFromDir (const crn::Path &directory, const crn::Path &documentname, const crn::Path &imagedirectory="", crn::Progress *prog=nullptr, bool throw_exceptions=true) |
| Creates a wrapper from a directory containing Altos. More...
|
|
static std::unique_ptr
< AltoWrapper > | NewFromDirs (const crn::Path &image_directory, const crn::Path &xml_directory, const crn::Path &documentname, crn::Progress *prog=nullptr, bool throw_exceptions=true) |
| Creates a wrapper from two directories containing images and Altos with the same base names. More...
|
|
static std::unique_ptr
< AltoWrapper > | NewFromDocument (const crn::SDocument &document, bool create_altos=false, bool throw_exceptions=true) |
| Creates a wrapper from a crn::Document that was created by Nimrod. More...
|
|
static std::unique_ptr
< AltoWrapper > | NewFromDocument (const crn::Path &documentname, bool create_altos=false, bool throw_exceptions=true) |
| Creates a wrapper from a crn::Document that was created by Nimrod. More...
|
|
template<typename Iter > |
static std::unique_ptr
< AltoWrapper > | NewFromImages (Iter begin_, Iter end_, const crn::Path &documentname, bool throw_exceptions=true) |
| Creates a wrapper from a list of images. More...
|
|
template<typename Iter > |
static std::unique_ptr
< AltoWrapper > | NewFromList (Iter begin_, Iter end_, const crn::Path &documentname, crn::Progress *prog=nullptr, bool throw_exceptions=true) |
| Creates a wrapper from list of images and Alto paths (such as a map or any container<pair>) More...
|
|
static const String & | AltoPathKey () |
|
static const String & | PageKey () |
|
static const String & | SpaceKey () |
|
static const String & | TextBlockKey () |
|
static const String & | IllustrationKey () |
|
static const String & | GraphicalElementKey () |
|
static const String & | ComposedBlockKey () |
|
static const String & | TextLineKey () |
|
static const String & | WordKey () |
|
XML Alto file wrapper to crn::Document.
A class that associates a crn::Document to XML Alto files
- Author
- Yann LEYDIER
Definition at line 168 of file CRNAltoWrapper.h.
crn::xml::AltoWrapper::AltoWrapper |
( |
const AltoWrapper & |
| ) |
|
|
delete |
crn::xml::AltoWrapper::~AltoWrapper |
( |
| ) |
|
|
inline |
const String AltoWrapper::AddView |
( |
const Path & |
imagename, |
|
|
const Path & |
altoname = "" |
|
) |
| |
Adds a view to the document.
Adds a view to the document
- Exceptions
-
- Parameters
-
[in] | imagename | the image to add |
[in] | altoname | the path to the associated alto or "" to create a new alto |
- Returns
- the id of the new view
Definition at line 399 of file CRNAltoWrapper.cpp.
const String & AltoWrapper::AltoPathKey |
( |
| ) |
|
|
static |
const String & AltoWrapper::ComposedBlockKey |
( |
| ) |
|
|
static |
SDocument crn::xml::AltoWrapper::GetDocument |
( |
| ) |
|
|
inline |
SCDocument crn::xml::AltoWrapper::GetDocument |
( |
| ) |
const |
|
inline |
size_t crn::xml::AltoWrapper::GetNbViews |
( |
| ) |
const |
|
inline |
Gets a Page by path.
Gets a Page by path
- Exceptions
-
- Parameters
-
[in] | p | the path to the page |
- Returns
- a wrapper on the page
Definition at line 726 of file CRNAltoWrapper.cpp.
Gets a Space by path.
Gets a Space by path
- Exceptions
-
- Parameters
-
[in] | p | the path to the space |
- Returns
- a wrapper on the space
Definition at line 710 of file CRNAltoWrapper.cpp.
Gets a view by id.
Gets a view by id
- Exceptions
-
- Parameters
-
[in] | view_id | the id of the view to get |
- Returns
- a wrapper on the view and its alto
Definition at line 591 of file CRNAltoWrapper.cpp.
Gets a view by index.
Gets a view by id
- Exceptions
-
- Parameters
-
[in] | index | the index of the view to get |
- Returns
- a wrapper on the view and its alto
Definition at line 607 of file CRNAltoWrapper.cpp.
std::vector<String> crn::xml::AltoWrapper::GetViewIds |
( |
| ) |
const |
|
inline |
Gets the list of the view ids of the document.
Definition at line 735 of file CRNAltoWrapper.h.
Gets a Word by path.
Gets a Word by path
- Exceptions
-
- Parameters
-
[in] | p | the path to the word |
- Returns
- a wrapper on the word
Definition at line 662 of file CRNAltoWrapper.cpp.
const String & AltoWrapper::GraphicalElementKey |
( |
| ) |
|
|
static |
const String & AltoWrapper::IllustrationKey |
( |
| ) |
|
|
static |
Creates a wrapper from a directory containing Altos.
Creates a wrapper from a directory containing Altos
- Exceptions
-
- Parameters
-
[in] | directory | the path to the XML Alto files |
[in] | documentname | the file name of the crn::Document to create |
[in] | imagedirectory | [Optional] the path to the images if it's different from the XML path |
[in] | prog | a progress object |
[in] | throw_exceptions | shall an exception be thrown on character encoding conversion error? |
- Returns
- a new Alto Wrapper
Definition at line 194 of file CRNAltoWrapper.cpp.
Creates a wrapper from two directories containing images and Altos with the same base names.
Creates a wrapper from two directories containing images and Altos with the same base names
- Exceptions
-
- Parameters
-
[in] | image_directory | the path to the images |
[in] | xml_directory | the path to the alto files |
[in] | documentname | the file name of the crn::Document to create |
[in] | prog | a progress object |
[in] | throw_exceptions | shall an exception be thrown on character encoding conversion error? |
- Returns
- a new Alto Wrapper
Definition at line 255 of file CRNAltoWrapper.cpp.
std::unique_ptr< AltoWrapper > AltoWrapper::NewFromDocument |
( |
const crn::SDocument & |
document, |
|
|
bool |
create_altos = false , |
|
|
bool |
throw_exceptions = true |
|
) |
| |
|
static |
Creates a wrapper from a crn::Document that was created by Nimrod.
Creates a wrapper from a crn::Document that was created by Nimrod
- Exceptions
-
- Parameters
-
[in] | document | the indexed document |
[in] | create_altos | shall empty altos be created if the needed? |
[in] | throw_exceptions | shall an exception be thrown on character encoding conversion error? |
- Returns
- a new Alto Wrapper
Definition at line 311 of file CRNAltoWrapper.cpp.
std::unique_ptr< AltoWrapper > AltoWrapper::NewFromDocument |
( |
const crn::Path & |
documentname, |
|
|
bool |
create_altos = false , |
|
|
bool |
throw_exceptions = true |
|
) |
| |
|
static |
Creates a wrapper from a crn::Document that was created by Nimrod.
Creates a wrapper from a crn::Document that was created by Nimrod
- Exceptions
-
- Parameters
-
[in] | documentname | the name of the indexed document |
[in] | create_altos | shall empty altos be created if the needed? |
[in] | throw_exceptions | shall an exception be thrown on character encoding conversion error? |
- Returns
- a new Alto Wrapper
Definition at line 336 of file CRNAltoWrapper.cpp.
template<typename Iter >
static std::unique_ptr<AltoWrapper> crn::xml::AltoWrapper::NewFromImages |
( |
Iter |
begin_, |
|
|
Iter |
end_, |
|
|
const crn::Path & |
documentname, |
|
|
bool |
throw_exceptions = true |
|
) |
| |
|
inlinestatic |
Creates a wrapper from a list of images.
- Parameters
-
[in] | begin_ | the first element of the list |
[in] | end_ | the end of the list |
[in] | documentname | the path of the crn::Document to create |
[in] | throw_exceptions | shall an exception be thrown on character encoding conversion error? |
Definition at line 191 of file CRNAltoWrapper.h.
template<typename Iter >
static std::unique_ptr<AltoWrapper> crn::xml::AltoWrapper::NewFromList |
( |
Iter |
begin_, |
|
|
Iter |
end_, |
|
|
const crn::Path & |
documentname, |
|
|
crn::Progress * |
prog = nullptr , |
|
|
bool |
throw_exceptions = true |
|
) |
| |
|
inlinestatic |
Creates a wrapper from list of images and Alto paths (such as a map or any container<pair>)
- Parameters
-
[in] | begin_ | the first element of the list |
[in] | end_ | the end of the list |
[in] | documentname | the path of the crn::Document to create |
[in] | prog | a progress object |
[in] | throw_exceptions | shall an exception be thrown on character encoding conversion error? |
Definition at line 206 of file CRNAltoWrapper.h.
const String & AltoWrapper::PageKey |
( |
| ) |
|
|
static |
void AltoWrapper::ResizeSpace |
( |
const SpacePath & |
p, |
|
|
const crn::Rect & |
r, |
|
|
bool |
erase_oob |
|
) |
| |
Changes the size of a space and all its parents if needed.
Changes the size of a space and all its parents if needed
- Exceptions
-
- Parameters
-
[in] | p | the path to the space |
[in] | r | the new bounding box |
[in] | erase_oob | shall the out of bounds contained elements be erased? |
Definition at line 772 of file CRNAltoWrapper.cpp.
void AltoWrapper::ResizeTextBlock |
( |
const BlockPath & |
p, |
|
|
const crn::Rect & |
r, |
|
|
bool |
erase_oob |
|
) |
| |
Changes the size of a text block and all its parents if needed.
Changes the size of a text block and all its parents if needed
- Exceptions
-
- Parameters
-
[in] | p | the path to the block |
[in] | r | the new bounding box |
[in] | erase_oob | shall the out of bounds contained elements be erased? |
Definition at line 760 of file CRNAltoWrapper.cpp.
Changes the size of a line and all its parents if needed.
Changes the size of a text line and all its parents if needed
- Exceptions
-
- Parameters
-
[in] | p | the path to the word |
[in] | r | the new bounding box |
[in] | erase_oob | shall the out of bounds contained elements be erased? |
Definition at line 748 of file CRNAltoWrapper.cpp.
Changes the size of a word and all its parents if needed.
Changes the size of a word and all its parents if needed
- Exceptions
-
- Parameters
-
[in] | p | the path to the word |
[in] | r | the new bounding box |
Definition at line 736 of file CRNAltoWrapper.cpp.
const String & AltoWrapper::SpaceKey |
( |
| ) |
|
|
static |
void AltoWrapper::Synchronize |
( |
bool |
reset = false | ) |
|
Creates CRNBlocks and ids where there is none.
Creates ids where there is none and builds the CRNBlock trees
- Parameters
-
[in] | reset | shall the blocks be rebuild |
Definition at line 427 of file CRNAltoWrapper.cpp.
const String & AltoWrapper::TextBlockKey |
( |
| ) |
|
|
static |
const String & AltoWrapper::TextLineKey |
( |
| ) |
|
|
static |
const String & AltoWrapper::WordKey |
( |
| ) |
|
|
static |
The documentation for this class was generated from the following files: