Examples of ObjectFactory


Examples of org.mapstruct.ap.test.selection.jaxb.test1.ObjectFactory

    public abstract OrderShippingDetailsType dtoToOrderShippingDetailsType(OrderShippingDetailsDto target);

    // TODO, remove this method when #134 is fixed
    public JAXBElement<OrderShippingDetailsType> dtoToOrderShippingDetailsTypeJB(OrderShippingDetailsDto target) {
        ObjectFactory of1 = new ObjectFactory();
        return of1.createOrderTypeShippingDetails( INSTANCE.dtoToOrderShippingDetailsType( target ) );
    }
View Full Code Here

Examples of org.mapstruct.itest.jaxb.xsd.test1.ObjectFactory

        // map to JAXB
        OrderType target = mapper.targetToSource( source1 );

        // do a pretty print
        ObjectFactory of = new ObjectFactory();
        System.out.println( toXml( of.createOrder( target ) ) );

        // map back from JAXB
        OrderDto source2 = mapper.sourceToTarget( target );

        // verify that source1 and source 2 are equal
View Full Code Here

Examples of org.megatome.frame2.jaxbgen.ObjectFactory

    Items.Item item = po.getItems().getItem().get(0);

    item.setComment("This comment has been changed"); //$NON-NLS-1$

    ObjectFactory of = new ObjectFactory();
    OutputStream ostream = Helper.marshall(of.createPurchaseOrder(po),
        TARGET_PACKAGE, getClass().getClassLoader());

    assertTrue(ostream.toString().indexOf("This comment has been changed") > 0); //$NON-NLS-1$
  }
View Full Code Here

Examples of org.mongodb.morphia.ObjectFactory

            return values;
        }
    }

    private Collection<?> createNewCollection(final MappedField mf) {
        final ObjectFactory of = getMapper().getOptions().getObjectFactory();
        return mf.isSet() ? of.createSet(mf) : of.createList(mf);
    }
View Full Code Here

Examples of org.mule.api.object.ObjectFactory

    private ObjectPool createPoolWithExhaustedAction(int exhaustedAction) throws Exception
    {
        PoolingProfile poolingProfile = createDefaultPoolingProfile();
        poolingProfile.setExhaustedAction(exhaustedAction);

        ObjectFactory objectFactory = new BananaFactory();
        return createPool(poolingProfile, objectFactory);
    }
View Full Code Here

Examples of org.objectweb.celtix.bus.jaxws.configuration.types.ObjectFactory

        hc.getHandler().remove(3);
        hc.getHandler().remove(2);
        hc.getHandler().remove(1);
        HandlerType h = hc.getHandler().get(0);
        List<HandlerInitParamType> params = h.getInitParam();
        HandlerInitParamType p = new ObjectFactory().createHandlerInitParamType();
        p.setParamName("foo");
        p.setParamValue("1");
        params.add(p);
        p = new ObjectFactory().createHandlerInitParamType();
        p.setParamName("bar");
        p.setParamValue("2");
        params.add(p);
       
        List<Handler> chain = builder.buildHandlerChainFromConfiguration(hc);
View Full Code Here

Examples of org.objectweb.celtix.configuration.types.ObjectFactory

    private TransportFactoryManagerImpl createTransportFactory() throws BusException {
        Bus bus = EasyMock.createMock(Bus.class);
        Configuration bc = EasyMock.createMock(Configuration.class);

        ObjectFactory of = new ObjectFactory();
        ClassNamespaceMappingListType mappings = of.createClassNamespaceMappingListType();
        bus.getConfiguration();
        EasyMock.expectLastCall().andReturn(bc);
        bc.getObject("transportFactories");
        EasyMock.expectLastCall().andReturn(mappings);
        EasyMock.replay(bus);
View Full Code Here

Examples of org.objectweb.celtix.ws.addressing.ObjectFactory

     * Set the address of the provided endpoint reference.
     * @param ref - the endpoint reference
     * @param address - the address
     */
    public static void setAddress(EndpointReferenceType ref, String address) {
        AttributedURIType a = new ObjectFactory().createAttributedURIType();
        a.setValue(address);
        ref.setAddress(a);
    }
View Full Code Here

Examples of org.objectweb.type_test.types3.ObjectFactory

        SgDerivedTypeB derivedB = new SgDerivedTypeB();
        derivedB.setVarInt(new BigInteger("32"));
        derivedB.setVarString("foo");

        ObjectFactory objectFactory = new ObjectFactory();

        StructWithSubstitutionGroup x = new StructWithSubstitutionGroup();
        JAXBElement<? extends SgBaseTypeA> elementA = objectFactory.createSg01BaseElementA(baseA);
        x.setSg01BaseElementA(elementA);
        StructWithSubstitutionGroup yOrig = new StructWithSubstitutionGroup();
        JAXBElement<? extends SgBaseTypeA> elementB = objectFactory.createSg01DerivedElementB(derivedB);
        yOrig.setSg01BaseElementA(elementB);

        Holder<StructWithSubstitutionGroup> y = new Holder<StructWithSubstitutionGroup>(yOrig);
        Holder<StructWithSubstitutionGroup> z = new Holder<StructWithSubstitutionGroup>();
        StructWithSubstitutionGroup ret;
View Full Code Here

Examples of org.ontospread.xmlbind.ObjectFactory

import org.ontospread.xmlbind.UriDepthPairType;

public class OntoSpreadStateXMLSerializer {
 
  public static OntoSpreadXMLState asXML(OntoSpreadState ontoSpreadState){
    ObjectFactory factory = new ObjectFactory();
    OntoSpreadXMLState ontoSpreadXMLState = factory.createOntoSpreadXMLState();
    ontoSpreadXMLState.setScoredConcepts(factory.createScoredConceptTOListType());
    List<ScoredConceptTOType> scoredConceptTOs = ontoSpreadXMLState.getScoredConcepts().getScoredConceptTOs();   
    for (ScoredConceptTO scoredConceptTO : ontoSpreadState.getInitialConcepts()) {
      ScoredConceptTOType scoredXML = new ScoredConceptTOType();
      scoredXML.setConceptUri(scoredConceptTO.getConceptUri());
      scoredXML.setScore(scoredConceptTO.getScore());
      scoredConceptTOs.add(scoredXML);
    }
    ontoSpreadXMLState.setSpreadTime(ontoSpreadState.getSpreadTime());
   
    ontoSpreadXMLState.setSpreadedConcepts(factory.createSpreadConceptListType());
    List<String> spreadedConcepts = ontoSpreadXMLState.getSpreadedConcepts().getSpreadedConcepts();
    for (String spreadedUri : ontoSpreadState.getSpreadedConcepts()) {     
      spreadedConcepts.add(spreadedUri);
    }
   
    ontoSpreadXMLState.setSpreadPathTable(factory.createEntryPathTableListType());
    Map<String, PathTO[]> spreadPathTable = ontoSpreadState.getSpreadPathTable();
    for (String key : spreadPathTable.keySet()) {
      PathTO[] pathTOs = spreadPathTable.get(key);
      EntryPathTableType entry = new EntryPathTableType();
      entry.setUri(key);
      for (PathTO pathTO : pathTOs) {
        PathTOType pathToAdd = new PathTOType();
        pathToAdd.setUri(pathTO.getConceptUri());
        pathToAdd.setRelations(factory.createListUrisType());
        if(pathTO.getRelationsUri()!=null){
          pathToAdd.getRelations().getRelations().addAll(Arrays.asList(pathTO.getRelationsUri()));
        }
        entry.setPathTOs(factory.createPathTOTypeList());
        entry.getPathTOs().getPathTOs().add(pathToAdd );       
      }
      ontoSpreadXMLState.getSpreadPathTable().getSpreadTableTOs().add(entry );
    }
   
    ontoSpreadXMLState.setFinalSpreadedConcepts(factory.createSpreadedConceptTOListType());
    for (SpreadedConceptTO spreadedConcept : ontoSpreadState.getFinalSpreadedConcepts()) {
      SpreadedConceptTOType spreadedXML = new SpreadedConceptTOType();
      spreadedXML.setConceptUri(spreadedConcept.getConcept().getUri());
      PathTO[] pathTOs = spreadedConcept.getSpreadPath();
      for (PathTO pathTO : pathTOs) {
        PathTOType pathToAdd = new PathTOType();
        pathToAdd.setUri(pathTO.getConceptUri());
        pathToAdd.setRelations(factory.createListUrisType());
        if(pathTO.getRelationsUri() != null){
          pathToAdd.getRelations().getRelations().addAll(Arrays.asList(pathTO.getRelationsUri()));
        }
        spreadedXML.setPathTOs(factory.createPathTOTypeList());
        spreadedXML.getPathTOs().getPathTOs().add(pathToAdd);
      }
      spreadedXML.setScore(spreadedConcept.getScore());
      ontoSpreadXMLState.getFinalSpreadedConcepts().getSpreadedConceptTOs().add(spreadedXML);
    }
   
    ontoSpreadXMLState.setUriDepthPair(factory.createUriDepthListType());
    List<UriDepthPairType> uriDepthPairs = ontoSpreadXMLState.getUriDepthPair().getUriDepthPairs();
    for (UriDepthPair uriPair : ontoSpreadState.getSortedList()) {
      UriDepthPairType uriXMLPair = new UriDepthPairType();
      uriXMLPair.setConceptUri(uriPair.getUri());
      uriXMLPair.setDepth(uriPair.getDepth());     
      uriDepthPairs.add(uriXMLPair );
    }
    ontoSpreadXMLState.setConcepts(factory.createEntryConceptsListType());
    List<EntryConceptsType> entryConceptTOs = ontoSpreadXMLState.getConcepts().getEntryConceptTOs();
    for (String key : ontoSpreadState.getConcepts().keySet()) {     
      Double value = ontoSpreadState.getConcepts().get(key);
      EntryConceptsType entryXML = new EntryConceptsType();
      entryXML.setUri(key);
      entryXML.setValue(value);
      entryConceptTOs.add(entryXML );     
    }
    HashMap<PathTO,Integer> prizeTable = ontoSpreadState.getConceptsToPrize().getPrizeTable();
    ontoSpreadXMLState.setPrizeTable(factory.createEntryPrizeTableListType());
    for (PathTO pathTO : prizeTable.keySet()) {
      EntryPrizeTableTOType entry = new EntryPrizeTableTOType();
      PathTOType pathToAdd = new PathTOType();
      pathToAdd.setUri(pathTO.getConceptUri());
      pathToAdd.setRelations(factory.createListUrisType());
      if(pathTO.getRelationsUri() != null){
        pathToAdd.getRelations().getRelations().addAll(Arrays.asList((pathTO.getRelationsUri())));
      }
      entry.setHits(prizeTable.get(pathTO));
      entry.setPathTO(pathToAdd);
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.