public XmlSchema()

in src/main/java/org/apache/ws/commons/schema/XmlSchema.java [100:131]


    public XmlSchema(String namespace, String systemId, XmlSchemaCollection parent) {
        this.parent = parent;
        attributeFormDefault = XmlSchemaForm.UNQUALIFIED;
        elementFormDefault = XmlSchemaForm.UNQUALIFIED;
        blockDefault = XmlSchemaDerivationMethod.NONE;
        finalDefault = XmlSchemaDerivationMethod.NONE;
        items = new ArrayList<XmlSchemaObject>();
        externals = new ArrayList<XmlSchemaExternal>();
        elements = new HashMap<QName, XmlSchemaElement>();
        attributeGroups = new HashMap<QName, XmlSchemaAttributeGroup>();
        attributes = new HashMap<QName, XmlSchemaAttribute>();
        groups = new HashMap<QName, XmlSchemaGroup>();
        notations = new HashMap<QName, XmlSchemaNotation>();
        schemaTypes = new HashMap<QName, XmlSchemaType>();

        logicalTargetNamespace = namespace;
        syntacticalTargetNamespace = namespace;
        if (logicalTargetNamespace == null) {
            logicalTargetNamespace = "";
        }
        if (parent != null) {
            XmlSchemaCollection.SchemaKey schemaKey =
                new XmlSchemaCollection.SchemaKey(
                                                  this.logicalTargetNamespace,
                                                  systemId);
            if (parent.containsSchema(schemaKey)) {
                throw new XmlSchemaException("Schema name conflict in collection");
            } else {
                parent.addSchema(schemaKey, this);
            }
        }
    }