ome-xml
5.2.0
|
OME-XML Data Model. More...
Namespaces | |
meta | |
Metadata storage and retrieval. | |
model | |
Model objects. | |
Classes | |
class | OMEEntityResolver |
Entity resolver for the OME schemas. More... | |
class | OMETransformResolver |
Discover and query available OME-XML transforms. More... | |
class | OMETransformResolverImpl |
Private implementation details of OMETransformResolver. More... | |
Functions | |
ome::common::xml::dom::Document | createDocument (const boost::filesystem::path &file, const ome::common::xml::dom::ParseParameters ¶ms=ome::common::xml::dom::ParseParameters()) |
Construct a Document from the content of a file. More... | |
ome::common::xml::dom::Document | createDocument (const std::string &text, const ome::common::xml::dom::ParseParameters ¶ms=ome::common::xml::dom::ParseParameters(), const std::string &id="membuf") |
Construct a Document from the content of a string. More... | |
ome::common::xml::dom::Document | createDocument (std::istream &stream, const ome::common::xml::dom::ParseParameters ¶ms=ome::common::xml::dom::ParseParameters(), const std::string &id="streambuf") |
Construct a Document from the content of an input stream. More... | |
void | register_module_paths () |
Register the OME-XML module paths with OME-Common. More... | |
std::string | getModelVersion (ome::common::xml::dom::Document &document) |
Determine the model schema version used in an XML document. More... | |
template<typename Input , typename Output > | |
void | transform (const std::string &target_schema, const Input &input, Output &output, ome::common::xml::EntityResolver &entity_resolver, OMETransformResolver &transform_resolver) |
Transform OME-XML to a different model schema version. More... | |
template<typename Input , typename Output > | |
void | transform (const std::string &target_schema, const Input &input, Output &output, ome::common::xml::EntityResolver &entity_resolver) |
Transform OME-XML to a different model schema version. More... | |
template<class charT , class traits > | |
std::basic_ostream< charT, traits > & | operator<< (std::basic_ostream< charT, traits > &os, const OMETransformResolver::Quality &quality) |
Output OMETransformResolver::Quality to output stream. More... | |
const std::string & | model_version () |
Get the current OME-XML model version. More... | |
OME-XML Data Model.
ome::common::xml::dom::Document ome::xml::createDocument | ( | const boost::filesystem::path & | file, |
const ome::common::xml::dom::ParseParameters & | params = ome::common::xml::dom::ParseParameters() |
||
) |
Construct a Document from the content of a file.
This is the same as ome::common::xml::dom::createDocument(const boost::filesystem::path&, EntityResolver&, const ParseParameters&) but uses OMEEntityResolver to resolve all OME schemas from the local catalog.
file | the file to read. |
params | XML parser parameters. |
References ome::common::xml::dom::createDocument().
Referenced by ome::xml::model::XMLAnnotation::asXMLElementInternal().
ome::common::xml::dom::Document ome::xml::createDocument | ( | const std::string & | text, |
const ome::common::xml::dom::ParseParameters & | params = ome::common::xml::dom::ParseParameters() , |
||
const std::string & | id = "membuf" |
||
) |
Construct a Document from the content of a string.
This is the same as ome::common::xml::dom::createDocument(const std::string&, EntityResolver&, const ParseParameters&, const std::string&) but uses OMEEntityResolver to resolve all OME schemas from the local catalog.
text | the string to use. |
params | XML parser parameters. |
id | document filename (for error reporting only). |
References ome::common::xml::dom::createDocument().
ome::common::xml::dom::Document ome::xml::createDocument | ( | std::istream & | stream, |
const ome::common::xml::dom::ParseParameters & | params = ome::common::xml::dom::ParseParameters() , |
||
const std::string & | id = "streambuf" |
||
) |
Construct a Document from the content of an input stream.
This is the same as ome::common::xml::dom::createDocument(std::istream&, EntityResolver&, const ParseParameters&, const std::string&) but uses OMEEntityResolver to resolve all OME schemas from the local catalog.
stream | the stream to read. |
params | XML parser parameters. |
id | document filename (for error reporting only). |
References ome::common::xml::dom::createDocument().
|
inline |
Determine the model schema version used in an XML document.
document | the document to check. This may be any supported input type (file path, string, stream). |
References ome::common::xml::dom::Document::getDocumentElement().
Referenced by transform().
const std::string & ome::xml::model_version | ( | ) |
Get the current OME-XML model version.
Note that unlike the OME_XML_MODEL_VERSION macro, which is the version of the model which was built against, this gets the version of the model of the library linked against (which might differ).
|
inline |
Output OMETransformResolver::Quality to output stream.
os | the output stream. |
quality | the OMETransformResolver::Quality to output. |
References ome::xml::OMETransformResolver::quality_name().
void ome::xml::register_module_paths | ( | ) |
Register the OME-XML module paths with OME-Common.
This function forces path registration.
References register_module_paths(), and ome::common::register_module_paths().
Referenced by ome::xml::OMEEntityResolver::OMEEntityResolver(), and ome::xml::OMETransformResolver::OMETransformResolver().
void ome::xml::transform | ( | const std::string & | target_schema, |
const Input & | input, | ||
Output & | output, | ||
ome::common::xml::EntityResolver & | entity_resolver, | ||
OMETransformResolver & | transform_resolver | ||
) |
Transform OME-XML to a different model schema version.
target_schema | the schema version to transform the input to. |
input | the source XML. This may be any supported input type (file path, string, stream). |
output | the destination for the transformed XML. This may be any supported output type (file path, string, stream). |
entity_resolver | the entity resolver to use for validation. |
transform_resolver | the transform resolver to use for determining the transform sequence between schema versions. |
References ome::common::xml::dom::createDocument(), getModelVersion(), ome::common::xsl::Transformer::setEntityResolver(), ome::common::xsl::Transformer::setUseValidation(), ome::common::xsl::Transformer::transform(), ome::xml::OMETransformResolver::transform_order(), and ome::common::xml::dom::writeDocument().
Referenced by ome::xml::OMETransformResolverImpl::fill_graph(), ome::xml::model::Shape::setTransform(), transform(), ome::xml::OMETransformResolver::transform_order(), and ome::xml::meta::MetadataStore::~MetadataStore().
void ome::xml::transform | ( | const std::string & | target_schema, |
const Input & | input, | ||
Output & | output, | ||
ome::common::xml::EntityResolver & | entity_resolver | ||
) |
Transform OME-XML to a different model schema version.
An OMETransformResolver will be created on the fly; use the function taking an OMETransformResolver as a parameter if applying multiple transforms to avoid the overhead of scanning the filesystem for available transforms multiple times. This function is intended only for convenience when applying a single transform.
target_schema | the schema version to transform the input to. |
input | the source XML. This may be any supported input type (file path, string, stream). |
output | the destination for the transformed XML. This may be any supported output type (file path, string, stream). |
entity_resolver | the entity resolver to use for validation. |
References transform().