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 
18 /* $Id: MultiPropertySet.java 1681384 2015-05-23 21:07:13Z adelmelle $ */
19 
20 package org.apache.fop.fo.flow;
21 
22 // XML
23 import org.xml.sax.Locator;
24 
25 import org.apache.fop.apps.FOPException;
26 import org.apache.fop.fo.FONode;
27 import org.apache.fop.fo.FObj;
28 import org.apache.fop.fo.PropertyList;
29 import org.apache.fop.fo.ValidationException;
30 
31 /**
32  * Class modelling the <a href="http://www.w3.org/TR/xsl/#fo_multi-property-set">
33  * <code>fo:multi-property-set</code></a> object.
34  */
35 public class MultiPropertySet extends FObj {
36     // The value of properties relevant for fo:multi-property-set.
37     // private ToBeImplementedProperty activeState;
38     // End of property values
39 
40     private static boolean notImplementedWarningGiven;
41 
42     /**
43      * Base constructor
44      *
45      * @param parent {@link FONode} that is the parent of this object
46      */
MultiPropertySet(FONode parent)47     public MultiPropertySet(FONode parent) {
48         super(parent);
49 
50         if (!notImplementedWarningGiven) {
51             getFOValidationEventProducer().unimplementedFeature(this, getName(),
52                     getName(), getLocator());
53             // @SuppressFBWarnings("ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD")
54             notImplementedWarningGiven = true;
55         }
56     }
57 
58     /** {@inheritDoc} */
bind(PropertyList pList)59     public void bind(PropertyList pList) throws FOPException {
60         super.bind(pList);
61         // activeState = pList.get(PR_ACTIVE_STATE);
62     }
63 
64     /**
65      * {@inheritDoc}
66      * <br>XSL Content Model: empty
67      */
validateChildNode(Locator loc, String nsURI, String localName)68     protected void validateChildNode(Locator loc, String nsURI, String localName)
69                 throws ValidationException {
70         if (FO_URI.equals(nsURI)) {
71             invalidChildError(loc, nsURI, localName);
72         }
73     }
74 
75     /** {@inheritDoc} */
getLocalName()76     public String getLocalName() {
77         return "multi-property-set";
78     }
79 
80     /**
81      * {@inheritDoc}
82      * @return {@link org.apache.fop.fo.Constants#FO_MULTI_PROPERTY_SET}
83      */
getNameId()84     public int getNameId() {
85         return FO_MULTI_PROPERTY_SET;
86     }
87 }
88