Eiffel Media API
Overview Cluster Class Classes Index      Previous Next      Top Features

xml.resolver.catalog

Class XM_CATALOG_BOOTSTRAP_RESOLVER


Direct ancestors

XM_EXTERNAL_RESOLVER, XM_URI_REFERENCE_RESOLVER, KL_SHARED_EXECUTION_ENVIRONMENT, KL_SHARED_FILE_SYSTEM, KL_IMPORTED_STRING_ROUTINES, UC_SHARED_STRING_EQUALITY_TESTER

Creation

Features

Invariants

indexing

description

Resolvers used in parsing OASIS XML Catalogs

library

Gobo Eiffel XML Library

copyright

Copyright (c) 2004, Colin Adams and others

license

Eiffel Forum License v2 (see forum.txt)

date

$Date: 2005/07/13 19:49:01 $

revision

$Revision: 1.15 $

class

XM_CATALOG_BOOTSTRAP_RESOLVER

inherit

XM_EXTERNAL_RESOLVER
XM_URI_REFERENCE_RESOLVER
KL_SHARED_EXECUTION_ENVIRONMENT
KL_SHARED_FILE_SYSTEM
KL_IMPORTED_STRING_ROUTINES
UC_SHARED_STRING_EQUALITY_TESTER

create

make

-- Establish invariant.

feature -- Access

execution_environment: KL_EXECUTION_ENVIRONMENT

-- Execution environment

-- (From KL_SHARED_EXECUTION_ENVIRONMENT)

ensure
execution_environment_not_void: Result /= Void
reserved_directory_path: STRING

-- Path to directory containing latest schemas

string_: KL_STRING_ROUTINES

-- Routines that ought to be in class STRING

-- (From KL_IMPORTED_STRING_ROUTINES)

ensure
string_routines_not_void: Result /= Void
xml_catalog_dtd: STRING

-- OASIS XML Catalogs DTD

ensure
xml_catalog_dtd_not_void: Result /= Void
xml_catalog_dtd_1_0: STRING

-- OASIS XML Catalogs DTD, version 1.09

ensure
xml_catalog_dtd_not_void: Result /= Void
xml_catalog_public_id: STRING

-- Public identifier for OASIS XML Catalog files

xml_catalog_public_id_1_0: STRING

-- Public identifier for OASIS XML Catalog files, version 1.0

xml_catalog_rng: STRING

-- Path to OASIS XML Catalogs RELAX NG grammar

ensure
xml_catalog_rng_not_void: Result /= Void
xml_catalog_rng_1_0: STRING

-- Path to OASIS XML Catalogs RELAX NG grammar, version 1.0

ensure
xml_catalog_rng_not_void: Result /= Void
xml_catalog_rng_id: STRING

-- URI of the RELAX NG Grammar for OASIS XML Catalog files

xml_catalog_rng_id_1_0: STRING

-- URI of the RELAX NG Grammar for OASIS XML Catalog files, version 1.0

xml_catalog_system_id: STRING

-- System identifier for OASIS XML Catalog files

xml_catalog_system_id_1_0: STRING

-- System identifier for OASIS XML Catalog files, version 1.0

xml_catalog_xsd: STRING

-- OASIS XML Catalogs W3C schema

ensure
xml_catalog_xsd_not_void: Result /= Void
xml_catalog_xsd_1_0: STRING

-- OASIS XML Catalogs W3C schema, version 1.0

ensure
xml_catalog_xsd_not_void: Result /= Void
xml_catalog_xsd_id: STRING

-- URI of the latest W3C XML Schema for OASIS XML Catalog files

xml_catalog_xsd_id_1_0: STRING

-- URI of the W3C XML Schema for OASIS XML Catalog files, version 1.0

string_equality_tester: UC_STRING_EQUALITY_TESTER

-- String equality tester

-- (From UC_SHARED_STRING_EQUALITY_TESTER)

ensure
string_equality_tester_not_void: Result /= Void
uri_scheme_resolver: XM_URI_EXTERNAL_RESOLVER

-- Resolver used for opening streams

well_known_public_ids: DS_HASH_TABLE [STRING, STRING]

-- Map of well-known public ids to file names

well_known_system_ids: DS_HASH_TABLE [STRING, STRING]

-- Map of well-known system ids to file names

well_known_uri_references: DS_HASH_TABLE [STRING, STRING]

-- Map of well-known URI references to file names

feature -- Action(s)

resolve (a_system: STRING)

-- Resolve a system identifier to an input stream
-- on behalf of an XML parser.

-- (From XM_EXTERNAL_RESOLVER)

require
a_system_not_void: a_system /= Void
ensure
stream_open_on_success: not has_error implies last_stream.is_open_read
resolve_public (a_public: STRING; a_system: STRING)

-- Resolve a public/system identified pair to an input stream.
-- (Default implementation: resolve using system ID only.)

-- (From XM_EXTERNAL_RESOLVER)

require
a_public_not_void: a_public /= Void
a_system_not_void: a_system /= Void
ensure
stream_open_on_success: not has_error implies last_stream.is_open_read
resolve_uri (a_uri_reference: STRING)

-- Resolve a_uri_reference on behalf of an application.

-- (From XM_URI_REFERENCE_RESOLVER)

require
uri_reference_not_void: a_uri_reference /= Void

feature -- Result

has_error: BOOLEAN

-- Did the last resolution attempt succeed?

-- (From XM_EXTERNAL_RESOLVER)

has_media_type: BOOLEAN

-- Is the media type available.

-- (From XM_RESOLVER_MEDIA_TYPE)

has_uri_reference_error: BOOLEAN

-- Did the last resolution attempt succeed?

-- (From XM_URI_REFERENCE_RESOLVER)

last_error: STRING

-- Last error message.

-- (From XM_EXTERNAL_RESOLVER)

require
has_error: has_error
ensure
not_void: Result /= Void
last_media_type: UT_MEDIA_TYPE

-- Media type, if available.

-- (From XM_RESOLVER_MEDIA_TYPE)

require
has_media_type: has_media_type
ensure
result_not_void: Result /= Void
last_stream: KI_CHARACTER_INPUT_STREAM

-- Last stream initialised from external entity.

-- (From XM_EXTERNAL_RESOLVER)

require
not_error: not has_error
ensure
not_void: Result /= Void
last_system_id: UT_URI

-- System id used to actually open last_uri_reference_stream

-- (From XM_URI_REFERENCE_RESOLVER)

require
not_error: not has_uri_reference_error
ensure
not_void: Result /= Void
last_uri_reference_error: STRING

-- Last error message.

-- (From XM_URI_REFERENCE_RESOLVER)

require
ensure
not_void: Result /= Void
last_uri_reference_stream: KI_CHARACTER_INPUT_STREAM

-- Last stream initialised from URI reference.

-- (From XM_URI_REFERENCE_RESOLVER)

require
not_error: not has_uri_reference_error
ensure
not_void: Result /= Void

feature -- File systems

file_system: KL_FILE_SYSTEM

-- Underlying file system

-- (From KL_SHARED_FILE_SYSTEM)

ensure
file_system_not_void: Result /= Void
current_file_system: Result.is_current_file_system
unix_file_system: KL_UNIX_FILE_SYSTEM

-- Unix-like file system

-- (From KL_SHARED_FILE_SYSTEM)

ensure
file_system_not_void: Result /= Void
windows_backslash_only_file_system: KL_WINDOWS_FILE_SYSTEM

-- Windows-like file system which accepts only \ as
-- directory separator

-- (From KL_SHARED_FILE_SYSTEM)

ensure
file_system_not_void: Result /= Void
windows_file_system: KL_WINDOWS_FILE_SYSTEM

-- Windows-like file system which accepts both
-- \ and / as directory separator

-- (From KL_SHARED_FILE_SYSTEM)

ensure
file_system_not_void: Result /= Void

invariant


-- From ANY
reflexive_equality: standard_is_equal (Current)
reflexive_conformance: conforms_to (Current)

end