Package com.volantis.synergetics.cornerstone.stack

Examples of com.volantis.synergetics.cornerstone.stack.ArrayListStack


     */
    private State state;

    public ValidationProcess(
            State state, int expectedDepth, final String usage) {
        elements = new ArrayListStack(expectedDepth);
        this.state = state;
        this.usage = usage;
    }
View Full Code Here


     * @param compiledSchema The compiled schema against which this will
     *                       validate.
     */
    public DocumentValidatorImpl(CompiledSchemaInternal compiledSchema) {
        this.compiledSchema = compiledSchema;
        elementValidatorStack = new ArrayListStack();
        precedingContent = PrecedingContent.NOT_PCDATA;
    }
View Full Code Here

    // Javadoc inherited.
    public DefinitionScope beginDefinitionScope(DefinitionType definitionType) {

        Stack scopeStack = (Stack) type2ScopeStack.get(definitionType);
        if (scopeStack == null) {
            scopeStack = new ArrayListStack();
            type2ScopeStack.put(definitionType, scopeStack);
        }
        DefinitionScope scope = new DefinitionScopeImpl(definitionType);
        scopeStack.push(scope);
        return scope;
View Full Code Here

    /**
     * Initialise.
     */
    public StyleSheetStack() {
        stack = new ArrayListStack();
    }
View Full Code Here

    /**
     * Initialise.
     */
    public ElementStack() {
        stack = new ArrayListStack();
    }
View Full Code Here

public class ProjectStack {

    private final Stack stack;

    public ProjectStack() {
        stack = new ArrayListStack();
    }
View Full Code Here

public class BaseURLTracker implements BaseURLProvider {

    private final Stack stack;

    public BaseURLTracker(MarinerURL initialURL) {
        stack = new ArrayListStack();
        if (initialURL != null) {
            stack.push(initialURL);
        }
    }
View Full Code Here

      //      ContextInternals.getMarinerPageContext(getCurrentRequestContext());
      //  contentHandlers =
      //      pageContext.getVolantisBean().getNamespaceSwitchContentHandlerMap();

        contentHandlers = NamespaceSwitchContentHandlerMap.getInstance();                     
        stateStack = new ArrayListStack();
        cachedContentHandlers = new HashMap();

        // initialize the marlin-cdm namespace with the default handler
        cachedContentHandlers.put(XDIMESchemata.CDM_NAMESPACE, defaultHandler);
    }
View Full Code Here

    private void debugNode(Node node, String message) {
        if (logger.isDebugEnabled()) {

            // Calculate the path to this element for debugging.
            Node parent = node;
            Stack stack = new ArrayListStack();
            do {
                stack.push(parent);
                parent = parent.getParent();
            } while (parent != null);

            // Remove the fake parent node if there is one.
            Node top = (Node) stack.peek();
            if (top instanceof Element && ((Element) top).getName() == null) {
                stack.pop();
            }

            StringBuffer path = new StringBuffer();
            while (!stack.isEmpty()) {
                Node pathNode = (Node) stack.pop();

                if (pathNode instanceof Element) {
                    final String name = ((Element) pathNode).getName();
                    path.append(name);
                } else {
                    path.append("(text)");
                }

                // Count the next and previous nodes
                int nextCount = 0;
                Node next = pathNode.getNext();
                while (next != null) {
                    nextCount++;
                    next = next.getNext();
                }
                int previousCount = 0;
                Node previous = pathNode.getPrevious();
                while (previous != null) {
                    previousCount++;
                    previous = previous.getPrevious();
                }
                int position = previousCount + 1;
                int total = position + nextCount;
                path.append("[").append(position).append(":").append(total)
                        .append("]");

                if (!stack.isEmpty()) {
                    path.append(" -> ");
                }
            }

            logger.debug(
View Full Code Here

TOP

Related Classes of com.volantis.synergetics.cornerstone.stack.ArrayListStack

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.