Package ca.uhn.fhir.model.api.annotation

Examples of ca.uhn.fhir.model.api.annotation.Description


  }

  private static void extractDescription(SearchParameter theParameter, Annotation[] theAnnotations) {
    for (Annotation annotation : theAnnotations) {
      if (annotation instanceof Description) {
        Description desc = (Description) annotation;
        if (isNotBlank(desc.formalDefinition())) {
          theParameter.setDescription(desc.formalDefinition());
        } else {
          theParameter.setDescription(desc.shortDefinition());
        }
      }
    }
  }
View Full Code Here


      if (childAnnotation == null) {
        ourLog.debug("Ignoring non-type field '" + next.getName() + "' on target type: " + theClass);
        continue;
      }

      Description descriptionAnnotation = next.getAnnotation(Description.class);

      String elementName = childAnnotation.name();
      int order = childAnnotation.order();
      if (order < 0 && order != Child.ORDER_UNKNOWN) {
        throw new ConfigurationException("Invalid order '" + order + "' on @Child for field '" + next.getName() + "' on target type: " + theClass);
View Full Code Here

  public SearchMethodBinding(Class<? extends IResource> theReturnResourceType, Method theMethod, String theQueryName, FhirContext theContext, Object theProvider) {
    super(theReturnResourceType, theMethod, theContext, theProvider);
    this.myQueryName = StringUtils.defaultIfBlank(theQueryName, null);
    this.myDeclaredResourceType = (Class<? extends IResource>) theMethod.getReturnType();

    Description desc = theMethod.getAnnotation(Description.class);
    if (desc != null) {
      if (isNotBlank(desc.formalDefinition())) {
        myDescription = StringUtils.defaultIfBlank(desc.formalDefinition(), null);
      } else {
        myDescription = StringUtils.defaultIfBlank(desc.shortDefinition(), null);
      }

    }
  }
View Full Code Here

    this.myQueryName = StringUtils.defaultIfBlank(search.queryName(), null);
    this.myCompartmentName = StringUtils.defaultIfBlank(search.compartmentName(), null);
    this.myDeclaredResourceType = (Class<? extends IResource>) theMethod.getReturnType();
    this.myIdParamIndex = MethodUtil.findIdParameterIndex(theMethod);

    Description desc = theMethod.getAnnotation(Description.class);
    if (desc != null) {
      if (isNotBlank(desc.formalDefinition())) {
        myDescription = StringUtils.defaultIfBlank(desc.formalDefinition(), null);
      } else {
        myDescription = StringUtils.defaultIfBlank(desc.shortDefinition(), null);
      }
    }

    /*
     * Check for parameter combinations and names that are invalid
View Full Code Here

      if (childAnnotation == null) {
        ourLog.debug("Ignoring non-type field '" + next.getName() + "' on target type: " + theClass);
        continue;
      }

      Description descriptionAnnotation = next.getAnnotation(Description.class);

      TreeMap<Integer, BaseRuntimeDeclaredChildDefinition> orderMap = theOrderToElementDef;
      Extension extensionAttr = next.getAnnotation(Extension.class);
      if (extensionAttr != null) {
        orderMap = theOrderToExtensionDef;
View Full Code Here

  }

  public static void extractDescription(SearchParameter theParameter, Annotation[] theAnnotations) {
    for (Annotation annotation : theAnnotations) {
      if (annotation instanceof Description) {
        Description desc = (Description) annotation;
        if (isNotBlank(desc.formalDefinition())) {
          theParameter.setDescription(desc.formalDefinition());
        } else {
          theParameter.setDescription(desc.shortDefinition());
        }
      }
    }
  }
View Full Code Here

      if (childAnnotation == null) {
        ourLog.debug("Ignoring non-type field '" + next.getName() + "' on target type: " + theClass);
        continue;
      }

      Description descriptionAnnotation = next.getAnnotation(Description.class);

      String elementName = childAnnotation.name();
      int order = childAnnotation.order();
      if (order < 0 && order != Child.ORDER_UNKNOWN) {
        throw new ConfigurationException("Invalid order '" + order + "' on @Child for field '" + next.getName() + "' on target type: " + theClass);
View Full Code Here

  }

  private static void extractDescription(SearchParameter theParameter, Annotation[] theAnnotations) {
    for (Annotation annotation : theAnnotations) {
      if (annotation instanceof Description) {
        Description desc = (Description) annotation;
        if (isNotBlank(desc.formalDefinition())) {
          theParameter.setDescription(desc.formalDefinition());
        } else {
          theParameter.setDescription(desc.shortDefinition());
        }
      }
    }
  }
View Full Code Here

      if (childAnnotation == null) {
        ourLog.debug("Ignoring non-type field '" + next.getName() + "' on target type: " + theClass);
        continue;
      }

      Description descriptionAnnotation = next.getAnnotation(Description.class);

      String elementName = childAnnotation.name();
      int order = childAnnotation.order();
      if (order < 0 && order != Child.ORDER_UNKNOWN) {
        throw new ConfigurationException("Invalid order '" + order +"' on @Child for field '" + next.getName()+ "' on target type: " + theClass);
View Full Code Here

  public SearchMethodBinding(Class<? extends IResource> theReturnResourceType, Method theMethod, String theQueryName, FhirContext theContext, Object theProvider) {
    super(theReturnResourceType, theMethod, theContext, theProvider);
    this.myQueryName = StringUtils.defaultIfBlank(theQueryName, null);
    this.myDeclaredResourceType = (Class<? extends IResource>) theMethod.getReturnType();

    Description desc = theMethod.getAnnotation(Description.class);
    if (desc != null) {
      if (isNotBlank(desc.formalDefinition())) {
        myDescription = StringUtils.defaultIfBlank(desc.formalDefinition(), null);
      } else {
        myDescription = StringUtils.defaultIfBlank(desc.shortDefinition(), null);
      }

    }
  }
View Full Code Here

TOP

Related Classes of ca.uhn.fhir.model.api.annotation.Description

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.