本文整理汇总了Java中com.sun.org.apache.xerces.internal.xs.StringList类的典型用法代码示例。如果您正苦于以下问题:Java StringList类的具体用法?Java StringList怎么用?Java StringList使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
StringList类属于com.sun.org.apache.xerces.internal.xs包,在下文中一共展示了StringList类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: setLocationHints
import com.sun.org.apache.xerces.internal.xs.StringList; //导入依赖的package包/类
private void setLocationHints(XSDDescription desc, String[] locations, StringList docLocations) {
int length = locations.length;
String[] hints = new String[length];
int counter = 0;
for (int i=0; i<length; i++) {
try {
String id = XMLEntityManager.expandSystemId(locations[i], desc.getBaseSystemId(), false);
if (!docLocations.contains(id)) {
hints[counter++] = locations[i];
}
}
catch (MalformedURIException e) {
}
}
if (counter > 0) {
if (counter == length) {
fXSDDescription.fLocationHints = hints;
}
else {
fXSDDescription.fLocationHints = new String[counter];
System.arraycopy(hints, 0, fXSDDescription.fLocationHints, 0, counter);
}
}
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:27,代码来源:XMLSchemaValidator.java
示例2: 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;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:18,代码来源:XSImplementationImpl.java
示例3: setLocationHints
import com.sun.org.apache.xerces.internal.xs.StringList; //导入依赖的package包/类
private void setLocationHints(XSDDescription desc, String[] locations, StringList docLocations) {
int length = locations.length;
String[] hints = new String[length];
int counter = 0;
for (int i=0; i<length; i++) {
if (!docLocations.contains(locations[i])) {
hints[counter++] = locations[i];
}
}
if (counter > 0) {
if (counter == length) {
fXSDDescription.fLocationHints = hints;
}
else {
fXSDDescription.fLocationHints = new String[counter];
System.arraycopy(hints, 0, fXSDDescription.fLocationHints, 0, counter);
}
}
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:22,代码来源:XMLSchemaValidator.java
示例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));
} catch (Exception e) {
reportDOMFatalError(e);
return null;
}
}
return new XSModelImpl(gs);
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:15,代码来源:XMLSchemaLoader.java
示例5: addNewGrammarLocations
import com.sun.org.apache.xerces.internal.xs.StringList; //导入依赖的package包/类
private void addNewGrammarLocations(SchemaGrammar srcGrammar, SchemaGrammar dstGrammar) {
final StringList locations = srcGrammar.getDocumentLocations();
final int locSize = locations.size();
final StringList locations2 = dstGrammar.getDocumentLocations();
for (int i=0; i<locSize; i++) {
String loc = locations.item(i);
if (!locations2.contains(loc)) {
dstGrammar.addDocument(null, loc);
}
}
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:13,代码来源:XSDHandler.java
示例6: 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;
}
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:22,代码来源:XSLoaderImpl.java
示例7: getFieldStrs
import com.sun.org.apache.xerces.internal.xs.StringList; //导入依赖的package包/类
/**
* {fields} A non-empty list of restricted XPath ([XPath]) expressions.
*/
public StringList getFieldStrs() {
String[] strs = new String[fFieldCount];
for (int i = 0; i < fFieldCount; i++)
strs[i] = fFields[i].toString();
return new StringListImpl(strs, fFieldCount);
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:10,代码来源:IdentityConstraint.java
示例8: 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);
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:15,代码来源:XMLSchemaLoader.java
示例9: 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;
}
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:22,代码来源:XSLoaderImpl.java
示例10: 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;
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:33,代码来源:ElementPSVImpl.java
示例11: getErrorCodes
import com.sun.org.apache.xerces.internal.xs.StringList; //导入依赖的package包/类
/**
* A list of error codes generated from validation attempts.
* Need to find all the possible subclause reports that need reporting
*
* @return Array of error codes
*/
public StringList getErrorCodes() {
if (fErrors == null || fErrors.length == 0) {
return StringListImpl.EMPTY_LIST;
}
return new PSVIErrorList(fErrors, true);
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:13,代码来源:ElementPSVImpl.java
示例12: getErrorMessages
import com.sun.org.apache.xerces.internal.xs.StringList; //导入依赖的package包/类
/**
* A list of error messages generated from the validation attempt or
* an empty <code>StringList</code> if no errors occurred during the
* validation attempt. The indices of error messages in this list are
* aligned with those in the <code>[schema error code]</code> list.
*/
public StringList getErrorMessages() {
if (fErrors == null || fErrors.length == 0) {
return StringListImpl.EMPTY_LIST;
}
return new PSVIErrorList(fErrors, false);
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:13,代码来源:ElementPSVImpl.java
示例13: 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;
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:29,代码来源:AttributePSVImpl.java
示例14: getErrorCodes
import com.sun.org.apache.xerces.internal.xs.StringList; //导入依赖的package包/类
/**
* A list of error codes generated from validation attempts.
* Need to find all the possible subclause reports that need reporting
*
* @return list of error codes
*/
public StringList getErrorCodes() {
if (fErrors == null || fErrors.length == 0) {
return StringListImpl.EMPTY_LIST;
}
return new PSVIErrorList(fErrors, true);
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:13,代码来源:AttributePSVImpl.java
注:本文中的com.sun.org.apache.xerces.internal.xs.StringList类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论