/** * Returns a list of language Link objects. * This is a shortcut for writing getLanguagesElement().getLinks(); */ public List<Link> getLanguages(){ return languages.getLinks(); }
/** * Returns a list of category Link objects. * This is a shortcut for writing getCategoryElemement.getLinks(); * @return A list of category links. */ public List<Link> getCategories(){ if (categories == null) { return new ArrayList<Link>(); } return categories.getLinks(); }
/** * Returns a List of the Links of this ContentElement of the Specified Link.type t in the Range of start to end */ public List<Link> getLinks( Link.type t, int begin, int end){ return getLinks( t, new Span(begin, end) ); }
private static void checkRange( ContentElement ce ){ List<SrcSpan> eil = new ArrayList<SrcSpan>(); for( Span s: ce.getFormatSpans( FormatType.BOLD ) ) eil.add( s.getSrcSpan() ); for( Span s: ce.getFormatSpans( FormatType.ITALIC ) ) eil.add( s.getSrcSpan() ); for( Span s: ce.getFormatSpans( FormatType.MATH ) ) eil.add( s.getSrcSpan() ); for( Span s: ce.getFormatSpans( FormatType.TAG ) ) eil.add( s.getSrcSpan() ); for( Span s: ce.getFormatSpans( FormatType.NOWIKI ) ) eil.add( s.getSrcSpan() ); for( Link l: ce.getLinks()) eil.add( l.getSrcSpan() ); for( Template t: ce.getTemplates() ) eil.add( t.getSrcSpan() ); ce.setSrcSpan( getEvalInfo( ce.getSrcSpan(), eil) ); }