Examples of Mapping


Examples of org.andromda.core.mapping.Mapping

                final Collection mappings = mergeMappings.getMappings();
                if ((mappings != null) && !mappings.isEmpty())
                {
                    for (final Iterator mappingsIterator = mappings.iterator(); mappingsIterator.hasNext();)
                    {
                        final Mapping mapping = (Mapping)mappingsIterator.next();
                        final Collection froms = mapping.getFroms();

                        if (froms != null && !froms.isEmpty())
                        {
                            for (final Iterator fromsIterator = froms.iterator(); fromsIterator.hasNext();)
                            {
                                final String from = StringUtils.trimToEmpty((String)fromsIterator.next());
                                if (StringUtils.isNotEmpty(from) && string.contains(from))
                                {
                                    final String to = mapping.getTo() != null ? mapping.getTo().trim() : "";
                                    string = StringUtils.replace(string, from, to);
                                }
                            }
                        }
                    }
View Full Code Here

Examples of org.apache.axis.utils.Mapping

        if (registerPrefixes) {
            if (namespaces == null)
                namespaces = new ArrayList();

            namespaces.add(new Mapping(soapConstants.getEnvelopeURI(),
                                       Constants.NS_PREFIX_SOAP_ENV));
            namespaces.add(new Mapping(Constants.URI_DEFAULT_SCHEMA_XSD,
                                       Constants.NS_PREFIX_SCHEMA_XSD));
            namespaces.add(new Mapping(Constants.URI_DEFAULT_SCHEMA_XSI,
                                       Constants.NS_PREFIX_SCHEMA_XSI));
        }

        setDirty(true);
    }
View Full Code Here

Examples of org.apache.cocoon.portal.acting.helpers.Mapping

                    final int index = Integer.parseInt(historyValue);
                    final List state = (List)history.get(index);
                    if ( state != null ) {
                        final Iterator iter = state.iterator();
                        while ( iter.hasNext() ) {
                            Mapping m = (Mapping)iter.next();
                            events.add(m.getEvent(service, null));
                        }
                        while (history.size() > index ) {
                            history.remove(history.size()-1);
                        }
                    }
                }
            }
            Enumeration enumeration = request.getParameterNames();
            while (enumeration.hasMoreElements()) {
                String name = (String)enumeration.nextElement();
                String value = request.getParameter(name);
               
                Mapping m = (Mapping) this.eventMap.get(name);
                if ( m != null ) {
                    events.add(m.getEvent(service, value));
                }               
            }
            String uri = service.getComponentManager().getLinkService().getLinkURI(events);
            result = new HashMap();
            result.put("uri", uri.substring(uri.indexOf('?')+1));
View Full Code Here

Examples of org.apache.cxf.common.jaxb.JAXBUtils.Mapping

        if (part.isElement()) {
            name = part.getElementQName();
        } else {
            name = part.getTypeQName();
        }
        Mapping mapping = model.get(name);
       
        //String clsName = null;
        JType jType = null;
        if (mapping != null) {
            jType = mapping.getType().getTypeClass();             
        }
       
        if (jType == null) {
            TypeAndAnnotation typeAndAnnotation = model.getJavaType(part.getTypeQName());          
            if (typeAndAnnotation != null) {               
                jType = typeAndAnnotation.getTypeClass();
            }
        }
        if (jType == null
            && part.isElement()
            && part.getXmlSchema() instanceof XmlSchemaElement
            && ((XmlSchemaElement)part.getXmlSchema()).getSchemaTypeName() == null) {
            //anonymous inner thing.....
            UnwrappedOperationInfo oInfo = (UnwrappedOperationInfo)op;
            op = oInfo.getWrappedOperation();
           
            if (part.getMessageInfo() == oInfo.getInput()) {
                mapping = model.get(op.getInput().getMessagePart(0).getElementQName());
            } else {
                mapping = model.get(op.getOutput().getMessagePart(0).getElementQName());
            }
            if (mapping != null) {
                jType = mapping.getType().getTypeClass();
                try {
                    Iterator<JType> i = jType.classes();
                    while (i.hasNext()) {
                        JType jt = i.next();
                        if (jt.name().equalsIgnoreCase(part.getElementQName().getLocalPart())) {
View Full Code Here

Examples of org.apache.cxf.fediz.was.mapping.config.Mapping

    }

    private Map<String, List<String>> loadMappingFile() throws FileNotFoundException, JAXBException {
        InputSource input = new InputSource(new FileInputStream(groupMappingFilename));
        JAXBContext context = JAXBContext.newInstance(Mapping.class);
        Mapping localmappings = (Mapping)context.createUnmarshaller().unmarshal(input);

        Map<String, List<String>> map = new HashMap<String, List<String>>(10);

        Iterator<SamlToJ2EE> i = localmappings.getSamlToJ2EE().iterator();
        while (i.hasNext()) {
            SamlToJ2EE mapping = i.next();
            if (LOG.isDebugEnabled()) {
                LOG.debug(mapping.getClaim() + " mapped to "
                    + mapping.getGroups().getJ2EeGroup().size() + " entries");
View Full Code Here

Examples of org.apache.cxf.jaxb.JAXBUtils.Mapping

        if (part.isElement()) {
            name = part.getElementQName();
        } else {
            name = part.getTypeQName();
        }
        Mapping mapping = model.get(name);
       
        //String clsName = null;
        JType jType = null;
        if (mapping != null) {
            jType = mapping.getType().getTypeClass();             
        }
       
        if (jType == null) {
            TypeAndAnnotation typeAndAnnotation = model.getJavaType(part.getTypeQName());          
            if (typeAndAnnotation != null) {               
                jType = typeAndAnnotation.getTypeClass();
            }
        }
        if (jType == null
            && part.isElement()
            && part.getXmlSchema() instanceof XmlSchemaElement
            && ((XmlSchemaElement)part.getXmlSchema()).getSchemaTypeName() == null) {
            //anonymous inner thing.....
            UnwrappedOperationInfo oInfo = (UnwrappedOperationInfo)op;
            op = oInfo.getWrappedOperation();
           
            if (part.getMessageInfo() == oInfo.getInput()) {
                mapping = model.get(op.getInput().getMessagePart(0).getElementQName());
            } else {
                mapping = model.get(op.getOutput().getMessagePart(0).getElementQName());
            }
            if (mapping != null) {
                jType = mapping.getType().getTypeClass();
                try {
                    Iterator<JType> i = jType.classes();
                    while (i.hasNext()) {
                        JType jt = i.next();
                        if (jt.name().equalsIgnoreCase(part.getElementQName().getLocalPart())) {
View Full Code Here

Examples of org.apache.flex.compiler.internal.config.annotations.Mapping

                    final SoftPrerequisites softPre = method.getAnnotation(SoftPrerequisites.class);
                    if (softPre != null)
                        info.softPrerequisites = softPre.value();
                   
                    // XML element name for configuration
                    final Mapping mapping = method.getAnnotation(Mapping.class);
                    if (mapping != null)
                        configName = Joiner.on(".").skipNulls().join(mapping.value());
                   
                    // Is this a Flex only option?
                    final FlexOnly flexOnly = method.getAnnotation(FlexOnly.class);
                    if (flexOnly != null)
                        info.isFlexOnly = true;
View Full Code Here

Examples of org.apache.hadoop.hbase.hbql.client.Mapping

    }

    public static AnnotationResultAccessor newAnnotationMapping(final HConnectionImpl conn,
                                                                final Class<?> clazz) throws HBqlException {

        final Mapping mappingAnnotation = clazz.getAnnotation(Mapping.class);

        if (mappingAnnotation == null)
            throw new HBqlException("Class " + clazz.getName() + " is missing @Mapping annotation");

        if (mappingAnnotation.name() == null || mappingAnnotation.name().length() == 0)
            throw new HBqlException("@Mapping annotation for class " + clazz.getName() + " is missing a name");

        final TableMapping tableMapping = conn.getMapping(mappingAnnotation.name());
        return new AnnotationResultAccessor(tableMapping, clazz);
    }
View Full Code Here

Examples of org.apache.hadoop.hbase.hbql.mapping.Mapping

    private String getIndexName() {
        return this.indexName;
    }

    protected ExecutionResults execute(final HConnectionImpl conn) throws HBqlException {
        final Mapping mapping = conn.getMapping(this.getMappingContext().getMappingName());
        return DescribeIndexForTableStatement.executeDescribe(conn, this.getIndexName(), mapping.getTableName());
    }
View Full Code Here

Examples of org.apache.mahout.ep.Mapping

public final class ModelSerializerTest extends MahoutTestCase {

  @Test
  public void testSoftLimitDeserialization() {
    Mapping m = ModelSerializer.gson().fromJson(new StringReader("{\"min\":-18.420680743952367,\"max\":-2.3025850929940455,\"scale\":1.0}"), Mapping.SoftLimit.class);
    assertTrue(m instanceof Mapping.SoftLimit);
    assertEquals((-18.420680743952367 - 2.3025850929940455) / 2, m.apply(0), 1.0e-6);

    String data = "{\"class\":\"org.apache.mahout.ep.Mapping$SoftLimit\",\"value\":{\"min\":-18.420680743952367,\"max\":-2.3025850929940455,\"scale\":1.0}}";
    m = ModelSerializer.gson().fromJson(new StringReader(data), Mapping.class);
    assertTrue(m instanceof Mapping.SoftLimit);
    assertEquals((-18.420680743952367 - 2.3025850929940455) / 2, m.apply(0), 1.0e-6);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.