Package org.openbel.framework.ws.model

Examples of org.openbel.framework.ws.model.Annotation


    }

    public static Annotation convert(org.openbel.framework.common.model.Annotation annotation) {
        if (annotation == null) return null;

        Annotation wsAnnotation = OBJECT_FACTORY.createAnnotation();
        AnnotationType wsAnnotationType = OBJECT_FACTORY.createAnnotationType();

        AnnotationDefinition def = annotation.getDefinition();
        if (def.getId() != null) wsAnnotationType.setName(def.getId());
        if (def.getDescription() != null) wsAnnotationType.setDescription(def.getDescription());
        if (def.getUsage() != null) wsAnnotationType.setUsage(def.getUsage());
        if (def.getType() != null) {
            AnnotationDefinitionType ad = AnnotationDefinitionType.fromValue(def.getType().toString());
            wsAnnotationType.setAnnotationDefinitionType(ad);
        }
        wsAnnotation.setAnnotationType(wsAnnotationType);
        wsAnnotation.setValue(annotation.getValue());
        return wsAnnotation;
    }
View Full Code Here

TOP

Related Classes of org.openbel.framework.ws.model.Annotation

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.