All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.apache.maven.doxia.module.itext.SinkActionContext Maven / Gradle / Ivy

Go to download

A Doxia module for iText source documents. iText format is only supported as target format.

There is a newer version: 1.12.0
Show newest version
package org.apache.maven.doxia.module.itext;

/*
 * 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.
 */

import java.util.Stack;

/**
 * 

SinkActionContext class.

* * @author Jason van Zyl * @version $Id: SinkActionContext.java 1438263 2013-01-24 23:28:22Z olamy $ */ public class SinkActionContext { /** Constant TITLE=0 */ public static final int TITLE = 0; /** Constant AUTHOR=1 */ public static final int AUTHOR = 1; /** Constant DATE=2 */ public static final int DATE = 2; /** Constant HEAD=3 */ public static final int HEAD = 3; /** Constant BODY=4 */ public static final int BODY = 4; /** Constant SECTION_TITLE=10 */ public static final int SECTION_TITLE = 10; /** Constant SECTION_TITLE_1=11 */ public static final int SECTION_TITLE_1 = 11; /** Constant SECTION_TITLE_2=12 */ public static final int SECTION_TITLE_2 = 12; /** Constant SECTION_TITLE_3=13 */ public static final int SECTION_TITLE_3 = 13; /** Constant SECTION_TITLE_4=14 */ public static final int SECTION_TITLE_4 = 14; /** Constant SECTION_TITLE_5=15 */ public static final int SECTION_TITLE_5 = 15; /** Constant SECTION_1=20 */ public static final int SECTION_1 = 20; /** Constant SECTION_2=21 */ public static final int SECTION_2 = 21; /** Constant SECTION_3=22 */ public static final int SECTION_3 = 22; /** Constant SECTION_4=23 */ public static final int SECTION_4 = 23; /** Constant SECTION_5=24 */ public static final int SECTION_5 = 24; /** Constant DEFINITION_LIST=30 */ public static final int DEFINITION_LIST = 30; /** Constant DEFINITION_LIST_ITEM=31 */ public static final int DEFINITION_LIST_ITEM = 31; /** Constant DEFINED_TERM=32 */ public static final int DEFINED_TERM = 32; /** Constant LIST_ITEM=40 */ public static final int LIST_ITEM = 40; /** Constant NUMBERED_LIST_ITEM=41 */ public static final int NUMBERED_LIST_ITEM = 41; /** Constant NUMBERED_LIST=42 */ public static final int NUMBERED_LIST = 42; /** Constant DEFINITION=43 */ public static final int DEFINITION = 43; /** Constant PARAGRAPH=44 */ public static final int PARAGRAPH = 44; /** Constant LIST=45 */ public static final int LIST = 45; /** Constant TABLE=50 */ public static final int TABLE = 50; /** Constant TABLE_CAPTION=51 */ public static final int TABLE_CAPTION = 51; /** Constant TABLE_CELL=52 */ public static final int TABLE_CELL = 52; /** Constant TABLE_HEADER_CELL=53 */ public static final int TABLE_HEADER_CELL = 53; /** Constant TABLE_ROW=54 */ public static final int TABLE_ROW = 54; /** Constant TABLE_ROWS=55 */ public static final int TABLE_ROWS = 55; /** Constant VERBATIM=60 */ public static final int VERBATIM = 60; /** Constant FIGURE=70 */ public static final int FIGURE = 70; /** Constant FIGURE_CAPTION=71 */ public static final int FIGURE_CAPTION = 71; /** Constant FIGURE_GRAPHICS=72 */ public static final int FIGURE_GRAPHICS = 72; /** Constant LINK=80 */ public static final int LINK = 80; /** Constant ANCHOR=81 */ public static final int ANCHOR = 81; /** Constant UNDEFINED=82 */ public static final int UNDEFINED = 82; private Stack stack = new Stack(); private int currentAction; /** *

Getter for the field currentAction.

* * @return a int. */ public int getCurrentAction() { //return currentAction; if ( stack.empty() ) { return UNDEFINED; } else { return stack.peek().intValue(); } } /** * release. */ public void release() { //currentAction = -1; stack.pop(); } /** * setAction. * * @param action a int. */ public void setAction( int action ) { //currentAction = action; stack.push( Integer.valueOf( action ) ); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy