/** * Creates a new ConceptClass with the given id and empty description. Adds * the new ConceptClass to the list of ConceptClasses of this graph. * * @param id * id of the new ConceptClass * @return ConceptClass * @throws NullValueException * if any parameter is null. * @throws EmptyStringException * if id parameter is an empty string. * @throws UnsupportedOperationException * for read-only graphs */ public ConceptClass createConceptClass(String id) throws NullValueException, EmptyStringException, UnsupportedOperationException { return createConceptClass(id, ""); }
/** * Creates a new ConceptClass with the given id, fullname and empty * description. Adds the new ConceptClass to the list of ConceptClasses of * this graph. * * @param id * id of the new ConceptClass * @param fullname * fullname of the new ConceptClass * @return ConceptClass * @throws NullValueException * if any parameter is null. * @throws EmptyStringException * if id parameter is an empty string. * @throws UnsupportedOperationException * for read-only graphs */ public ConceptClass createConceptClass(String id, String fullname) throws NullValueException, EmptyStringException, UnsupportedOperationException { return createConceptClass(id, fullname, ""); }
/** * Creates a new ConceptClass with the given id and parent ConceptClass. * Adds the new ConceptClass to the list of ConceptClasses of this graph. * * @param id * id of the new ConceptClass * @param specialisationOf * parent ConceptClass of the new ConceptClass * @return ConceptClass * @throws NullValueException * if any parameter is null. * @throws EmptyStringException * if id parameter is an empty string. * @throws UnsupportedOperationException * for read-only graphs */ public ConceptClass createConceptClass(String id, ConceptClass specialisationOf) throws NullValueException, EmptyStringException, UnsupportedOperationException { return createConceptClass(id, "", specialisationOf); }
/** * Creates a new ConceptClass with the given id, fullname and parent * ConceptClass. Adds the new ConceptClass to the list of ConceptClasses of * this graph. * * @param id * id of the new ConceptClass * @param fullname * fullname of the new ConceptClass * @param specialisationOf * parent ConceptClass of the new ConceptClass * @return ConceptClass * @throws NullValueException * if any parameter is null. * @throws EmptyStringException * if id parameter is an empty string. * @throws UnsupportedOperationException * for read-only graphs */ public ConceptClass createConceptClass(String id, String fullname, ConceptClass specialisationOf) throws NullValueException, EmptyStringException, UnsupportedOperationException { return createConceptClass(id, fullname, "", specialisationOf); }
public ConceptClass safeFetchConceptClass(String id, String description, ConceptClass SBML_Parent) { ConceptClass cc = metaData.getConceptClass(id); if (cc == null) { cc = metaData.getFactory().createConceptClass(id, description, SBML_Parent); } return cc; }
protected static ConceptClass createCC(ONDEXGraphMetaData meta, String type) throws NullValueException, EmptyStringException{ ConceptClass cc = meta.getConceptClass(type); if(cc == null)cc = meta.getFactory().createConceptClass(type); return cc; }
protected static ConceptClass createCC(ONDEXGraphMetaData meta, String type) throws NullValueException, EmptyStringException{ ConceptClass cc = meta.getConceptClass(type); if(cc == null)cc = meta.getFactory().createConceptClass(type); return cc; }
/** * Get concpet class * * @param graph * @param type * @return */ public static ConceptClass createCC(final ONDEXGraph graph, final String type) { final ONDEXGraphMetaData meta = graph.getMetaData(); ConceptClass cc = meta.getConceptClass(type); if (cc == null) cc = meta.getFactory().createConceptClass(type); return cc; }
/** * Get concpet class * * @param graph * @param type * @return */ public static ConceptClass createCC(final ONDEXGraph graph, final String type) { final ONDEXGraphMetaData meta = graph.getMetaData(); ConceptClass cc = meta.getConceptClass(type); if (cc == null) cc = meta.getFactory().createConceptClass(type); return cc; }
ConceptClass conceptClass = metaData.getFactory().createConceptClass("GLYCOSTRUCTURE", "glycostructure"); EvidenceType evidenceType = metaData.getEvidenceType("IMPD"); AttributeName attributeName = metaData.getFactory().createAttributeName("struct", "structure", String.class);
og.getMetaData() .getFactory() .createConceptClass(ccname, fullname, ccdescription)); } else { // skip everything else
.getMetaData() .getFactory() .createConceptClass(ccName, ccName, "Collapsed Concept Class Set"); .getMetaData() .getFactory() .createConceptClass(ccName, ccName, "Collapsed Concept Class Set");
aog.getMetaData().createConceptClass(id.getText(), fullname.getText(), description.getText(), cc); } else { aog.getMetaData().getFactory().createConceptClass(id.getText(), fullname.getText(), description.getText());
ccGene = requireConceptClass("Gene"); ccProtein = requireConceptClass("Protein"); ccCompound = graph.getMetaData().getFactory().createConceptClass("Compound"); ccEnzyme = requireConceptClass("Enzyme"); ccReaction = requireConceptClass("Reaction");
public synchronized ConceptClass getConceptClass ( ConceptClassPrototype proto ) { try { // Let's see if it has a parent if ( proto.getParent () == null ) { // Or a prototype to build it. In case of loops, this will lead to stack overflow ConceptClassPrototype parentProto = proto.getParentPrototype (); if ( parentProto != null ) proto.setParent ( this.getConceptClass ( parentProto ) ); } return this.cacheGet ( ConceptClass.class, proto.getId (), () -> this.graph.getMetaData ().getFactory ().createConceptClass ( proto.getId (), proto.getFullName (), proto.getDescription (), proto.getParent () ) ); } catch ( StackOverflowError ex ) { log.error ( "Stackoverflow error while creating the concept class '{}'. Do you have circular references?", proto.getId () ); throw ex; } }
m = (M) md.getConceptClass(id); if (m == null) { m = (M) md.getFactory().createConceptClass(id);
ConceptClass ccGene = requireConceptClass("Gene"); ConceptClass ccQTL = requireConceptClass("QTL"); ConceptClass ccSNP = graph.getMetaData().getFactory().createConceptClass("SNP");
if (ccThing == null) ccThing = graph.getMetaData().getFactory() .createConceptClass("Thing"); ccComp = mdu.safeFetchConceptClass("Comp", "Compound", ccThing); ccTarget = mdu.safeFetchConceptClass("Target", "Target", ccThing);
public static void initialiseMetaData(ONDEXGraph g) { graph = g; ONDEXGraphMetaData metaData = graph.getMetaData(); // required metadata for a glycoprotein dataSource = metaData.getFactory().createDataSource("OGLYCBASE", "o-linked glycoprotein database"); cc = metaData.getFactory().createConceptClass("Glycoprotein"); et = metaData.getEvidenceType("IMPD"); // Attributes for glycoprotein oglycbaseIDAttributeName = metaData.getFactory().createAttributeName("oglycbaseID", "accession number in OGlycBASE", String.class); proteinNameAttributeName = metaData.getFactory().createAttributeName("proteinname", "name of protein", String.class); oglycanInfoAttributeName = metaData.getFactory().createAttributeName("oglycaninfo", "notes about glycosylation", String.class); experimentalGlycosylatedSerinePositionsAttributeName = metaData.getFactory().createAttributeName("expgserpos" , "experimentally determined positions of glycosylated serine residues", String[].class); predictedGlycosylatedSerinePositionsAttributeName = metaData.getFactory().createAttributeName("pregserpos" , "experimentally determined positions of glycosylated serine residues", String[].class); experimentalGlycosylatedThreoninePositionsAttributeName = metaData.getFactory().createAttributeName("expgthrpos" , "experimentally determined positions of glycosylated threonine residues", String[].class); predictedGlycosylatedThreoninePositionsAttributeName = metaData.getFactory().createAttributeName("pregthrpos" , "experimentally determined positions of glycosylated threonine residues", String[].class); experimentalGlycosylatedAsparaginePositionsAttributeName = metaData.getFactory().createAttributeName("expgasnpos" , "experimentally determined positions of glycosylated asparagine residues", String[].class); predictedGlycosylatedAsparaginePositionsAttributeName = metaData.getFactory().createAttributeName("pregasnpos" , "experimentally determined positions of glycosylated asparagine residues", String[].class); experimentalGlycosylatedTryptophanPositionsAttributeName = metaData.getFactory().createAttributeName("expgtrppos" , "experimentally determined positions of glycosylated tryptophan residues", String[].class); predictedGlycosylatedTryptophanPositionsAttributeName = metaData.getFactory().createAttributeName("pregtrppos" , "experimentally determined positions of glycosylated tryptophan residues", String[].class); sequenceLengthAttributeName = metaData.getFactory().createAttributeName("seqlen" , "number of residues in protein sequence", Integer.class); sequenceAttributeName = metaData.getFactory().createAttributeName("seq" , "amino-acid sequence", String.class); sequenceByGlycosylationAttributeName = metaData.getFactory().createAttributeName("gseq" , "amino-acid sequence with glycosylation info", String.class); commentsAttributeName = metaData.getFactory().createAttributeName("comments" , "comments", HashSet.class); }
cc = graph.getMetaData().getConceptClass(id); if (cc == null) { cc = graph.getMetaData().getFactory().createConceptClass(id);