01: /*
02: * $Id: AbstractObjectCreationFactory.java,v 1.5 2004/12/09 12:34:15 kowap Exp $
03: *
04: * Copyright (c) 2004 Patric Fornasier, Pawel Kowalski
05: * Berne University of Applied Sciences
06: * School of Engineering and Information Technology
07: * All rights reserved.
08: */
09: package bexee.model.xmltobpel;
10:
11: import org.xml.sax.Attributes;
12:
13: import bexee.model.AttributeNames;
14: import bexee.model.StandardAttributes;
15: import bexee.model.process.BPELProcess;
16:
17: /**
18: * This class should be used as superclass by all classes wishing to transform
19: * BPEL xml elements into corresponding objects. The subclasses of this class
20: * will be then used by a <a
21: * href="http://jakarta.apache.org/commons/digester/">Digester </a> for object
22: * creation (see the Digester <factory-create-rule />).
23: *
24: * @author Pawel Kowalski
25: * @version $Revision: 1.5 $, $Date: 2004/12/09 12:34:15 $
26: */
27: public abstract class AbstractObjectCreationFactory extends
28: org.apache.commons.digester.AbstractObjectCreationFactory
29: implements AttributeNames {
30:
31: //**************************************************/
32: // methods
33: //**************************************************/
34:
35: /**
36: * Get the standard BPEL attributes (name, joinCondition and
37: * suppressJoinFailure) from the <code>org.xml.sax.Attributes</code> and
38: * wrap them in a <code>StandardAttributes</code> object for further
39: * processing.
40: *
41: * @param attributes
42: * an <code>Attributes</code> value
43: * @return an <code>StandardAttributes</code> value
44: */
45: protected StandardAttributes getStandardAttributes(
46: Attributes attributes) {
47: return new StandardAttributes(attributes);
48: }
49:
50: protected BPELElementFactory getElementFactory() {
51: return BPELElementFactory
52: .getInstance((BPELProcess) getDigester().getRoot());
53: }
54: }
|