本文整理了Java中uk.ac.ebi.intact.model.Annotation.getAnnotationText()
方法的一些代码示例,展示了Annotation.getAnnotationText()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Annotation.getAnnotationText()
方法的具体详情如下:
包路径:uk.ac.ebi.intact.model.Annotation
类名称:Annotation
方法名:getAnnotationText
暂无
代码示例来源:origin: uk.ac.ebi.intact.core/intact-core
private Collection<String> convertAnnotToString(Collection<Annotation> annot){
Collection<String> annotations = new ArrayList<String>(annot.size());
for (Annotation a : annot){
if (a.getCvTopic() == null){
annotations.add(a.getAnnotationText() != null ? a.getAnnotationText() : "");
}
else {
annotations.add(a.getCvTopic().getShortLabel() + (a.getAnnotationText() != null ? a.getAnnotationText() : ""));
}
}
return annotations;
}
代码示例来源:origin: uk.ac.ebi.intact.core/intact-core-readonly
private Collection<String> convertAnnotToString(Collection<Annotation> annot){
Collection<String> annotations = new ArrayList<String>(annot.size());
for (Annotation a : annot){
if (a.getCvTopic() == null){
annotations.add(a.getAnnotationText() != null ? a.getAnnotationText() : "");
}
else {
annotations.add(a.getCvTopic().getShortLabel() + (a.getAnnotationText() != null ? a.getAnnotationText() : ""));
}
}
return annotations;
}
代码示例来源:origin: uk.ac.ebi.intact.core/intact-core-readonly
@Transient
@Deprecated
/**
* @deprecated now it is always stored as a simple annotation
*/
public String getUrl() {
Annotation annot = AnnotatedObjectUtils.findAnnotationByTopicMiOrLabel(this, CvTopic.URL_MI_REF);
return annot != null ? annot.getAnnotationText() : null;
}
代码示例来源:origin: uk.ac.ebi.intact.core/intact-core
@Transient
@Deprecated
/**
* @deprecated now it is always stored as a simple annotation
*/
public String getPostalAddress() {
Annotation annot = AnnotatedObjectUtils.findAnnotationByTopicMiOrLabel(this, "postaladdress");
return annot != null ? annot.getAnnotationText() : null;
}
代码示例来源:origin: uk.ac.ebi.intact.dataexchange.psimi/intact-psimitab-converters
public String extractStandardInchiKeyFrom(SmallMolecule interactor) {
// find INCHI key
final Annotation annotation = AnnotatedObjectUtils.findAnnotationByTopicMiOrLabel(interactor, INCHI_MI_REF);// INCHI_MI_REF
if (annotation != null){
return annotation.getAnnotationText();
}
return null;
}
}
代码示例来源:origin: uk.ac.ebi.intact.core/intact-core
@Transient
@Deprecated
/**
* @deprecated now it is always stored as a simple annotation
*/
public String getUrl() {
Annotation annot = AnnotatedObjectUtils.findAnnotationByTopicMiOrLabel(this, CvTopic.URL_MI_REF);
return annot != null ? annot.getAnnotationText() : null;
}
代码示例来源:origin: uk.ac.ebi.intact.core/intact-core-readonly
@Transient
@Deprecated
/**
* @deprecated now it is always stored as a simple annotation
*/
public String getPostalAddress() {
Annotation annot = AnnotatedObjectUtils.findAnnotationByTopicMiOrLabel(this, "postaladdress");
return annot != null ? annot.getAnnotationText() : null;
}
代码示例来源:origin: uk.ac.ebi.intact.bridges.coredep/intact-cdb
private static String getAnnotationValue(Experiment experiment, CvTopic topic) {
for (Annotation annotation : experiment.getAnnotations()) {
if (topic.equals(annotation.getCvTopic())) {
return annotation.getAnnotationText();
}
}
return null;
}
代码示例来源:origin: uk.ac.ebi.intact.dbupdate/intact-update-model
public UpdatedAnnotation(Annotation annotation, UpdateStatus status){
super();
if (annotation != null){
topic = annotation.getCvTopic() != null ? annotation.getCvTopic().getAc() : null;
this.text = annotation.getAnnotationText();
}
else {
this.topic = null;
this.text = null;
}
this.status = status != null ? status : UpdateStatus.none;
this.parent = null;
}
代码示例来源:origin: uk.ac.ebi.intact.core/intact-core
@Override
public void visitAnnotation(Annotation annotation) {
currentNode.setUserObject("Annotation: "+annotation.getAnnotationText()+" / Topic="+ DebugUtil.cvObjectToSimpleString(annotation.getCvTopic()));
}
代码示例来源:origin: uk.ac.ebi.intact.core/intact-core-readonly
@Override
public void visitAnnotation(Annotation annotation) {
currentNode.setUserObject("Annotation: "+annotation.getAnnotationText()+" / Topic="+ DebugUtil.cvObjectToSimpleString(annotation.getCvTopic()));
}
代码示例来源:origin: uk.ac.ebi.intact.core/intact-core
public static boolean sameAnnotation( Annotation a1, Annotation a2 ) {
if (a1.getAc() != null && a2.getAc() != null) {
return a1.getAc().equals(a2.getAc());
}
if ( !same( a1.getAnnotationText(), a2.getAnnotationText() ) ) {
return false;
}
if ( !CvObjectUtils.areEqual( a1.getCvTopic(), a2.getCvTopic() ) ) {
return false;
}
return true;
}
代码示例来源:origin: uk.ac.ebi.intact.core/intact-core-readonly
public static boolean sameAnnotation( Annotation a1, Annotation a2 ) {
if (a1.getAc() != null && a2.getAc() != null) {
return a1.getAc().equals(a2.getAc());
}
if ( !same( a1.getAnnotationText(), a2.getAnnotationText() ) ) {
return false;
}
if ( !CvObjectUtils.areEqual( a1.getCvTopic(), a2.getCvTopic() ) ) {
return false;
}
return true;
}
代码示例来源:origin: uk.ac.ebi.intact.core/intact-core
private static String getAnnotationById(InteractionImpl complex, String id) {
for (Annotation annotation : complex.getAnnotations()) {
if (annotation.getCvTopic() != null && annotation.getCvTopic().getIdentifier() != null && annotation.getCvTopic().getIdentifier().equalsIgnoreCase(id)) {
return annotation.getAnnotationText();
}
}
return null;
}
代码示例来源:origin: uk.ac.ebi.intact.core/intact-core
public Key keyForAnnotation(Annotation annotation, AnnotatedObject parent) {
return new Key(keyFor(parent).getUniqueString() + "::" + annotation.getCvTopic() + "_" + annotation.getAnnotationText());
}
代码示例来源:origin: uk.ac.ebi.intact.core/intact-core-readonly
private static String getAnnotationById(InteractionImpl complex, String id) {
for (Annotation annotation : complex.getAnnotations()) {
if (annotation.getCvTopic() != null && annotation.getCvTopic().getIdentifier() != null && annotation.getCvTopic().getIdentifier().equalsIgnoreCase(id)) {
return annotation.getAnnotationText();
}
}
return null;
}
代码示例来源:origin: uk.ac.ebi.intact.core/intact-core
private static String getAnnotationByShortLabel(InteractionImpl complex, String shortLabel) {
for (Annotation annotation : complex.getAnnotations()) {
if (annotation.getCvTopic() != null && annotation.getCvTopic().getShortLabel() != null && annotation.getCvTopic().getShortLabel().equalsIgnoreCase(shortLabel)) {
return annotation.getAnnotationText();
}
}
return null;
}
代码示例来源:origin: uk.ac.ebi.intact.core/intact-core-readonly
private static String getAnnotationByShortLabel(InteractionImpl complex, String shortLabel) {
for (Annotation annotation : complex.getAnnotations()) {
if (annotation.getCvTopic() != null && annotation.getCvTopic().getShortLabel() != null && annotation.getCvTopic().getShortLabel().equalsIgnoreCase(shortLabel)) {
return annotation.getAnnotationText();
}
}
return null;
}
代码示例来源:origin: uk.ac.ebi.intact.core/intact-core-readonly
protected Annotation cloneAnnotation(Annotation annotation) throws IntactClonerException {
if (annotation == null) return null;
Annotation clone = new Annotation();
clonerManager.addClone(annotation, clone);
clone.setCvTopic(clone(annotation.getCvTopic()));
clone.setAnnotationText(annotation.getAnnotationText());
return clone;
}
代码示例来源:origin: uk.ac.ebi.intact.core/intact-core
protected Annotation cloneAnnotation(Annotation annotation) throws IntactClonerException {
if (annotation == null) return null;
Annotation clone = new Annotation();
clonerManager.addClone(annotation, clone);
clone.setCvTopic(clone(annotation.getCvTopic()));
clone.setAnnotationText(annotation.getAnnotationText());
return clone;
}
内容来源于网络,如有侵权,请联系作者删除!