gpt4 book ai didi

org.apache.ws.commons.schema.XmlSchemaException.()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-23 16:29:05 26 4
gpt4 key购买 nike

本文整理了Java中org.apache.ws.commons.schema.XmlSchemaException.<init>()方法的一些代码示例,展示了XmlSchemaException.<init>()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XmlSchemaException.<init>()方法的具体详情如下:
包路径:org.apache.ws.commons.schema.XmlSchemaException
类名称:XmlSchemaException
方法名:<init>

XmlSchemaException.<init>介绍

[英]Creates new XmlSchemaException
[中]创建新的XmlSchemaException

代码示例

代码示例来源:origin: org.apache.ws/com.springsource.org.apache.ws.commons.schema

XmlSchema read(InputSource inputSource, ValidationEventHandler veh,
    TargetNamespaceValidator namespaceValidator) {
  try {
    DocumentBuilderFactory docFac = DocumentBuilderFactory.newInstance();
    docFac.setNamespaceAware(true);
    DocumentBuilder builder = docFac.newDocumentBuilder();
    Document doc = builder.parse(inputSource);
    return read(doc, inputSource.getSystemId(), veh, namespaceValidator);
  } catch (ParserConfigurationException e) {
    throw new XmlSchemaException(e.getMessage());
  } catch (IOException e) {
    throw new XmlSchemaException(e.getMessage());
  } catch (SAXException e) {
    throw new XmlSchemaException(e.getMessage());
  }
}

代码示例来源:origin: org.apache.ws.commons.schema/XmlSchema

XmlSchema read(final InputSource inputSource, ValidationEventHandler veh,
    TargetNamespaceValidator namespaceValidator) {
  try {
    DocumentBuilderFactory docFac = DocumentBuilderFactory.newInstance();
    docFac.setNamespaceAware(true);
    final DocumentBuilder builder = docFac.newDocumentBuilder();
     /* specify ER on doc builder */ 
    if (entityResolver != null) builder.setEntityResolver(entityResolver); 
    Document doc = null;
    doc = parse_doPriv(inputSource, builder, doc);
    return read(doc, inputSource.getSystemId(), veh, namespaceValidator);
  } catch (ParserConfigurationException e) {
    throw new XmlSchemaException(e.getMessage());
  } catch (IOException e) {
    throw new XmlSchemaException(e.getMessage());
  } catch (SAXException e) {
    throw new XmlSchemaException(e.getMessage());
  }
}

代码示例来源:origin: org.apache.ws.schema/XmlSchema

XmlSchema read(final InputSource inputSource, ValidationEventHandler veh,
    TargetNamespaceValidator namespaceValidator) {
  try {
    DocumentBuilderFactory docFac = DocumentBuilderFactory.newInstance();
    docFac.setNamespaceAware(true);
    final DocumentBuilder builder = docFac.newDocumentBuilder();
    Document doc = null;
    doc = parse_doPriv(inputSource, builder, doc);
    return read(doc, inputSource.getSystemId(), veh, namespaceValidator);
  } catch (ParserConfigurationException e) {
    throw new XmlSchemaException(e.getMessage());
  } catch (IOException e) {
    throw new XmlSchemaException(e.getMessage());
  } catch (SAXException e) {
    throw new XmlSchemaException(e.getMessage());
  }
}

代码示例来源:origin: org.apache.ws/com.springsource.org.apache.ws.commons.schema

public void validate(XmlSchema pSchema) {
    final boolean valid;
    if (isEmpty(uri)) {
      valid = isEmpty(pSchema.syntacticalTargetNamespace);
    } else {
      valid = pSchema.syntacticalTargetNamespace.equals(uri);
    }
    if (!valid) {
      throw new XmlSchemaException("An imported schema was announced to have the namespace "
          + uri + ", but has the namespace " +
          pSchema.syntacticalTargetNamespace);
    }
  }
};

代码示例来源:origin: org.apache.ws/com.springsource.org.apache.ws.commons.schema

public void validate(XmlSchema pSchema) {
    if (isEmpty(pSchema.syntacticalTargetNamespace)) {
      pSchema.logicalTargetNamespace = schema.logicalTargetNamespace;
    } else {
      if (!pSchema.syntacticalTargetNamespace.equals(schema.logicalTargetNamespace)) {
        String msg = "An included schema was announced to have the default target namespace";
        if (!isEmpty(schema.logicalTargetNamespace)) {
          msg += " or the target namespace " + schema.logicalTargetNamespace;
        }
        throw new XmlSchemaException(msg + ", but has the target namespace "
            + pSchema.logicalTargetNamespace);
      }
    }
  }
};

代码示例来源:origin: org.apache.ws.commons.schema/XmlSchema

public void validate(XmlSchema pSchema) {
    final boolean valid;
    if (isEmpty(uri)) {
      valid = isEmpty(pSchema.syntacticalTargetNamespace);
    } else {
      valid = uri.equals(pSchema.syntacticalTargetNamespace);
    }
    if (!valid) {
      throw new XmlSchemaException(
          "An imported schema was announced to have the namespace "
              + uri + ", but has the namespace "
              + pSchema.syntacticalTargetNamespace);
    }
  }
};

代码示例来源:origin: org.apache.ws.schema/XmlSchema

public void validate(XmlSchema pSchema) {
    final boolean valid;
    if (isEmpty(uri)) {
      valid = isEmpty(pSchema.syntacticalTargetNamespace);
    } else {
      valid = pSchema.syntacticalTargetNamespace.equals(uri);
    }
    if (!valid) {
      throw new XmlSchemaException(
          "An imported schema was announced to have the namespace "
              + uri + ", but has the namespace "
              + pSchema.syntacticalTargetNamespace);
    }
  }
};

代码示例来源:origin: org.apache.ws.schema/XmlSchema

public void validate(XmlSchema pSchema) {
    if (isEmpty(pSchema.syntacticalTargetNamespace)) {
      pSchema.logicalTargetNamespace = schema.logicalTargetNamespace;
    } else {
      if (!pSchema.syntacticalTargetNamespace
          .equals(schema.logicalTargetNamespace)) {
        String msg = "An included schema was announced to have the default target namespace";
        if (!isEmpty(schema.logicalTargetNamespace)) {
          msg += " or the target namespace "
              + schema.logicalTargetNamespace;
        }
        throw new XmlSchemaException(msg
            + ", but has the target namespace "
            + pSchema.logicalTargetNamespace);
      }
    }
  }
};

代码示例来源:origin: org.apache.ws.commons.schema/XmlSchema

public void addType(XmlSchemaType type) {
  QName qname = type.getQName();
  if (schemaTypes.contains(qname)) {
    throw new XmlSchemaException(" Schema for namespace '" +
        syntacticalTargetNamespace + "' already contains type '" +
        qname.getLocalPart() + "'");
  }
  schemaTypes.add(qname, type);
}

代码示例来源:origin: org.apache.ws.commons.schema/XmlSchema

public void validate(XmlSchema pSchema) {
    if (isEmpty(pSchema.syntacticalTargetNamespace)) {
      pSchema.logicalTargetNamespace = schema.logicalTargetNamespace;
    } else {
      if (!pSchema.syntacticalTargetNamespace
          .equals(schema.logicalTargetNamespace)) {
        String msg = "An included schema was announced to have the default target namespace";
        if (!isEmpty(schema.logicalTargetNamespace)) {
          msg += " or the target namespace "
              + schema.logicalTargetNamespace;
        }
        throw new XmlSchemaException(msg
            + ", but has the target namespace "
            + pSchema.logicalTargetNamespace);
      }
    }
  }
};

代码示例来源:origin: org.apache.ws.schema/XmlSchema

public void addType(XmlSchemaType type) {
  QName qname = type.getQName();
  if (schemaTypes.contains(qname)) {
    throw new XmlSchemaException(" Schema for namespace '" +
        syntacticalTargetNamespace + "' already contains type '" +
        qname.getLocalPart() + "'");
  }
  schemaTypes.add(qname, type);
}

代码示例来源:origin: org.apache.cxf/cxf-bundle-jaxrs

throw new XmlSchemaException("Unable to locate imported document "
               + "at '" + schemaLocation + "'"
               + (baseUri == null
  in.setByteStream(ins);
} catch (IOException e) {
  throw new XmlSchemaException("Unable to load imported document "
                 + "at '" + schemaLocation + "'"
                 + (baseUri == null

代码示例来源:origin: org.apache.cxf/cxf-core

throw new XmlSchemaException("Unable to locate imported document "
               + "at '" + schemaLocation + "'"
               + (baseUri == null
  in.setByteStream(ins);
} catch (IOException e) {
  throw new XmlSchemaException("Unable to load imported document "
                 + "at '" + schemaLocation + "'"
                 + (baseUri == null

代码示例来源:origin: org.apache.ws.schema/XmlSchema

facet = new XmlSchemaWhiteSpaceFacet();
} else {
  throw new XmlSchemaException("Incorrect facet with name \""
                 + name + "\" found.");

代码示例来源:origin: org.apache.ws.commons.schema/XmlSchema

facet = new XmlSchemaWhiteSpaceFacet();
} else {
  throw new XmlSchemaException("Incorrect facet with name \""
                 + name + "\" found.");

代码示例来源:origin: org.apache.ws/com.springsource.org.apache.ws.commons.schema

public Document[] getAllSchemas() {
  try {
    XmlSchemaSerializer xser = new XmlSchemaSerializer();
    xser.setExtReg(this.parent.getExtReg());
    return xser.serializeSchema(this, true);
  } catch (XmlSchemaSerializer.XmlSchemaSerializerException e) {
    throw new XmlSchemaException(e.getMessage());
  }
}

代码示例来源:origin: org.apache.ws.schema/XmlSchema

public Document[] getAllSchemas() {
  try {
    XmlSchemaSerializer xser = new XmlSchemaSerializer();
    xser.setExtReg(this.parent.getExtReg());
    return xser.serializeSchema(this, true);
  } catch (XmlSchemaSerializer.XmlSchemaSerializerException e) {
    throw new XmlSchemaException(e.getMessage());
  }
}

代码示例来源:origin: org.apache.ws.commons.schema/XmlSchema

public Document[] getAllSchemas() {
  try {
    XmlSchemaSerializer xser = new XmlSchemaSerializer();
    xser.setExtReg(this.parent.getExtReg());
    return xser.serializeSchema(this, true);
  } catch (XmlSchemaSerializer.XmlSchemaSerializerException e) {
    throw new XmlSchemaException(e.getMessage());
  }
}

代码示例来源:origin: org.apache.ws.commons.schema/XmlSchema

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

代码示例来源:origin: org.apache.ws.schema/XmlSchema

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

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com