All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.apache.cxf.tools.corba.common.XmlSchemaPrimitiveMap Maven / Gradle / Ivy

There is a newer version: 3.0.0-milestone2
Show newest version
/**
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements. See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership. The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License. You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied. See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */

package org.apache.cxf.tools.corba.common;

import java.util.HashMap;
import java.util.Map;

import javax.xml.namespace.QName;

import org.apache.cxf.binding.corba.wsdl.CorbaConstants;
import org.apache.ws.commons.schema.constants.Constants;

public class XmlSchemaPrimitiveMap {
    private Map xmlSchemaPrimitiveMap;
    
    public XmlSchemaPrimitiveMap() {
        xmlSchemaPrimitiveMap = new HashMap();
        initializeMap();
    }
    
    private void initializeMap() {
        //
        //  - OMG Syntax and semantics - CORBA v3.0 
        xmlSchemaPrimitiveMap.put(CorbaConstants.NT_CORBA_FLOAT, Constants.XSD_FLOAT); 
        xmlSchemaPrimitiveMap.put(CorbaConstants.NT_CORBA_DOUBLE, Constants.XSD_DOUBLE);
        xmlSchemaPrimitiveMap.put(CorbaConstants.NT_CORBA_LONGDOUBLE, Constants.XSD_DOUBLE);
     
        // 
        xmlSchemaPrimitiveMap.put(CorbaConstants.NT_CORBA_SHORT, Constants.XSD_SHORT);
        xmlSchemaPrimitiveMap.put(CorbaConstants.NT_CORBA_LONG, Constants.XSD_INT);
        xmlSchemaPrimitiveMap.put(CorbaConstants.NT_CORBA_LONGLONG, Constants.XSD_LONG);
        xmlSchemaPrimitiveMap.put(CorbaConstants.NT_CORBA_USHORT, Constants.XSD_UNSIGNEDSHORT);
        xmlSchemaPrimitiveMap.put(CorbaConstants.NT_CORBA_ULONG, Constants.XSD_UNSIGNEDINT);
        xmlSchemaPrimitiveMap.put(CorbaConstants.NT_CORBA_ULONGLONG, Constants.XSD_UNSIGNEDLONG);
        
        // 
        xmlSchemaPrimitiveMap.put(CorbaConstants.NT_CORBA_CHAR, Constants.XSD_BYTE);
        
        // 
        xmlSchemaPrimitiveMap.put(CorbaConstants.NT_CORBA_WCHAR, Constants.XSD_STRING);
        
        // 
        xmlSchemaPrimitiveMap.put(CorbaConstants.NT_CORBA_BOOLEAN, Constants.XSD_BOOLEAN);
        
        // 
        xmlSchemaPrimitiveMap.put(CorbaConstants.NT_CORBA_OCTET, Constants.XSD_UNSIGNEDBYTE);
        
        // 
        xmlSchemaPrimitiveMap.put(CorbaConstants.NT_CORBA_ANY, Constants.XSD_ANYTYPE);
        
        // 
        
        // 
        
        //
        // 
        xmlSchemaPrimitiveMap.put(CorbaConstants.NT_CORBA_STRING, Constants.XSD_STRING);
        // 
        xmlSchemaPrimitiveMap.put(CorbaConstants.NT_CORBA_WSTRING, Constants.XSD_STRING);
    }
    
    public QName get(QName key) {
        return xmlSchemaPrimitiveMap.get(key);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy