| Classes in this File | Line Coverage | Branch Coverage | Complexity | |||||||
| Param |
|
| 1.0;1 |
| 1 | /* |
|
| 2 | * Licensed to the Apache Software Foundation (ASF) under one or more |
|
| 3 | * contributor license agreements. See the NOTICE file distributed with |
|
| 4 | * this work for additional information regarding copyright ownership. |
|
| 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 |
|
| 6 | * (the "License"); you may not use this file except in compliance with |
|
| 7 | * the License. You may obtain a copy of the License at |
|
| 8 | * |
|
| 9 | * http://www.apache.org/licenses/LICENSE-2.0 |
|
| 10 | * |
|
| 11 | * Unless required by applicable law or agreed to in writing, software |
|
| 12 | * distributed under the License is distributed on an "AS IS" BASIS, |
|
| 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
| 14 | * See the License for the specific language governing permissions and |
|
| 15 | * limitations under the License. |
|
| 16 | */ |
|
| 17 | package org.apache.commons.scxml.model; |
|
| 18 | ||
| 19 | import java.io.Serializable; |
|
| 20 | import java.util.Map; |
|
| 21 | ||
| 22 | /** |
|
| 23 | * The class in this SCXML object model that corresponds to the |
|
| 24 | * <param> SCXML element. |
|
| 25 | * |
|
| 26 | */ |
|
| 27 | public class Param implements NamespacePrefixesHolder, Serializable { |
|
| 28 | ||
| 29 | /** |
|
| 30 | * Serial version UID. |
|
| 31 | */ |
|
| 32 | private static final long serialVersionUID = 1L; |
|
| 33 | ||
| 34 | /** |
|
| 35 | * The param name. |
|
| 36 | */ |
|
| 37 | private String name; |
|
| 38 | ||
| 39 | /** |
|
| 40 | * The param expression, may be null. |
|
| 41 | */ |
|
| 42 | private String expr; |
|
| 43 | ||
| 44 | /** |
|
| 45 | * The current XML namespaces in the SCXML document for this action node, |
|
| 46 | * preserved for deferred XPath evaluation. |
|
| 47 | */ |
|
| 48 | private Map namespaces; |
|
| 49 | ||
| 50 | /** |
|
| 51 | * Default no-args constructor for Digester. |
|
| 52 | */ |
|
| 53 | 2 | public Param() { |
| 54 | 2 | name = null; |
| 55 | 2 | expr = null; |
| 56 | 2 | } |
| 57 | /** |
|
| 58 | * Get the name for this param. |
|
| 59 | * |
|
| 60 | * @return String The param name. |
|
| 61 | */ |
|
| 62 | public final String getName() { |
|
| 63 | 4 | return name; |
| 64 | } |
|
| 65 | ||
| 66 | /** |
|
| 67 | * Set the name for this param. |
|
| 68 | * |
|
| 69 | * @param name The param name. |
|
| 70 | */ |
|
| 71 | public final void setName(final String name) { |
|
| 72 | 2 | this.name = name; |
| 73 | 2 | } |
| 74 | ||
| 75 | /** |
|
| 76 | * Get the expression for this param value. |
|
| 77 | * |
|
| 78 | * @return String The expression for this param value. |
|
| 79 | */ |
|
| 80 | public final String getExpr() { |
|
| 81 | 4 | return expr; |
| 82 | } |
|
| 83 | ||
| 84 | /** |
|
| 85 | * Set the expression for this param value. |
|
| 86 | * |
|
| 87 | * @param expr The expression for this param value. |
|
| 88 | */ |
|
| 89 | public final void setExpr(final String expr) { |
|
| 90 | 2 | this.expr = expr; |
| 91 | 2 | } |
| 92 | ||
| 93 | /** |
|
| 94 | * Get the XML namespaces at this action node in the SCXML document. |
|
| 95 | * |
|
| 96 | * @return Returns the map of namespaces. |
|
| 97 | */ |
|
| 98 | public final Map getNamespaces() { |
|
| 99 | 2 | return namespaces; |
| 100 | } |
|
| 101 | ||
| 102 | /** |
|
| 103 | * Set the XML namespaces at this action node in the SCXML document. |
|
| 104 | * |
|
| 105 | * @param namespaces The document namespaces. |
|
| 106 | */ |
|
| 107 | public final void setNamespaces(final Map namespaces) { |
|
| 108 | 2 | this.namespaces = namespaces; |
| 109 | 2 | } |
| 110 | ||
| 111 | } |
|
| 112 |