Package it.unimi.dsi.parser
Class HTMLFactory
- java.lang.Object
-
- it.unimi.dsi.parser.HTMLFactory
-
- All Implemented Interfaces:
ParsingFactory
@Deprecated public class HTMLFactory extends java.lang.Object implements ParsingFactory
Deprecated.This class is obsolete and kept around for backward compatibility only.A parsing factory for (X)HTML.Warning: for maximum flexibility, the methods of this factory do not perform case normalisation. If you are parsing HTML, you are invited to downcase your names before accessing
getElement(MutableString)
andgetAttribute(MutableString)
.This class is a singleton, and its only instance is accessible using the public field
INSTANCE
.The relationship between this class and
Element
/Attribute
is a bit twisted due to the need to accomodate two features:- (X)HTML interned objects must be accessible directly (see, e.g.,
Element.A
); - (X)HTML interned objects must be put into suitable name-to-object maps.
To this purpose, this class exports packagewise some static factory methods that create
Element
s andAttribute
s and register them locally. The static initialisation code inElement
andAttribute
creates elements such asElement.A
using the abovementioned factory methods.
-
-
Field Summary
Fields Modifier and Type Field Description static HTMLFactory
INSTANCE
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Attribute
getAttribute(MutableString name)
Deprecated.Returns theAttribute
associated to a name.Element
getElement(MutableString name)
Deprecated.Returns theElement
associated to a name.Entity
getEntity(MutableString name)
Deprecated.Returns theEntity
associated to a name.
-
-
-
Field Detail
-
INSTANCE
public static final HTMLFactory INSTANCE
Deprecated.
-
-
Method Detail
-
getElement
public Element getElement(MutableString name)
Deprecated.Description copied from interface:ParsingFactory
Returns theElement
associated to a name.- Specified by:
getElement
in interfaceParsingFactory
- Parameters:
name
- the name of an element type.- Returns:
- the corresponding interned
Element
object.
-
getAttribute
public Attribute getAttribute(MutableString name)
Deprecated.Description copied from interface:ParsingFactory
Returns theAttribute
associated to a name.- Specified by:
getAttribute
in interfaceParsingFactory
- Parameters:
name
- the name of an attribute.- Returns:
- the corresponding interned
Attribute
object.
-
getEntity
public Entity getEntity(MutableString name)
Deprecated.Description copied from interface:ParsingFactory
Returns theEntity
associated to a name.- Specified by:
getEntity
in interfaceParsingFactory
- Parameters:
name
- the name of an entity.- Returns:
- the corresponding interned
Entity
object.
-
-