|
|
|
|
|
*/ |
|
/* |
|
* Licensed to the Apache Software Foundation (ASF) under one or more |
|
* contributor license agreements. See the NOTICE file distributed with |
|
* this work for additional information regarding copyright ownership. |
|
* The ASF licenses this file to You under the Apache License, Version 2.0 |
|
* (the "License"); you may not use this file except in compliance with |
|
* the License. You may obtain a copy of the License at |
|
* |
|
* http://www.apache.org/licenses/LICENSE-2.0 |
|
* |
|
* Unless required by applicable law or agreed to in writing, software |
|
* distributed under the License is distributed on an "AS IS" BASIS, |
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
* See the License for the specific language governing permissions and |
|
* limitations under the License. |
|
*/ |
|
|
|
|
|
package com.sun.org.apache.xerces.internal.impl.xs.models; |
|
|
|
import com.sun.org.apache.xerces.internal.impl.xs.SubstitutionGroupHandler; |
|
import com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaException; |
|
import com.sun.org.apache.xerces.internal.xni.QName; |
|
import java.util.ArrayList; |
|
import java.util.List; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
*/ |
|
public class XSEmptyCM implements XSCMValidator { |
|
|
|
// |
|
// Constants |
|
// |
|
|
|
|
|
private static final short STATE_START = 0; |
|
|
|
private static final List<Object> EMPTY = new ArrayList<>(0); |
|
|
|
// |
|
// Data |
|
// |
|
|
|
// |
|
// XSCMValidator methods |
|
// |
|
|
|
|
|
|
|
|
|
|
|
|
|
*/ |
|
public int[] startContentModel(){ |
|
return (new int[] {STATE_START}); |
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
*/ |
|
public Object oneTransition (QName elementName, int[] currentState, SubstitutionGroupHandler subGroupHandler){ |
|
|
|
|
|
if (currentState[0] < 0) { |
|
currentState[0] = XSCMValidator.SUBSEQUENT_ERROR; |
|
return null; |
|
} |
|
|
|
currentState[0] = XSCMValidator.FIRST_ERROR; |
|
return null; |
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
*/ |
|
public boolean endContentModel (int[] currentState){ |
|
boolean isFinal = false; |
|
int state = currentState[0]; |
|
|
|
// restore content model state: |
|
|
|
|
|
if (state < 0) { |
|
return false; |
|
} |
|
|
|
|
|
return true; |
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
*/ |
|
public boolean checkUniqueParticleAttribution(SubstitutionGroupHandler subGroupHandler) throws XMLSchemaException { |
|
return false; |
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
*/ |
|
public List<Object> whatCanGoHere(int[] state) { |
|
return EMPTY; |
|
} |
|
|
|
public List<String> checkMinMaxBounds() { |
|
return null; |
|
} |
|
|
|
public int [] occurenceInfo(int[] state) { |
|
return null; |
|
} |
|
|
|
public String getTermName(int termId) { |
|
return null; |
|
} |
|
|
|
public boolean isCompactedForUPA() { |
|
return false; |
|
} |
|
} // class XSEmptyCM |