本文整理汇总了Java中com.sun.org.apache.xerces.internal.xs.StringList.getLength方法的典型用法代码示例。如果您正苦于以下问题:Java StringList.getLength方法的具体用法?Java StringList.getLength怎么用?Java StringList.getLength使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.sun.org.apache.xerces.internal.xs.StringList
的用法示例。
在下文中一共展示了StringList.getLength方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createXSLoader
import com.sun.org.apache.xerces.internal.xs.StringList; //导入方法依赖的package包/类
public XSLoader createXSLoader(StringList versions) throws XSException {
XSLoader loader = new XSLoaderImpl();
if (versions == null){
return loader;
}
for (int i=0; i<versions.getLength();i++){
if (!versions.item(i).equals("1.0")){
String msg =
DOMMessageFormatter.formatMessage(
DOMMessageFormatter.DOM_DOMAIN,
"FEATURE_NOT_SUPPORTED",
new Object[] { versions.item(i) });
throw new XSException(XSException.NOT_SUPPORTED_ERR, msg);
}
}
return loader;
}
示例2: loadURIList
import com.sun.org.apache.xerces.internal.xs.StringList; //导入方法依赖的package包/类
public XSModel loadURIList(StringList uriList) {
int length = uriList.getLength();
SchemaGrammar[] gs = new SchemaGrammar[length];
for (int i = 0; i < length; i++) {
try {
gs[i] =
(SchemaGrammar) loadGrammar(new XMLInputSource(null, uriList.item(i), null));
} catch (Exception e) {
reportDOMFatalError(e);
return null;
}
}
return new XSModelImpl(gs);
}
示例3: loadURIList
import com.sun.org.apache.xerces.internal.xs.StringList; //导入方法依赖的package包/类
/**
* Parses the content of XML Schema documents specified as the list of URI
* references. If the URI contains a fragment identifier, the behavior
* is not defined by this specification.
* @param uriList The list of URI locations.
* @return An XSModel representing the schema documents.
*/
public XSModel loadURIList(StringList uriList) {
int length = uriList.getLength();
try {
fGrammarPool.clear();
for (int i = 0; i < length; ++i) {
fSchemaLoader.loadGrammar(new XMLInputSource(null, uriList.item(i), null));
}
return fGrammarPool.toXSModel();
}
catch (Exception e) {
fSchemaLoader.reportDOMFatalError(e);
return null;
}
}
示例4: loadURIList
import com.sun.org.apache.xerces.internal.xs.StringList; //导入方法依赖的package包/类
public XSModel loadURIList(StringList uriList) {
int length = uriList.getLength();
SchemaGrammar[] gs = new SchemaGrammar[length];
for (int i = 0; i < length; i++) {
try {
gs[i] =
(SchemaGrammar) loadGrammar(new XMLInputSource(null, uriList.item(i), null, false));
} catch (Exception e) {
reportDOMFatalError(e);
return null;
}
}
return new XSModelImpl(gs);
}
示例5: loadURIList
import com.sun.org.apache.xerces.internal.xs.StringList; //导入方法依赖的package包/类
/**
* Parses the content of XML Schema documents specified as the list of URI
* references. If the URI contains a fragment identifier, the behavior
* is not defined by this specification.
* @param uriList The list of URI locations.
* @return An XSModel representing the schema documents.
*/
public XSModel loadURIList(StringList uriList) {
int length = uriList.getLength();
try {
fGrammarPool.clear();
for (int i = 0; i < length; ++i) {
fSchemaLoader.loadGrammar(new XMLInputSource(null, uriList.item(i), null, false));
}
return fGrammarPool.toXSModel();
}
catch (Exception e) {
fSchemaLoader.reportDOMFatalError(e);
return null;
}
}
示例6: ElementPSVImpl
import com.sun.org.apache.xerces.internal.xs.StringList; //导入方法依赖的package包/类
public ElementPSVImpl(boolean isConstant, ElementPSVI elementPSVI) {
fDeclaration = elementPSVI.getElementDeclaration();
fTypeDecl = elementPSVI.getTypeDefinition();
fNil = elementPSVI.getNil();
fSpecified = elementPSVI.getIsSchemaSpecified();
fValue.copyFrom(elementPSVI.getSchemaValue());
fNotation = elementPSVI.getNotation();
fValidationAttempted = elementPSVI.getValidationAttempted();
fValidity = elementPSVI.getValidity();
fValidationContext = elementPSVI.getValidationContext();
if (elementPSVI instanceof ElementPSVImpl) {
final ElementPSVImpl elementPSVIImpl = (ElementPSVImpl) elementPSVI;
fErrors = (elementPSVIImpl.fErrors != null) ?
(String[]) elementPSVIImpl.fErrors.clone() : null;
elementPSVIImpl.copySchemaInformationTo(this);
}
else {
final StringList errorCodes = elementPSVI.getErrorCodes();
final int length = errorCodes.getLength();
if (length > 0) {
final StringList errorMessages = elementPSVI.getErrorMessages();
final String[] errors = new String[length << 1];
for (int i = 0, j = 0; i < length; ++i) {
errors[j++] = errorCodes.item(i);
errors[j++] = errorMessages.item(i);
}
fErrors = errors;
}
fSchemaInformation = elementPSVI.getSchemaInformation();
}
fIsConstant = isConstant;
}
示例7: AttributePSVImpl
import com.sun.org.apache.xerces.internal.xs.StringList; //导入方法依赖的package包/类
public AttributePSVImpl(boolean isConstant, AttributePSVI attrPSVI) {
fDeclaration = attrPSVI.getAttributeDeclaration();
fTypeDecl = attrPSVI.getTypeDefinition();
fSpecified = attrPSVI.getIsSchemaSpecified();
fValue.copyFrom(attrPSVI.getSchemaValue());
fValidationAttempted = attrPSVI.getValidationAttempted();
fValidity = attrPSVI.getValidity();
if (attrPSVI instanceof AttributePSVImpl) {
final AttributePSVImpl attrPSVIImpl = (AttributePSVImpl) attrPSVI;
fErrors = (attrPSVIImpl.fErrors != null) ?
(String[]) attrPSVIImpl.fErrors.clone() : null;
}
else {
final StringList errorCodes = attrPSVI.getErrorCodes();
final int length = errorCodes.getLength();
if (length > 0) {
final StringList errorMessages = attrPSVI.getErrorMessages();
final String[] errors = new String[length << 1];
for (int i = 0, j = 0; i < length; ++i) {
errors[j++] = errorCodes.item(i);
errors[j++] = errorMessages.item(i);
}
fErrors = errors;
}
}
fValidationContext = attrPSVI.getValidationContext();
fIsConstant = isConstant;
}