/** * Creates a new AttributeName with the given id and datatype. Adds the new * AttributeName to the list of AttributeNames of this graph. * * @param id * id of the new AttributeName * @param datatype * datatype of the new AttributeName * @return AttributeName * @throws NullValueException * if any parameter is null. * @throws EmptyStringException * if id parameter is an empty string. * @throws UnsupportedOperationException * for read-only graphs */ public AttributeName createAttributeName(String id, Class<?> datatype) throws NullValueException, EmptyStringException, UnsupportedOperationException { return createAttributeName(id, "", datatype); }
/** * Creates a new RelationType with the given id. Adds the new RelationType * to the list of RelationTypes of this graph. * * @param id * id of the new RelationType * @return RelationType * @throws NullValueException * if any parameter is null. * @throws EmptyStringException * if id parameter is an empty string. * @throws UnsupportedOperationException * for read-only graphs */ public RelationType createRelationType(String id) throws NullValueException, EmptyStringException, UnsupportedOperationException { return createRelationType(id, ""); }
public static void initialiseMetaData(ONDEXGraph g) { graph = g; ONDEXGraphMetaData metaData = graph.getMetaData(); dataSource = metaData.getFactory().createDataSource("BCSDB", "bacterial carbohydrate structure database"); ccsd = metaData.getDataSource("CCSD"); cc = metaData.getConceptClass("Comp"); et = metaData.getEvidenceType("IMPD"); linearStructureAttributeName = metaData.getFactory().createAttributeName("linearBCSDB","structure in BCSDB linear format",String.class); structureTypeAttributeName = metaData.getFactory().createAttributeName("typeBCSDB","structure type according to BCSDB classification",String.class); molecularMassAttributeName = metaData.getFactory().createAttributeName("molmass","molecular mass",String.class); aglyconInfoAttributeName = metaData.getFactory().createAttributeName("alglyconinfo","info about biochemical entity to which glycan is bound",String.class); molecularFormulaAttributeName = metaData.getFactory().createAttributeName("molformula","molecular formula",String.class); trivialNameAttributeName = metaData.getFactory().createAttributeName("trivialname","trivial name",String.class); }
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); }
if (dataSource == null) dataSource = og.getMetaData().getFactory() .createDataSource("PAJEK"); cc = og.getMetaData().getFactory().createConceptClass("Thing"); rt = og.getMetaData().getFactory().createRelationType("r"); .getMetaData() .getFactory() .createAttributeName("labels", "splitted edge labels", String.class); et = og.getMetaData().getFactory().createEvidenceType("IMPD");
getCurrentMethodName())); rt = graph.getMetaData().getFactory() .createRelationType(relationType); getCurrentMethodName())); eviType = graph.getMetaData().getFactory() .createEvidenceType(MetaData.evidence); getCurrentMethodName())); hitAttr = graph.getMetaData().getFactory() .createAttributeName(MetaData.accHit, Integer.class);
errorReport.append(key); conceptClasses.put(key, aog.getMetaData().getFactory() .createConceptClass(key)); errorReport.append("\n"); errorReport.append("parseConcept: Dummy ConceptClass " errorReport.append(arguments[3]); dataSource = aog.getMetaData().getFactory() .createDataSource(arguments[3]); errorReport.append("\n"); errorReport.append("parseConcept: Dummy DataSource " errorReport.append(arguments[4]); et = aog.getMetaData().getFactory() .createEvidenceType(arguments[4]); errorReport.append("\n"); errorReport.append("parseConcept: Dummy EvidenceType "
errorReport.append(key); relationTypes.put(key, aog.getMetaData().getFactory() .createRelationType(key)); errorReport.append("\n"); errorReport.append("parseRelation: Dummy RelationType " errorReport.append(arguments[2]); et = aog.getMetaData().getFactory() .createEvidenceType(arguments[2]); errorReport.append("\n"); errorReport.append("parseRelation: Dummy EvidenceType "
/** * Creates a new DataSource with the given id and empty description. Adds * the new DataSource to the list of DataSources of this graph. * * @param id * id of the new DataSource * @return created DataSource * @throws NullValueException * if any parameter is null. * @throws EmptyStringException * if id parameter is an empty string. * @throws UnsupportedOperationException * for read-only graphs */ public DataSource createDataSource(String id) throws NullValueException, EmptyStringException, UnsupportedOperationException { return createDataSource(id, ""); }
/** * 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 EvidenceType with the given id and empty description. Adds * the new EvidenceType to the list of EvidenceTypes of this graph. * * @param id * id of the new EvidenceType * @return EvidenceType * @throws NullValueException * if any parameter is null. * @throws EmptyStringException * if id parameter is an empty string. * @throws UnsupportedOperationException * for read-only graphs */ public EvidenceType createEvidenceType(String id) throws NullValueException, EmptyStringException, UnsupportedOperationException { return createEvidenceType(id, ""); }
@Override public MetaDataFactory getFactory() { return new MetaDataFactory(this); } }
m = (M) md.getConceptClass(id); if (m == null) { m = (M) md.getFactory().createConceptClass(id); m = (M) md.getDataSource(id); if (m == null) { m = (M) md.getFactory().createDataSource(id); m = (M) md.getEvidenceType(id); if (m == null) { m = (M) md.getFactory().createEvidenceType(id); m = (M) md.getRelationType(id); if (m == null) { m = (M) md.getFactory().createRelationType(id); m = (M) md.getUnit(id); if (m == null) { m = (M) md.getFactory().createUnit(id);
DataSource dataSource = metaData.getFactory().createDataSource("GLYCOMEDB", "glycomedb"); DataSource ccsd = metaData.getDataSource("CCSD"); ConceptClass conceptClass = metaData.getFactory().createConceptClass("GLYCOSTRUCTURE", "glycostructure"); EvidenceType evidenceType = metaData.getEvidenceType("IMPD"); AttributeName attributeName = metaData.getFactory().createAttributeName("struct", "structure", String.class);
if (evidencetype == null) evidencetype = graph.getMetaData().getFactory() .createEvidenceType("IMPD"); .createRelationType("is_a");
/** * Creates a new DataSource with the given id, full name and empty * description. Adds the new DataSource to the list of DataSources of this * graph. * * @param id * id of the new DataSource * @param fullname * full name of the new DataSource * @return created DataSource * @throws NullValueException * if any parameter is null. * @throws EmptyStringException * if id parameter is an empty string. * @throws UnsupportedOperationException * for read-only graphs */ public DataSource createDataSource(String id, String fullname) throws NullValueException, EmptyStringException, UnsupportedOperationException { return createDataSource(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); }
protected static EvidenceType createEvidence(ONDEXGraphMetaData meta, String type) throws NullValueException, EmptyStringException{ EvidenceType evidence = meta.getEvidenceType(type); if(evidence == null)evidence = meta.getFactory().createEvidenceType(type); return evidence; }
@Override public MetaDataFactory getFactory() { return new MetaDataFactory(this); }
cc = graph.getMetaData().getConceptClass(id); if (cc == null) { cc = graph.getMetaData().getFactory().createConceptClass(id); rt = graph.getMetaData().getFactory().createRelationType(id); dataSource = graph.getMetaData().getFactory().createDataSource(id); et = graph.getMetaData().getFactory().createEvidenceType(id); .createAttributeName("graphicalX", Double.class); graphicalY = graph.getMetaData().getFactory() .createAttributeName("graphicalY", Double.class); visible = graph.getMetaData().getFactory() .createAttributeName("visible", Boolean.class); color = graph.getMetaData().getFactory() .createAttributeName("color", java.awt.Color.class); shape = graph.getMetaData().getFactory() .createAttributeName("shape", Integer.class);