Package org.apache.xmlbeans.impl.common

Examples of org.apache.xmlbeans.impl.common.SequencedHashMap


        return new SchemaConfig(configs);
    }
   
    private SchemaConfig(Config[] configs)
    {
        _packageMap = new SequencedHashMap();
        _prefixMap = new SequencedHashMap();
        _suffixMap = new SequencedHashMap();
        _packageMapByUriPrefix = new SequencedHashMap();
        _prefixMapByUriPrefix = new SequencedHashMap();
        _suffixMapByUriPrefix = new SequencedHashMap();
        _qnameMap = new SequencedHashMap();
        _extensionHolder = new ExtensionHolder();

        for (int i = 0; i < configs.length; i++)
        {
            Config config = configs[i];
View Full Code Here


        _root = r;
        _top = _splay = s;
        _pos = p;
        _version = r.getVersion();
        _sb = new StringBuffer();
        _attrs = new SequencedHashMap();
        _attrNames = new HashSet();
        _firstPush = true;


        // Initialize the state of the namespaces
View Full Code Here

public class CommandLine
{
    public CommandLine(String[] args, Collection scheme)
    {
        _options = new SequencedHashMap();
        ArrayList endargs = new ArrayList();

        for (int i = 0; i < args.length; i++)
        {
            if (args[i].indexOf('-') == 0)
View Full Code Here

     * @return a map of all the source/target URLs needed to copy
     * the file along with all its relative referents.
     */
    public static Map findAllRelative(URL source, URL target)
    {
        Map result = new SequencedHashMap();
        result.put(source, target);

        LinkedList process = new LinkedList();
        process.add(source);

        while (!process.isEmpty())
        {
            URL nextSource = (URL)process.removeFirst();
            URL nextTarget = (URL)result.get(nextSource);
            Map nextResults = findRelativeInOne(nextSource, nextTarget);
            for (Iterator i = nextResults.keySet().iterator(); i.hasNext(); )
            {
                URL newSource = (URL)i.next();
                if (result.containsKey(newSource))
                    continue;
                result.put(newSource, nextResults.get(newSource));
                process.add(newSource);
            }
        }

        return result;
View Full Code Here

        {
            XmlObject xobj = XmlObject.Factory.parse(source, loadOptions);
            XmlCursor xcur = xobj.newCursor();
            xcur.toFirstChild();

            Map result = new SequencedHashMap();

            if (xobj instanceof SchemaDocument)
                putMappingsFromSchema(result, source, target, ((SchemaDocument)xobj).getSchema());
            else if (xobj instanceof DefinitionsDocument)
                putMappingsFromWsdl(result, source, target, ((DefinitionsDocument)xobj).getDefinitions());
View Full Code Here

    public void testAdditionalNamespaces()
        throws Exception
    {
        String xml = "<a xmlns:a='aNS'><a:b/></a>";

        Map map = new SequencedHashMap();
        map.put("b", "bNS");
        map.put("c", "cNS");
        map.put("a", "not-aNS");

        XmlOptions options = new XmlOptions();
        options.setLoadAdditionalNamespaces(map);

        XmlObject x = XmlObject.Factory.parse(xml, options);

        // 'a' prefix namespace is not remapped
        String expect = "<a xmlns:c=\"cNS\" xmlns:b=\"bNS\" xmlns:a=\"aNS\"><a:b/></a>";
        Assert.assertEquals( expect, x.xmlText() );

        xml = "<a xmlns='aNS'><b/></a>";

        map = new SequencedHashMap();
        map.put("b", "bNS");
        map.put("c", "cNS");
        map.put("", "not-aNS");

        options = new XmlOptions();
        options.setLoadAdditionalNamespaces(map);

        x = XmlObject.Factory.parse(xml, options);
View Full Code Here

        }

        int particleCode = translateParticleCode(parseGroup);

        // used to ensure consistency (doesn't become part of the result)
        Map elementModel = new SequencedHashMap();

        // build content model and anonymous types
        SchemaParticle contentModel = translateContentModel(sImpl, parseGroup, targetNamespace, chameleon, particleCode, anonymousTypes, elementModel, false, null);

        // detect the nonempty "all" case (empty <all> doesn't count - it needs to be eliminated to match XSD test cases)
View Full Code Here

        // detect the "all" case
        int particleCode = translateParticleCode(parseEg);

        // used to ensure consistency (doesn't become part of the result)
        Map elementModel = new SequencedHashMap();

        // build content model and anonymous types
        SchemaParticle contentModel = translateContentModel(
            sImpl, parseEg, targetNamespace, chameleon, particleCode, anonymousTypes, elementModel, false, null);
View Full Code Here

        list.add(part);
    }

    static Map buildAttributePropertyModelByQName(SchemaAttributeModel attrModel, SchemaType owner)
    {
        Map result = new SequencedHashMap();
        SchemaLocalAttribute[] attruses = attrModel.getAttributes();

        for (int i = 0; i < attruses.length; i++)
            result.put(attruses[i].getName(), buildUseProperty(attruses[i], owner));

        return result;
    }
View Full Code Here

        }

        if (model == null)
        {
            // build model for children
            model = new SequencedHashMap();
            SchemaParticle[] children = part.getParticleChildren();

            for (int i = 0; i < children.length; i++)
            {
                // indentDBG();
View Full Code Here

TOP

Related Classes of org.apache.xmlbeans.impl.common.SequencedHashMap

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.