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

xml.resolver.resolver_interface

Class XM_URI_EXTERNAL_RESOLVER


Direct ancestors

XM_EXTERNAL_RESOLVER, XM_RESOLVER_MEDIA_TYPE

Known direct descendants

XM_SIMPLE_URI_EXTERNAL_RESOLVER, XM_CATALOG_RESOLVER

Features

Invariants

indexing

description

Resolvers that maintain a URI stack

library

Gobo Eiffel XML Library

copyright

Copyright (c) 2004, Colin Adams and others

license

Eiffel Forum License v2 (see forum.txt)

date

$Date: 2005/04/10 12:39:55 $

revision

$Revision: 1.6 $

deferred class

XM_URI_EXTERNAL_RESOLVER

inherit

XM_EXTERNAL_RESOLVER
XM_RESOLVER_MEDIA_TYPE

feature -- Status report

is_stack_empty: BOOLEAN

-- Is URI stack empty?

supports_registering_schemes: BOOLEAN

-- Does Current support registering scheme resolvers?

uri: UT_URI

-- Current URI.

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

feature -- Element change

clear_uri_stack

-- Clear uri stack.

ensure
stack_empty: is_stack_empty
push_uri (a_uri: UT_URI )

-- Push a_uri onto the stack.

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

-- Register scheme.

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.

require
a_uri_not_void: a_uri /= Void

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_finish

-- The parser has finished with the last resolved entity.
-- The previously resolved entity becomes the last resolved one.
-- Note: last_stream is not required to be restored accordingly.

-- (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

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)

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

invariant


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

end