Package info.bliki.wiki.model

Examples of info.bliki.wiki.model.IContext


  }

  @Override
  public String parseFunction(List<String> list, IWikiModel model, char[] src, int beginIndex, int endIndex, boolean isSubst) throws IOException {
    if (model instanceof IContext) {
      IContext context = (IContext) model;
      if (list.size() > 0) {
        // name of the attribute
        String attribute = parseTrim(list.get(0), model);
        if (attribute.length() > 0) {
          String formatString = null;
          String separatorString = null;
          String nullvalueString = null;
          if (list.size() > 1) {
            // format string of the attribute
            formatString = parseTrim(list.get(1), model);
          }
          if (list.size() > 2) {
            separatorString = parseTrim(list.get(2), model);
            if (separatorString.length() > 1) {
              int begin = 0;
              int end = separatorString.length();
              if (separatorString.charAt(0) == '\'') {
                begin = 1;
                if (separatorString.charAt(end - 1) == '\'') {
                  end--;
                } else {
                  begin = 0;
                }
              }
              separatorString = separatorString.substring(begin, end);
            }
          }
          if (list.size() > 3) {
            nullvalueString = parseTrim(list.get(3), model);
          }
          // get the assigned value of the attribute
          Object value = context.getAttribute(attribute);
          if (value != null) {
            StringBuilder builder;
            if (value instanceof AttributeList && ((AttributeList) value).size() > 0) {
              // multiple attribute values assigned
              AttributeList attrList = (AttributeList) value;
View Full Code Here


  }

  public String parseFunction(char[] src, int beginIndex, int endIndex, IWikiModel model) throws IOException {
    if (model instanceof IContext) {
      IContext context = (IContext) model;
      List<String> list = new ArrayList<String>();
      WikipediaScanner.splitByPipe(src, beginIndex, endIndex, list);
      if (list.size() > 0) {
        // name of the attribute
        String attribute = parse(list.get(0), model);
        if (attribute.length() > 0) {
          String formatString = null;
          String separatorString = null;
          String nullvalueString = null;
          if (list.size() > 1) {
            // format string of the attribute
            formatString = parse(list.get(1), model);
          }
          if (list.size() > 2) {
            separatorString = parse(list.get(2), model);
            if (separatorString.length() > 1) {
              int begin = 0;
              int end = separatorString.length();
              if (separatorString.charAt(0) == '\'') {
                begin = 1;
                if (separatorString.charAt(end - 1) == '\'') {
                  end--;
                } else {
                  begin = 0;
                }
              }
              separatorString = separatorString.substring(begin, end);
            }
          }
          if (list.size() > 3) {
            nullvalueString = parse(list.get(3), model);
          }
          // get the assigned value of the attribute
          Object value = context.getAttribute(attribute);
          if (value != null) {
            AttributeRenderer renderer;
            StringBuilder builder;
            if (value instanceof AttributeList && ((AttributeList) value).size() > 0) {
              // multiple attribute values assigned
View Full Code Here

  }

  @Override
  public String parseFunction(List<String> list, IWikiModel model, char[] src, int beginIndex, int endIndex, boolean isSubst) throws IOException {
    if (model instanceof IContext) {
      IContext context = (IContext) model;
      if (list.size() > 0) {
        // name of the attribute
        String attribute = parseTrim(list.get(0), model);
        if (attribute.length() > 0) {
          String formatString = null;
          String separatorString = null;
          String nullvalueString = null;
          if (list.size() > 1) {
            // format string of the attribute
            formatString = parseTrim(list.get(1), model);
          }
          if (list.size() > 2) {
            separatorString = parseTrim(list.get(2), model);
            if (separatorString.length() > 1) {
              int begin = 0;
              int end = separatorString.length();
              if (separatorString.charAt(0) == '\'') {
                begin = 1;
                if (separatorString.charAt(end - 1) == '\'') {
                  end--;
                } else {
                  begin = 0;
                }
              }
              separatorString = separatorString.substring(begin, end);
            }
          }
          if (list.size() > 3) {
            nullvalueString = parseTrim(list.get(3), model);
          }
          // get the assigned value of the attribute
          Object value = context.getAttribute(attribute);
          if (value != null) {
            StringBuilder builder;
            if (value instanceof AttributeList && ((AttributeList) value).size() > 0) {
              // multiple attribute values assigned
              AttributeList attrList = (AttributeList) value;
View Full Code Here

    }

    @Override
    public String parseFunction(List<String> list, IWikiModel model, char[] src, int beginIndex, int endIndex, boolean isSubst) throws IOException {
        if (model instanceof IContext) {
            IContext context = (IContext) model;
            if (list.size() > 0) {
                // name of the attribute
                String attribute = parseTrim(list.get(0), model);
                if (attribute.length() > 0) {
                    String formatString = null;
                    String separatorString = null;
                    String nullvalueString = null;
                    if (list.size() > 1) {
                        // format string of the attribute
                        formatString = parseTrim(list.get(1), model);
                    }
                    if (list.size() > 2) {
                        separatorString = parseTrim(list.get(2), model);
                        if (separatorString.length() > 1) {
                            int begin = 0;
                            int end = separatorString.length();
                            if (separatorString.charAt(0) == '\'') {
                                begin = 1;
                                if (separatorString.charAt(end - 1) == '\'') {
                                    end--;
                                } else {
                                    begin = 0;
                                }
                            }
                            separatorString = separatorString.substring(begin, end);
                        }
                    }
                    if (list.size() > 3) {
                        nullvalueString = parseTrim(list.get(3), model);
                    }
                    // get the assigned value of the attribute
                    Object value = context.getAttribute(attribute);
                    if (value != null) {
                        StringBuilder builder;
                        if (value instanceof AttributeList && ((AttributeList) value).size() > 0) {
                            // multiple attribute values assigned
                            AttributeList attrList = (AttributeList) value;
View Full Code Here

  }

  public String parseFunction(List<String> list, IWikiModel model, char[] src, int beginIndex, int endIndex) throws IOException {
    if (model instanceof IContext) {
      IContext context = (IContext) model;
      if (list.size() > 0) {
        // name of the attribute
        String attribute = parse(list.get(0), model);
        if (attribute.length() > 0) {
          String formatString = null;
          String separatorString = null;
          String nullvalueString = null;
          if (list.size() > 1) {
            // format string of the attribute
            formatString = parse(list.get(1), model);
          }
          if (list.size() > 2) {
            separatorString = parse(list.get(2), model);
            if (separatorString.length() > 1) {
              int begin = 0;
              int end = separatorString.length();
              if (separatorString.charAt(0) == '\'') {
                begin = 1;
                if (separatorString.charAt(end - 1) == '\'') {
                  end--;
                } else {
                  begin = 0;
                }
              }
              separatorString = separatorString.substring(begin, end);
            }
          }
          if (list.size() > 3) {
            nullvalueString = parse(list.get(3), model);
          }
          // get the assigned value of the attribute
          Object value = context.getAttribute(attribute);
          if (value != null) {
            StringBuilder builder;
            if (value instanceof AttributeList && ((AttributeList) value).size() > 0) {
              // multiple attribute values assigned
              AttributeList attrList = (AttributeList) value;
View Full Code Here

TOP

Related Classes of info.bliki.wiki.model.IContext

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.