001: /*
002: * Licensed to the Apache Software Foundation (ASF) under one or more
003: * contributor license agreements. See the NOTICE file distributed with
004: * this work for additional information regarding copyright ownership.
005: * The ASF licenses this file to You under the Apache License, Version 2.0
006: * (the "License"); you may not use this file except in compliance with
007: * the License. You may obtain a copy of the License at
008: *
009: * http://www.apache.org/licenses/LICENSE-2.0
010: *
011: * Unless required by applicable law or agreed to in writing, software
012: * distributed under the License is distributed on an "AS IS" BASIS,
013: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014: * See the License for the specific language governing permissions and
015: * limitations under the License.
016: */
017: package org.apache.commons.scxml.model;
018:
019: import java.io.Serializable;
020: import java.util.Map;
021:
022: /**
023: * The class in this SCXML object model that corresponds to the
024: * <param> SCXML element.
025: *
026: */
027: public class Param implements NamespacePrefixesHolder, Serializable {
028:
029: /**
030: * Serial version UID.
031: */
032: private static final long serialVersionUID = 1L;
033:
034: /**
035: * The param name.
036: */
037: private String name;
038:
039: /**
040: * The param expression, may be null.
041: */
042: private String expr;
043:
044: /**
045: * The current XML namespaces in the SCXML document for this action node,
046: * preserved for deferred XPath evaluation.
047: */
048: private Map namespaces;
049:
050: /**
051: * Default no-args constructor for Digester.
052: */
053: public Param() {
054: name = null;
055: expr = null;
056: }
057:
058: /**
059: * Get the name for this param.
060: *
061: * @return String The param name.
062: */
063: public final String getName() {
064: return name;
065: }
066:
067: /**
068: * Set the name for this param.
069: *
070: * @param name The param name.
071: */
072: public final void setName(final String name) {
073: this .name = name;
074: }
075:
076: /**
077: * Get the expression for this param value.
078: *
079: * @return String The expression for this param value.
080: */
081: public final String getExpr() {
082: return expr;
083: }
084:
085: /**
086: * Set the expression for this param value.
087: *
088: * @param expr The expression for this param value.
089: */
090: public final void setExpr(final String expr) {
091: this .expr = expr;
092: }
093:
094: /**
095: * Get the XML namespaces at this action node in the SCXML document.
096: *
097: * @return Returns the map of namespaces.
098: */
099: public final Map getNamespaces() {
100: return namespaces;
101: }
102:
103: /**
104: * Set the XML namespaces at this action node in the SCXML document.
105: *
106: * @param namespaces The document namespaces.
107: */
108: public final void setNamespaces(final Map namespaces) {
109: this.namespaces = namespaces;
110: }
111:
112: }
|