/** * Creates a new DataSource with the given id, full name and 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 * @param description * description 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, String description) throws NullValueException, EmptyStringException, UnsupportedOperationException { return md.createDataSource(id, fullname, description); }
public synchronized DataSource getDataSource ( String id, String fullName, String description ) { return this.cacheGet ( DataSource.class, id, () -> this.graph.getMetaData ().createDataSource ( id, fullName, description ) ); }
DataSource dataSource = og.getMetaData().createDataSource( cvname, fullname, cvdescription); dataSourceRefManager.resolve(cvname, dataSource);
/** * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent) */ public void actionPerformed(ActionEvent arg0) { String cmd = arg0.getActionCommand(); // create new DataSource if (cmd.equals(APPLY)) { if (validateEntry()) { aog.getMetaData().createDataSource(id.getText(), fullname.getText(), description.getText()); try { this.setClosed(true); } catch (PropertyVetoException e) { // ignore } conceptDialog.initDataSource(id.getText()); } } // cancel dialog else if (cmd.equals(CANCEL)) { try { this.setClosed(true); } catch (PropertyVetoException e) { // ignore } } } }
/** * Fakes a table cell editor based around a JTextField. * */ public ConceptAccessionTableCellEditor(ONDEXGraph graph) { super(new JTextField()); // listen for right clicks super.getComponent().addMouseListener(this); // keep local graph reference this.graph = graph; unknown = graph.getMetaData().getDataSource("unknown"); // if not yet present in meta data if (unknown == null) unknown = graph.getMetaData().createDataSource("unknown", "unknown datasource", "automatically created"); }
dataSource = graph.getMetaData().createDataSource(CLIQUE_CV, CLIQUE_CV, "Created from Transformer: " + getName());
newDataSource = graph.getMetaData().createDataSource( dsName, dsName, "Collapsed Data Source Set");
public void start() throws JAXBException, XMLStreamException, PluginConfigurationException, ClassNotFoundException, InstantiationException, IllegalAccessException { // configure XML parser xmlif = (XMLInputFactory2) XMLInputFactory2.newInstance(); xmlif.configureForXmlConformance(); // define meta data TODO: have this as argument to parser graph.getMetaData().createDataSource(CV_SBML, "SBML", "Imported from SBML file"); graph.getMetaData().getFactory() .createEvidenceType(ET_SBML, "Imported from SBML model"); // mapping of SBML id to Ondex concept Map<String, ONDEXConcept> nodeIDToConcept = new HashMap<String, ONDEXConcept>(); XmlParser parser = new XmlParser(); // parsing of compartments parser.registerParser(Export.COMPARTMENT, new CompartmentParser(graph, nodeIDToConcept)); // parsing of species parser.registerParser(Export.SPECIES, new SpeciesParser(graph, nodeIDToConcept)); // parsing of reactions parser.registerParser(Export.REACTION, new ReactionParser(graph, nodeIDToConcept)); parser.parse(getXMLStreamReader()); // 2nd pass for reactions }
dataSource = graph.getMetaData().createDataSource("Seq2Pfam", "Sequence to Pfam Mapping", "Concepts created on the fly by sequence to pfam");
if (!nomd.checkDataSource(dataSource.getId())) nomd .createDataSource(dataSource.getId(), dataSource.getFullname(), dataSource .getDescription());