Examples of CoreProperties


Examples of org.castor.core.CoreProperties

     * user.
     *
     * @return Properties instance for Castor XML module.
     */
    public static AbstractProperties newInstance() {
        AbstractProperties core = new CoreProperties();
        AbstractProperties xml = new XMLProperties(core);
        AbstractProperties castor = new CastorProperties(xml);
        return castor;
    }
View Full Code Here

Examples of org.castor.core.CoreProperties

     * @param app Classloader to be used for all classes of Castor and its required libraries.
     * @param domain Classloader to be used for all domain objects.
     * @return Properties instance for Castor XML modul.
     */
    public static AbstractProperties newInstance(final ClassLoader app, final ClassLoader domain) {
        AbstractProperties core = new CoreProperties(app, domain);
        AbstractProperties xml = new XMLProperties(core);
        AbstractProperties castor = new CastorProperties(xml);
        return castor;
    }
View Full Code Here

Examples of org.castor.core.CoreProperties

    /**
     * Construct a new MappingUnmarshaller.
     */
    public MappingUnmarshaller() {
        _registry = new MappingLoaderRegistry(new CoreProperties());
        _idResolver = new MappingUnmarshallIDResolver();
        AbstractInternalContext internalContext = new AbstractInternalContext() { };
        internalContext.setClassLoader(getClass().getClassLoader());
       
        XMLClassDescriptorResolver cdr = (XMLClassDescriptorResolver) ClassDescriptorResolverFactory
View Full Code Here

Examples of org.castor.core.CoreProperties

* UTF test case for {@see org.castor.jdo.drivers.PointbaseFactory}.
*/
public class TestMappingLoaderRegistry extends TestCase {

    public final void testGetInstance() throws Exception {
        AbstractProperties properties = new CoreProperties();
        MappingLoaderRegistry registry = new MappingLoaderRegistry(properties);
        assertNotNull(registry);
    }
View Full Code Here

Examples of org.castor.core.CoreProperties

        MappingLoaderRegistry registry = new MappingLoaderRegistry(properties);
        assertNotNull(registry);
    }

    public final void testEnlistMappingLoaders() throws Exception {
        AbstractProperties properties = new CoreProperties();
        MappingLoaderRegistry registry = new MappingLoaderRegistry(properties);
        assertNotNull(registry);

        Collection factories = registry.getMappingLoaderFactories();
        assertNotNull(factories);
View Full Code Here

Examples of org.castor.core.CoreProperties

        assertEquals("CastorXmlMapping", factory.getSourceType());

    }

    public final void testGetXMLMappingLoader() throws Exception {
        AbstractProperties properties = new CoreProperties();
        MappingLoaderRegistry registry = new MappingLoaderRegistry(properties);
        assertNotNull(registry);

        MappingLoader mappingLoader = registry.getMappingLoader(
                "CastorXmlMapping", BindingType.XML);
View Full Code Here

Examples of org.docx4j.docProps.core.CoreProperties

        if (part instanceof DocPropsCorePart) {
         
          boolean dcWrite= Boolean.parseBoolean(
              Docx4jProperties.getProperties().getProperty("docx4j.dc.write", "false"));
          if (dcWrite) {         
            CoreProperties cp = ((DocPropsCorePart)part).getJaxbElement();
           
            // Only set creator if not already present
            String creator= Docx4jProperties.getProperties().getProperty("docx4j.dc.creator.value", "docx4j");
            if (cp.getCreator()==null) {
              org.docx4j.docProps.core.dc.elements.ObjectFactory of = new org.docx4j.docProps.core.dc.elements.ObjectFactory();
              cp.setCreator(of.createSimpleLiteral() );
              cp.getCreator().getContent().add(creator);
            }
           
            String modifier= Docx4jProperties.getProperties().getProperty("docx4j.dc.lastModifiedBy.value", "docx4j");
            cp.setLastModifiedBy(modifier);
          }
        }       
        if (part instanceof DocPropsExtendedPart) {
          boolean appWrite= Boolean.parseBoolean(
              Docx4jProperties.getProperties().getProperty("docx4j.App.write", "false"));
          if (appWrite) {
            Properties cp = ((DocPropsExtendedPart)part).getJaxbElement();
           
            cp.setApplication(
                Docx4jProperties.getProperties().getProperty("docx4j.Application", "docx4j")
                );
           
            String version = Docx4jProperties.getProperties().getProperty("docx4j.AppVersion");
            if ( version!=null ) {
              cp.setAppVersion(version);
            }
           
          }
        }
View Full Code Here

Examples of org.docx4j.docProps.core.CoreProperties

              Docx4jProperties.getProperties().getProperty("docx4j.dc.write", "false"));
          if (dcWrite) { 
           
//            p.setSourcePartStore(sourcePartStore);
           
            CoreProperties cp = ((DocPropsCorePart)part).getJaxbElement();
           
            // Only set creator if not already present
            String creator= Docx4jProperties.getProperties().getProperty("docx4j.dc.creator.value", "docx4j");
            if (cp.getCreator()==null) {
              org.docx4j.docProps.core.dc.elements.ObjectFactory of = new org.docx4j.docProps.core.dc.elements.ObjectFactory();
              cp.setCreator(of.createSimpleLiteral() );
              cp.getCreator().getContent().add(creator);
            }
           
            String modifier= Docx4jProperties.getProperties().getProperty("docx4j.dc.lastModifiedBy.value", "docx4j");
            cp.setLastModifiedBy(modifier);
           
//            p.setSourcePartStore(targetPartStore);
           
          }
        }       
        if (part instanceof DocPropsExtendedPart) {
          boolean appWrite= Boolean.parseBoolean(
              Docx4jProperties.getProperties().getProperty("docx4j.App.write", "false"));
          if (appWrite) {
//            p.setSourcePartStore(sourcePartStore);

            Properties cp = ((DocPropsExtendedPart)part).getJaxbElement();
           
            cp.setApplication(
                Docx4jProperties.getProperties().getProperty("docx4j.Application", "docx4j")
                );
           
            String version = Docx4jProperties.getProperties().getProperty("docx4j.AppVersion");
            if ( version!=null ) {
              cp.setAppVersion(version);
            }

//            p.setSourcePartStore(targetPartStore);           
          }
        }
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.