Package org.exolab.castor.xml

Examples of org.exolab.castor.xml.XMLContext.addPackage()


                  && (node.getLocalName().equals(JDOConstants.ANNOTATIONS_TABLE_NAME)
                          || node.getLocalName().equals(JDOConstants.ANNOTATIONS_COLUMN_NAME)
                          || node.getLocalName().equals(JDOConstants.ANNOTATIONS_ONE_TO_ONE_NAME)
                          || node.getLocalName().equals(JDOConstants.ANNOTATIONS_ONE_TO_MANY))) {
              XMLContext context = new XMLContext();
              context.addPackage(JDOConstants.GENERATED_ANNOTATION_CLASSES_PACKAGE);
              Unmarshaller unmarshaller = context.createUnmarshaller();              
              unmarshaller.setClassLoader(getClass().getClassLoader());
              _appInfo.getJdoContent().add(unmarshaller.unmarshal(node));
          }           
          //-- add to appInfo
View Full Code Here


    }

    public void testLoadPackage() {
        try {
            XMLContext context = new XMLContext();
            context.addPackage("org.castor.xmlctf.bestpractise.genpackage");
            // context.getInternalContext().getXMLClassDescriptorResolver().getDescriptorCache();
            Unmarshaller u = context.createUnmarshaller();
            InputStream stream = this.getClass().getClassLoader().getResourceAsStream("genpackage-input.xml");
            Assert.assertNotNull("InputStream must not be null", stream);
            InputSource is = new InputSource(stream);
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.