Package org.openiaml.docs.modeldoc

Examples of org.openiaml.docs.modeldoc.JavadocTextElement


   * Handle a fragment of Javadoc text.
   *
   * @param text
   */
  public void handleText(String text) {
    JavadocTextElement e = factory.createJavadocTextElement();
    e.setValue(text);
    tagElement.getFragments().add(e);
  }
View Full Code Here


      throw new NullPointerException("tag cannot be null");
   
    JavadocTagElement fragment = factory.createJavadocTagElement();
    fragment.setName(tag);
   
    JavadocTextElement text2 = factory.createJavadocTextElement();
    text2.setValue(text);
    fragment.getFragments().add(text2);
   
    tagElement.getFragments().add(fragment);

  }
View Full Code Here

   */
  public void findSemanticReferences(DocumentationHelper helper, ModelDocumentation root, JavadocTagElement description, Reference reference, ITagHandler handler) throws SemanticHandlerException {
    for (String tag : tagsToIdentify) {
      if (tag.equals(description.getName())) {
        // cycle through all model elements
        JavadocTextElement refName = null;
        for (JavadocFragment f : description.getFragments()) {
          // select the first TextElement; this is the target class
          if (f instanceof JavadocTextElement) {
            refName = (JavadocTextElement) f;
            break;
          }           
        }
        if (refName != null) {
          // select the first word as the model element name
          String className = refName.getValue().trim();
          if (className.contains(" ")) {
            className = className.substring(0, className.indexOf(" "));
          }
          // are there multiple elements selected with ','s?
          String[] classNames = className.split(",");
View Full Code Here

          handleModelReferences(e, javaReference);
         
          result.add(e);
        } else if (o instanceof TextElement) {
          TextElement text = (TextElement) o;
          JavadocTextElement e = factory.createJavadocTextElement();
          e.setValue(text.getText());
          result.add(e);
        } else if (o instanceof MethodRef) {
          MethodRef ref = (MethodRef) o;
          JavaMethod method = getMethodFor(ref);
          if (method != null) {
            JavadocMethodReference e = factory.createJavadocMethodReference();
            e.setReference(method);
            result.add(e);
          }
        } else if (o instanceof SimpleName) {
          // assume it is a class name
          JavaClass cls = getJavaClassFor((SimpleName) o);
          if (cls != null) {
            JavadocClassReference e = factory.createJavadocClassReference();
            e.setReference(cls);
            result.add(e);
          }
        } else if (o instanceof QualifiedName) {
          // assume it is a class name (with package)
          JavaClass cls = getJavaClassFor((QualifiedName) o);
          if (cls != null) {
            JavadocClassReference e = factory.createJavadocClassReference();
            e.setReference(cls);
            result.add(e);
          }
        } else if (o instanceof MemberRef) {
          // ignore
        } else {
View Full Code Here

          // it exists; load it in as additional documentation
          try {
            char[] html = readFile(f);
 
            // parse into a JavadocTextElement
            JavadocTextElement e = factory.createJavadocTextElement();
            e.setValue( new String(html) );
           
            AdditionalLatex doc = factory.createAdditionalLatex();
            doc.setDescription( e );
           
            // add javadoc element to root
View Full Code Here

TOP

Related Classes of org.openiaml.docs.modeldoc.JavadocTextElement

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.