1 /**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements.  See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership.  The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License.  You may obtain a copy of the License at
10 *
11 *   http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied.  See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 *
20 *************************************************************/
21 
22 package org.apache.openoffice.ooxml.schema.simple;
23 
24 import java.util.Map;
25 
26 import org.apache.openoffice.ooxml.schema.misc.Log;
27 import org.apache.openoffice.ooxml.schema.model.simple.BuiltInType;
28 import org.apache.openoffice.ooxml.schema.model.simple.Restriction;
29 
30 public class DateTimeNode
31     implements ISimpleTypeNode
32 {
33 
DateTimeNode(final BuiltInType eType)34     public DateTimeNode (final BuiltInType eType)
35     {
36         mbIsList = false;
37     }
38 
39 
40 
41 
42     @Override
ApplyRestriction( final Restriction aRestriction, final Map<String,Integer> aValueToIdMap)43     public void ApplyRestriction (
44         final Restriction aRestriction,
45         final Map<String,Integer> aValueToIdMap)
46     {
47         if (aRestriction.GetFeatureBits() == 0)
48             return;
49         System.out.println(aRestriction);
50     }
51 
52 
53 
54 
55     @Override
Print(final Log aLog)56     public void Print (final Log aLog)
57     {
58         aLog.printf("date or time\n");
59     }
60 
61 
62 
63 
64     @Override
IsList()65     public boolean IsList ()
66     {
67         return mbIsList;
68     }
69 
70 
71 
72 
73     @Override
SetIsList()74     public void SetIsList ()
75     {
76         mbIsList = true;
77     }
78 
79 
80 
81 
82     @Override
AcceptVisitor(final ISimpleTypeNodeVisitor aVisitor)83     public void AcceptVisitor (final ISimpleTypeNodeVisitor aVisitor)
84     {
85         aVisitor.Visit(this);
86     }
87 
88 
89 
90 
91     private boolean mbIsList;
92 }
93