Package org.exolab.castor.xml

Examples of org.exolab.castor.xml.Unmarshaller.unmarshal()


            unmarshaller.setIgnoreExtraElements(true);
            unmarshaller.setIgnoreExtraAttributes(true);
            // modified by YCLI: END

            PortletApplicationDefinitionImpl portletApp =
                (PortletApplicationDefinitionImpl) unmarshaller.unmarshal(
                    portletDocument);

            // refill structure with necessary information
            Vector structure = new Vector();
            structure.add(webModule);
View Full Code Here


                unmarshallerWeb.setIgnoreExtraElements(true);
                unmarshallerWeb.setIgnoreExtraAttributes(true);
                // modified by YCLI: END

                webApp =
                    (WebApplicationDefinitionImpl) unmarshallerWeb.unmarshal(
                        webDocument);
            } else {
                webApp = new WebApplicationDefinitionImpl();
                DisplayNameImpl dispName = new DisplayNameImpl();
                dispName.setDisplayName(webModule);
View Full Code Here

            Unmarshaller unmarshaller = new Unmarshaller(mapping);
            unmarshaller.setEntityResolver(new EntityResolverImpl());
            unmarshaller.setIgnoreExtraElements(getIgnoreExtraElements());
            if(is!=null) {
                InputStreamReader in = new InputStreamReader(is);
                object = unmarshaller.unmarshal(in);
            }
        }
        catch(Exception me) {
            me.printStackTrace();
            throw new IOException(me.getMessage());
View Full Code Here

    public Object getObject(InputStream stream, Map parameters) throws ConverterException {
        try {
            ReferenceFieldHandler.setObjectMap((Map)parameters.get("objectmap"));
            Unmarshaller unmarshaller = new Unmarshaller((Mapping)this.mappings.get(parameters.get("profiletype")));
            Object result = unmarshaller.unmarshal(new InputSource(stream));
            stream.close();
            return result;
        } catch (MappingException e) {
            throw new ConverterException("can't create Unmarshaller", e);
        } catch (Exception e) {
View Full Code Here

      BufferedReader reader = new BufferedReader(new InputStreamReader(stream));

      Unmarshaller unmarshaller = context.createUnmarshaller();
      unmarshaller.setClass(NamedQueries.class);
     
      namedQueries = (NamedQueries) unmarshaller.unmarshal(reader);
  }
 
  public String getQuery(String name) {
    for (NamedQueryRecord namedQueryRecord : namedQueries.getNamedQueryRecord()) {
      if (namedQueryRecord.getName().equals(name)) {
View Full Code Here

   
   
    public static OzoneClassDescriptor xml2Descriptor( InputSource _source ) throws Exception {
        Unmarshaller umrs = new Unmarshaller( OzoneClassDescriptor.class );
        //umrs.setLogWriter( logger );
        return (OzoneClassDescriptor)umrs.unmarshal( _source );
    }
   
   
    /**
     * Build OzoneClassDescriptor for the given class.
View Full Code Here

      Unmarshaller unmarshaller = xmlContext.createUnmarshaller();
      unmarshaller.setClass(TxnResult.class);
     
      StringReader stream = new StringReader(response);
      BufferedReader reader = new BufferedReader(stream);
      TxnResult result = (TxnResult) unmarshaller.unmarshal(reader);
      return result;
  }

}
View Full Code Here

      BufferedReader reader = new BufferedReader(new InputStreamReader(stream));

      Unmarshaller unmarshaller = new Unmarshaller(Persistence.class);
      unmarshaller.setMapping(mapping);

      persistence = (Persistence) unmarshaller.unmarshal(reader);
  }
 
  public Persistence getPersistence() {
    return persistence;
  }
View Full Code Here

      Unmarshaller unmarshaller = xmlContext.createUnmarshaller();
      unmarshaller.setClass(Result.class);
     
      StringReader stream = new StringReader(response);
      BufferedReader reader = new BufferedReader(stream);
      Result result = (Result) unmarshaller.unmarshal(reader);
      return result;
  }

}
View Full Code Here

  public ItemSimple fromImport(String input) throws Exception {
    Unmarshaller unmarshaller = xmlContext.createUnmarshaller();
    unmarshaller.setClass(ItemSimple.class);
    StringReader reader = new StringReader(input);
    ItemSimple itemSimple = (ItemSimple) unmarshaller.unmarshal(reader);
    return itemSimple;
  }

  public String[] validate(String input) throws Exception {
    String[] messages = {};
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.