summaryrefslogtreecommitdiff
path: root/gnu/xml/validation/xmlschema/XMLSchemaValidatorHandler.java
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/xml/validation/xmlschema/XMLSchemaValidatorHandler.java')
-rw-r--r--gnu/xml/validation/xmlschema/XMLSchemaValidatorHandler.java21
1 files changed, 9 insertions, 12 deletions
diff --git a/gnu/xml/validation/xmlschema/XMLSchemaValidatorHandler.java b/gnu/xml/validation/xmlschema/XMLSchemaValidatorHandler.java
index 6c4f1f392..1991432a2 100644
--- a/gnu/xml/validation/xmlschema/XMLSchemaValidatorHandler.java
+++ b/gnu/xml/validation/xmlschema/XMLSchemaValidatorHandler.java
@@ -75,16 +75,16 @@ final class XMLSchemaValidatorHandler
ContentHandler contentHandler;
ErrorHandler errorHandler;
LSResourceResolver resourceResolver;
- final LinkedList context; // element context
- final ArrayList attributes; // attribute context;
+ final LinkedList<XMLSchemaElementTypeInfo> context; // element context
+ final ArrayList<XMLSchemaAttributeTypeInfo> attributes; // attribute context;
XMLSchemaValidatorHandler(XMLSchema schema)
{
this.schema = schema;
typeInfoProvider = new XMLSchemaTypeInfoProvider(this);
namespaceSupport = new NamespaceSupport();
- context = new LinkedList();
- attributes = new ArrayList();
+ context = new LinkedList<XMLSchemaElementTypeInfo>();
+ attributes = new ArrayList<XMLSchemaAttributeTypeInfo>();
final String ns = XMLConstants.W3C_XML_SCHEMA_NS_URI;
typeLibrary = new DatatypeLibraryLoader().createDatatypeLibrary(ns);
}
@@ -126,25 +126,23 @@ final class XMLSchemaValidatorHandler
TypeInfo getElementTypeInfo()
{
- return (XMLSchemaElementTypeInfo) context.getFirst();
+ return context.getFirst();
}
TypeInfo getAttributeTypeInfo(int index)
{
- return (XMLSchemaAttributeTypeInfo) attributes.get(index);
+ return attributes.get(index);
}
boolean isIdAttribute(int index)
{
- XMLSchemaAttributeTypeInfo typeInfo =
- (XMLSchemaAttributeTypeInfo) attributes.get(index);
+ XMLSchemaAttributeTypeInfo typeInfo = attributes.get(index);
return typeInfo.id;
}
boolean isSpecified(int index)
{
- XMLSchemaAttributeTypeInfo typeInfo =
- (XMLSchemaAttributeTypeInfo) attributes.get(index);
+ XMLSchemaAttributeTypeInfo typeInfo = attributes.get(index);
return typeInfo.specified;
}
@@ -203,8 +201,7 @@ final class XMLSchemaValidatorHandler
{
namespaceSupport.pushContext();
QName name = new QName(uri, localName);
- ElementDeclaration decl =
- (ElementDeclaration) schema.elementDeclarations.get(name);
+ ElementDeclaration decl = schema.elementDeclarations.get(name);
// Validation Rule: Element Locally Valid (Element)
String xsiType =
atts.getValue(XMLConstants.W3C_XML_SCHEMA_INSTANCE_NS_URI, "type");