Package at.tuwien.minimee.registry.xml

Source Code of at.tuwien.minimee.registry.xml.PreservationActionServiceFactory

/*******************************************************************************
* Copyright (c) 2006-2010 Vienna University of Technology,
* Department of Software Technology and Interactive Systems
*
* All rights reserved. This program and the accompanying
* materials are made available under the terms of the
* Apache License, Version 2.0 which accompanies
* this distribution, and is available at
* http://www.apache.org/licenses/LICENSE-2.0
*******************************************************************************/
package at.tuwien.minimee.registry.xml;

import org.apache.commons.digester.AbstractObjectCreationFactory;
import org.xml.sax.Attributes;

import at.tuwien.minimee.registry.PreservationActionService;

/**
* Helper class for digesting a minimee configuration XML file
*/
public class PreservationActionServiceFactory extends AbstractObjectCreationFactory {

    @Override
    public Object createObject(Attributes arg0) throws Exception {
        PreservationActionService service = new PreservationActionService();
        String type = arg0.getValue("type");
        service.setMigration(!"emulation".equals(type));
       
        return service;
    }

}
TOP

Related Classes of at.tuwien.minimee.registry.xml.PreservationActionServiceFactory

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.