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

xml.resolver.catalog

Class XM_CATALOG_RESOLVER


Direct ancestors

XM_URI_EXTERNAL_RESOLVER, XM_URI_REFERENCE_RESOLVER, KL_IMPORTED_STRING_ROUTINES, KL_SHARED_FILE_SYSTEM, XM_SHARED_CATALOG_MANAGER

Creation

Features

Invariants

indexing

description

Objects that use OASIS XML Catalogs to resolve external entities and URI referencxes.

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:02 $

revision

$Revision: 1.11 $

class

XM_CATALOG_RESOLVER

inherit

XM_URI_EXTERNAL_RESOLVER
XM_URI_REFERENCE_RESOLVER
KL_IMPORTED_STRING_ROUTINES
XM_SHARED_CATALOG_MANAGER

create

make

-- Nothing to do

feature -- Access

string_: KL_STRING_ROUTINES

-- Routines that ought to be in class STRING

-- (From KL_IMPORTED_STRING_ROUTINES)

ensure
string_routines_not_void: Result /= Void
shared_catalog_manager: XM_CATALOG_MANAGER

-- Shared catalog manager

-- (From XM_SHARED_CATALOG_MANAGER)

ensure
shared_catalog_manager_not_void: Result /= Void

feature -- Status report

is_stack_empty: BOOLEAN

-- Is URI stack empty?

-- (From XM_URI_EXTERNAL_RESOLVER)

supports_registering_schemes: BOOLEAN

-- Does Current support resgitering scheme resolvers?

-- (From XM_URI_EXTERNAL_RESOLVER)

uri: UT_URI

-- Current URI.

-- (From XM_URI_EXTERNAL_RESOLVER)

require
has_stack: not is_stack_empty
ensure
result_not_void: Result /= Void

feature -- Element change

clear_uri_stack

-- Empty the stack.

-- (From XM_URI_EXTERNAL_RESOLVER)

ensure
stack_empty: is_stack_empty
push_uri (a_uri: UT_URI )

-- Push a_uri onto the stack.

-- (From XM_URI_EXTERNAL_RESOLVER)

require
uri_not_void: a_uri /= Void
register_scheme (a_scheme: XM_URI_RESOLVER)

-- Register scheme.

-- (From XM_URI_EXTERNAL_RESOLVER)

require
a_scheme_not_void: a_scheme /= Void
registering_schemes_supported: supports_registering_schemes
reset_uri_stack (a_uri: UT_URI)

-- Empty the stack then push a_uri onto the stack.

-- (From XM_URI_EXTERNAL_RESOLVER)

require
a_uri_not_void: a_uri /= Void

feature -- Actions

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_finish

-- The parser has finished with the last resolved entity.

-- (From XM_EXTERNAL_RESOLVER)

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

invariant


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

end