public interface ParsingFactory
The BulletParser
needs a way to turn
a name (for an element type, attribute, or entity) into a corresponding object
of type Element
, Attribute
or Entity
, respectively. The returned element must
be an interned, unique representation.
For instance, the standard factory for
HTML parsing has ready-made interned versions of all names in the (X)HTML specification,
and returns them upon request, but other policies are possible. For instance, instances of
WellFormedXmlFactory
intern every seen name, without reference to a data type (except
for entities, in which case the HTML set is used).
The idea of factoring out the creation of interned counterparts of SGML/XML syntactical objects is due to Fabien Campagne.
Modifier and Type | Method and Description |
---|---|
Attribute |
getAttribute(MutableString name)
Returns the
Attribute associated
to a name. |
Element |
getElement(MutableString name)
Returns the
Element associated
to a name. |
Entity |
getEntity(MutableString name)
Returns the
Entity associated
to a name. |
Element getElement(MutableString name)
Element
associated
to a name.name
- the name of an element type.Element
object.Attribute getAttribute(MutableString name)
Attribute
associated
to a name.name
- the name of an attribute.Attribute
object.Entity getEntity(MutableString name)
Entity
associated
to a name.name
- the name of an entity.Entity
object.Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.