Package org.wikier.trioo.jtrioo.annotations

Examples of org.wikier.trioo.jtrioo.annotations.DynamicRdfProperty


      AnnotatedElement annotatedElement = (AnnotatedElement) field;
      RdfProperty propertyResource = annotatedElement.getAnnotation(RdfProperty.class);
      if (propertyResource != null) {
        extractProperty(resource, field.getName(), TypeHelper.getType(field), propertyResource);
      } else {
        DynamicRdfProperty dynPropertyResource = annotatedElement.getAnnotation(DynamicRdfProperty.class);
        if (dynPropertyResource != null) {
          extractProperty(resource, field.getName(), TypeHelper.getType(field), dynPropertyResource);
        } else {
          Literal literal = annotatedElement.getAnnotation(Literal.class);
          if (literal != null) {
            extractLiteral(resource, field.getName(), TypeHelper.getType(field), literal);
          } else {
            //nothing to do...?
          }
        }
      }
    }
   
    //properties on methods
    for (Method method : resourceClass.getMethods()) {
      AnnotatedElement annotatedMethod = (AnnotatedElement) method;
      RdfProperty propertyResource = annotatedMethod.getAnnotation(RdfProperty.class);
      if (propertyResource != null) {
        extractProperty(resource, IntrospectionHelper.getAffectedAttribute(method), TypeHelper.getType(method), propertyResource);
      } else {
        DynamicRdfProperty dynPropertyResource = annotatedMethod.getAnnotation(DynamicRdfProperty.class);
        if (dynPropertyResource != null) {
          extractProperty(resource, IntrospectionHelper.getAffectedAttribute(method),  TypeHelper.getType(method), dynPropertyResource);
        } else {
          Literal literal = annotatedMethod.getAnnotation(Literal.class);
          if (literal != null) {
View Full Code Here

TOP

Related Classes of org.wikier.trioo.jtrioo.annotations.DynamicRdfProperty

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.