Package org.exolab.castor.mapping

Examples of org.exolab.castor.mapping.Mapping$IncludeListener


   */
  public void saveConfig(String filename) {
    File f1 = new File(mappingfile);

    if (f1.exists()) {
      Mapping mapping = new Mapping();
      try {
  mapping.loadMapping(mappingfile);
  Writer writer = new FileWriter(filename);
  Marshaller marshaller = new Marshaller(writer);
  marshaller.setMapping(mapping);
  marshaller.marshal(this);
  writer.close();
View Full Code Here


    File f1 = new File(configDirectory+File.separatorChar+mappingfile);
    File f2 = new File(configDirectory+File.separatorChar+xmlconfig);

    if (f1.exists() && f2.exists()) {
      Mapping mapping = new Mapping();
      try {
  mapping.loadMapping(f1.getPath());
  Unmarshaller unmar = new Unmarshaller(mapping);
  unmar.setDebug(true);
  baseobj=(JoBoBase)unmar.unmarshal(new InputSource(f2.getPath()));
 
  log.info("configured from XML");
View Full Code Here

     * @throws MappingException
     */
    public CastorAdapter(String pathToMappingFile) throws IOException, MappingException
    {
        this();
        _mapping = new Mapping();
        _mapping.loadMapping( pathToMappingFile );
        initCastor( false );
    }
View Full Code Here

     * @throws MappingException
     */
    public CastorAdapter(URL pathToMappingFile) throws IOException, MappingException
    {
        this();
        _mapping = new Mapping();
        _mapping.loadMapping( pathToMappingFile );
        initCastor( false );
    }
View Full Code Here

  public Test( PrintWriter writer )
    throws Exception
  {
    // Load the mapping file
    _mapping = new Mapping( getClass().getClassLoader() );
    _mapping.setLogWriter( writer );
    _mapping.loadMapping( getClass().getResource( MappingFile ) );

    _jdo = new JDO();
    _jdo.setLogWriter( writer );
View Full Code Here

   
    try
    {
      mis = JRLoader.getLocationInputStream(MAPPING_FILE);

      Mapping mapping = new Mapping();
      mapping.loadMapping(
        new InputSource(mis)
        );
     
      Unmarshaller unmarshaller = new Unmarshaller(mapping);
      settings =
View Full Code Here

    {
      mis = JRLoader.getLocationInputStream(MAPPING_FILE);

      Marshaller marshaller = new Marshaller(writer);

      Mapping mapping = new Mapping();
      mapping.loadMapping(
        new InputSource(mis)
        );
      marshaller.setMapping(mapping);

      marshaller.marshal(settings);
View Full Code Here

      factory.setNamespaceAware(true);

      XMLReader parser = factory.newSAXParser().getXMLReader();
      parser.setEntityResolver(xmlCatalog);

      Mapping mapping = new Mapping();
      mapping.loadMapping(new InputSource(ExtendedGrammar.class.getResource("mapping.xml")
                                                               .openStream()));

      Unmarshaller unmarshaller = new Unmarshaller(ExtendedGrammar.class);
      unmarshaller.setMapping(mapping);
View Full Code Here

public class DiagramGenerator
{
  public static void main(String[] args) throws Exception
  {
    Mapping mapping = new Mapping();
    mapping.loadMapping(new InputSource(ExtendedGrammar.class.getResource("mapping.xml").openStream()));

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

    ExtendedGrammar grammar =
View Full Code Here

  {
    NodeList list =
      step.getElementsByTagNameNS("http://chaperon.sourceforge.net/schema/grammar/2.0", "grammar");
    Node node = list.item(0);

    Mapping mapping = new Mapping();
    mapping.loadMapping(new InputSource(ExtendedGrammar.class.getResource("mapping.xml").openStream()));

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

    ExtendedGrammar grammar = (ExtendedGrammar)unmarshaller.unmarshal(node);
View Full Code Here

TOP

Related Classes of org.exolab.castor.mapping.Mapping$IncludeListener

Copyright © 2018 www.massapicom. 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.