Search in sources :

Example 51 with Attribute

use of com.github.zhenwei.core.asn1.x509.Attribute in project mule-migration-assistant by mulesoft.

the class AbstractExceptionsMigrationStep method migrateWhenExpression.

protected void migrateWhenExpression(Element element) {
    if (element.getAttribute("when") != null) {
        Attribute whenCondition = element.getAttribute("when");
        whenCondition.setValue(getExpressionMigrator().migrateExpression(whenCondition.getValue(), true, element));
    }
}
Also used : Attribute(org.jdom2.Attribute)

Example 52 with Attribute

use of com.github.zhenwei.core.asn1.x509.Attribute in project mule-migration-assistant by mulesoft.

the class Async method execute.

@Override
public void execute(Element element, MigrationReport report) throws RuntimeException {
    // TODO Migrate to maxConcurrency when mule version is equal or higher to 4.2.0
    Attribute processingStrategy = element.getAttribute("processingStrategy");
    if (processingStrategy != null) {
        element.removeAttribute(processingStrategy);
        Element processingStrategyConfig = getApplicationModel().getNode("//*[@name = '" + processingStrategy.getValue() + "']");
        if (processingStrategyConfig != null) {
            processingStrategyConfig.detach();
        }
        report.report("async.processingStrategy", element, element);
    }
}
Also used : Attribute(org.jdom2.Attribute) Element(org.jdom2.Element)

Example 53 with Attribute

use of com.github.zhenwei.core.asn1.x509.Attribute in project mule-migration-assistant by mulesoft.

the class ChoiceExpressions method migrateExpression.

private void migrateExpression(Element element) {
    Attribute expression = element.getAttribute(EXPRESSION_ATTRIBUTE);
    if (expression != null) {
        String migratedExpression = getExpressionMigrator().migrateExpression(expression.getValue(), true, element);
        migratedExpression = expressionMigrator.wrap(migratedExpression);
        expression.setValue(migratedExpression);
    }
}
Also used : Attribute(org.jdom2.Attribute)

Example 54 with Attribute

use of com.github.zhenwei.core.asn1.x509.Attribute in project mule-migration-assistant by mulesoft.

the class ForEachExpressions method execute.

@Override
public void execute(Element element, MigrationReport report) throws RuntimeException {
    Attribute expression = element.getAttribute(EXPRESSION_ATTRIBUTE);
    if (expression != null) {
        String migratedExpression = expressionMigrator.migrateExpression(expression.getValue(), true, element);
        migratedExpression = expressionMigrator.wrap(migratedExpression);
        expression.setValue(migratedExpression);
    }
}
Also used : Attribute(org.jdom2.Attribute)

Example 55 with Attribute

use of com.github.zhenwei.core.asn1.x509.Attribute in project geotoolkit by Geomatys.

the class JAXBFeatureTypeWriter method fillSchemaWithFeatureType.

private void fillSchemaWithFeatureType(final FeatureType featureType, final Schema schema, boolean addTopElement, Set<String> alreadyWritten) {
    if (Utils.GML_FEATURE_TYPES.contains(featureType.getName())) {
        // this type is part of the standard GML types
        return;
    }
    // write parent types
    for (FeatureType parent : featureType.getSuperTypes()) {
        fillSchemaWithFeatureType(parent, schema, false, alreadyWritten);
    }
    final String typeNamespace = NamesExt.getNamespace(featureType.getName());
    final String elementName = featureType.getName().tip().toString();
    final String typeName = elementName + "Type";
    if (addTopElement) {
        final TopLevelElement topElement;
        if ("3.2.1".equals(gmlVersion)) {
            topElement = new TopLevelElement(elementName, new QName(typeNamespace, typeName), ABSTRACT_FEATURE_NAME_321);
        } else {
            topElement = new TopLevelElement(elementName, new QName(typeNamespace, typeName), ABSTRACT_FEATURE_NAME_311);
        }
        schema.addElement(topElement);
    }
    boolean ar = alreadyWritten.add(typeName);
    final ExplicitGroup sequence = new ExplicitGroup();
    final List<Attribute> attributes = new ArrayList<>();
    for (final PropertyType pdesc : featureType.getProperties(false)) {
        if (AttributeConvention.contains(pdesc.getName())) {
            // skip convention properties
            continue;
        }
        writeProperty(pdesc, sequence, schema, attributes, alreadyWritten);
    }
    if (addTopElement && ar) {
        final ComplexContent content = getComplexContent(sequence);
        final TopLevelComplexType tlcType = new TopLevelComplexType(typeName, content);
        tlcType.getAttributeOrAttributeGroup().addAll(attributes);
        schema.addComplexType(1, tlcType);
    }
}
Also used : FeatureType(org.opengis.feature.FeatureType) TopLevelElement(org.geotoolkit.xsd.xml.v2001.TopLevelElement) Attribute(org.geotoolkit.xsd.xml.v2001.Attribute) TopLevelComplexType(org.geotoolkit.xsd.xml.v2001.TopLevelComplexType) QName(javax.xml.namespace.QName) ArrayList(java.util.ArrayList) PropertyType(org.opengis.feature.PropertyType) ComplexContent(org.geotoolkit.xsd.xml.v2001.ComplexContent) ExplicitGroup(org.geotoolkit.xsd.xml.v2001.ExplicitGroup)

Aggregations

Attribute (org.jdom2.Attribute)316 Element (org.jdom2.Element)210 IOException (java.io.IOException)98 ArrayList (java.util.ArrayList)75 Attribute (ucar.nc2.Attribute)65 List (java.util.List)46 Document (org.jdom2.Document)43 Variable (ucar.nc2.Variable)39 HashMap (java.util.HashMap)26 Extensions (org.bouncycastle.asn1.x509.Extensions)26 X509Certificate (java.security.cert.X509Certificate)24 Namespace (org.jdom2.Namespace)24 File (java.io.File)23 Attribute (org.bouncycastle.asn1.pkcs.Attribute)21 GeneralName (org.bouncycastle.asn1.x509.GeneralName)21 Array (ucar.ma2.Array)21 Test (org.junit.Test)20 GeneralNames (org.bouncycastle.asn1.x509.GeneralNames)19 Dimension (ucar.nc2.Dimension)19 Map (java.util.Map)17