Search in sources :

Example 1 with ElementPSVI

use of org.apache.xerces.xs.ElementPSVI in project iaf by ibissource.

the class XmlAligner method getTypeDefinition.

public XSTypeDefinition getTypeDefinition(PSVIProvider psviProvider) {
    ElementPSVI elementPSVI = psviProvider.getElementPSVI();
    if (DEBUG)
        log.debug("getTypeDefinition() elementPSVI [" + ToStringBuilder.reflectionToString(elementPSVI) + "]");
    XSElementDeclaration elementDeclaration = elementPSVI.getElementDeclaration();
    if (DEBUG)
        log.debug("getTypeDefinition() elementPSVI element declaration [" + ToStringBuilder.reflectionToString(elementDeclaration) + "]");
    if (elementDeclaration == null) {
        return null;
    }
    XSTypeDefinition typeDefinition = elementDeclaration.getTypeDefinition();
    if (DEBUG)
        log.debug("getTypeDefinition() elementDeclaration typeDefinition [" + ToStringBuilder.reflectionToString(typeDefinition) + "]");
    return typeDefinition;
}
Also used : ElementPSVI(org.apache.xerces.xs.ElementPSVI) XSTypeDefinition(org.apache.xerces.xs.XSTypeDefinition) XSElementDeclaration(org.apache.xerces.xs.XSElementDeclaration)

Example 2 with ElementPSVI

use of org.apache.xerces.xs.ElementPSVI in project narayana by jbosstm.

the class NBFHandlers method startElement.

public void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException {
    if (qName.equals(id)) {
        if (index == curIndex) {
            found = true;
        }
        curIndex++;
        ElementPSVI psvi = provider.getElementPSVI();
        if (psvi != null) {
            XSTypeDefinition typeInfo = psvi.getTypeDefinition();
            while (typeInfo != null) {
                String typeName = typeInfo.getName();
                if (typeName != null && (typeName.equals("long") || typeName.equals("string") || typeName.equals("integer") || typeName.equals("float") || typeName.endsWith("_type"))) {
                    type = typeName;
                    log.debug(qName + " has type of " + type);
                    break;
                }
                typeInfo = typeInfo.getBaseType();
            }
        }
    }
}
Also used : ElementPSVI(org.apache.xerces.xs.ElementPSVI) XSTypeDefinition(org.apache.xerces.xs.XSTypeDefinition)

Example 3 with ElementPSVI

use of org.apache.xerces.xs.ElementPSVI in project webtools.sourceediting by eclipse.

the class AbstractPsychoPathWTPTest method getGrammar.

protected XSModel getGrammar() {
    ElementPSVI rootPSVI = (ElementPSVI) domDoc.getDocumentElement();
    XSModel schema = rootPSVI.getSchemaInformation();
    return schema;
}
Also used : ElementPSVI(org.apache.xerces.xs.ElementPSVI) XSModel(org.apache.xerces.xs.XSModel)

Example 4 with ElementPSVI

use of org.apache.xerces.xs.ElementPSVI in project webtools.sourceediting by eclipse.

the class CompleteNewApiTest method getGrammar.

protected XSModel getGrammar() {
    ElementPSVI rootPSVI = (ElementPSVI) domDoc.getDocumentElement();
    XSModel schema = rootPSVI.getSchemaInformation();
    return schema;
}
Also used : ElementPSVI(org.apache.xerces.xs.ElementPSVI) XSModel(org.apache.xerces.xs.XSModel)

Example 5 with ElementPSVI

use of org.apache.xerces.xs.ElementPSVI in project webtools.sourceediting by eclipse.

the class AbstractPsychoPathTest method getGrammar.

protected XSModel getGrammar() {
    ElementPSVI rootPSVI = (ElementPSVI) domDoc.getDocumentElement();
    XSModel schema = rootPSVI.getSchemaInformation();
    return schema;
}
Also used : ElementPSVI(org.apache.xerces.xs.ElementPSVI) XSModel(org.apache.xerces.xs.XSModel)

Aggregations

ElementPSVI (org.apache.xerces.xs.ElementPSVI)5 XSModel (org.apache.xerces.xs.XSModel)3 XSTypeDefinition (org.apache.xerces.xs.XSTypeDefinition)2 XSElementDeclaration (org.apache.xerces.xs.XSElementDeclaration)1