net.sourceforge.ondex.core.DataSource.getFullname()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(4.8k)|赞(0)|评价(0)|浏览(113)

本文整理了Java中net.sourceforge.ondex.core.DataSource.getFullname()方法的一些代码示例,展示了DataSource.getFullname()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。DataSource.getFullname()方法的具体详情如下:
包路径:net.sourceforge.ondex.core.DataSource
类名称:DataSource
方法名:getFullname

DataSource.getFullname介绍

暂无

代码示例

代码示例来源:origin: net.sourceforge.ondex.modules/json

  1. /**
  2. * Generate metadata for Data Source.
  3. * @param ds
  4. * A Data Source (from the Ondex API).
  5. * @return JSONObject
  6. * JSONObject containing information about the Data Source.
  7. */
  8. private JSONObject buildDataSource(DataSource ds) {
  9. JSONObject dsJson= new JSONObject();
  10. dsJson.put(JSONAttributeNames.ID, ds.getId());
  11. dsJson.put(JSONAttributeNames.FULLNAME, ds.getFullname());
  12. dsJson.put(JSONAttributeNames.DESCRIPTION, ds.getDescription());
  13. return dsJson;
  14. }

代码示例来源:origin: net.sourceforge.ondex.modules/cyjs_json

  1. /**
  2. * Generate metadata for Data Source.
  3. * @param ds
  4. * A Data Source (from the Ondex API).
  5. * @return String
  6. * String containing full name or id.
  7. */
  8. private String/*JSONObject*/ buildDataSource(DataSource ds) {
  9. String elementOf;
  10. /* JSONObject dsJson= new JSONObject();
  11. dsJson.put(JSONAttributeNames.ID, ds.getId());
  12. dsJson.put(JSONAttributeNames.FULLNAME, ds.getFullname());
  13. dsJson.put(JSONAttributeNames.DESCRIPTION, ds.getDescription());
  14. */
  15. if(ds.getId().equals("")) {
  16. elementOf= ds.getFullname();
  17. }
  18. else {
  19. elementOf= ds.getId();
  20. }
  21. return elementOf/*dsJson*/;
  22. }

代码示例来源:origin: net.sourceforge.ondex.apps/ovtk2

  1. /**
  2. * Returns a JLabel for the data source
  3. */
  4. @Override
  5. public Object getElementAt(int index) {
  6. JLabel label = null;
  7. if (index > -1) {
  8. DataSource dataSource = dataSources.get(index);
  9. String name = dataSource.getFullname();
  10. if (name.trim().length() == 0)
  11. name = dataSource.getId();
  12. label = new JLabel(name);
  13. label.setName(dataSource.getId());
  14. label.setToolTipText("(" + dataSource.getId() + ") " + dataSource.getDescription());
  15. }
  16. return label;
  17. }

代码示例来源:origin: net.sourceforge.ondex.apps/ovtk2

  1. /**
  2. * Constructs user input to add a DataSource.
  3. *
  4. * @param aog
  5. * AbstractONDEXGraph to add to
  6. * @param dataSource
  7. * DataSource to use
  8. */
  9. public DialogDataSource(ONDEXGraph aog, DataSource dataSource) {
  10. super("Dialog.DataSource.Title", "Properties16.gif");
  11. this.aog = aog;
  12. // set existing information
  13. id.setText(dataSource.getId());
  14. fullname.setText(dataSource.getFullname());
  15. description.setText(dataSource.getDescription());
  16. // set everything to disabled
  17. id.setEditable(false);
  18. fullname.setEditable(false);
  19. description.setEnabled(false);
  20. this.getContentPane().setLayout(new BorderLayout());
  21. this.getContentPane().add(makeProperties(), BorderLayout.CENTER);
  22. this.getContentPane().add(makeButtonsPanel(null, "Dialog.DataSource.Cancel"), BorderLayout.SOUTH);
  23. this.pack();
  24. }

代码示例来源:origin: net.sourceforge.ondex.modules/generic

  1. public void start() {
  2. ONDEXGraphMetaData metadata = graph.getMetaData();
  3. for (ConceptClass cc : metadata.getConceptClasses()) {
  4. System.out.println("ConceptClass " + cc.getId() + " " + cc.getFullname());
  5. System.out.println("\tConcepts = " + graph.getConceptsOfConceptClass(cc).size());
  6. }
  7. for (DataSource dataSource : metadata.getDataSources()) {
  8. System.out.println("DataSource " + dataSource.getId() + " " + dataSource.getFullname());
  9. System.out.println("\tConcepts = " + graph.getConceptsOfDataSource(dataSource).size());
  10. }
  11. for (AttributeName att : metadata.getAttributeNames()) {
  12. System.out.println("AttributeName " + att.getId() + " " + att.getFullname());
  13. System.out.println("\tConcepts = " + graph.getConceptsOfAttributeName(att).size());
  14. System.out.println("\tRelations = " + graph.getRelationsOfAttributeName(att).size());
  15. }
  16. for (RelationType rt : metadata.getRelationTypes()) {
  17. System.out.println("RelationType " + rt.getId() + " " + rt.getFullname());
  18. System.out.println("\tRelations = " + graph.getRelationsOfRelationType(rt).size());
  19. }
  20. }

代码示例来源:origin: net.sourceforge.ondex.modules/interaction

  1. etName = et.getId();
  2. String dsName = ds.getFullname();
  3. if (dsName == null || dsName.length() == 0)
  4. dsName = ds.getId();

代码示例来源:origin: net.sourceforge.ondex.modules/oxl

  1. /**
  2. * Writes DataSource content in a xml stream writer.
  3. *
  4. * @param xmlw
  5. * xml stream to write in
  6. * @param dataSource
  7. * DataSource object
  8. * @throws XMLStreamException
  9. * if xml writing fails
  10. */
  11. private void buildDataSourceContent(XMLStreamWriter2 xmlw,
  12. DataSource dataSource, RefOrVal rov) throws XMLStreamException {
  13. switch (rov) {
  14. case REF:
  15. buildIdRef(xmlw, dataSource);
  16. break;
  17. case VAL:
  18. xmlw.writeStartElement(XMLTagNames.ID);
  19. xmlw.writeCharacters(dataSource.getId());
  20. xmlw.writeEndElement();
  21. xmlw.writeStartElement(XMLTagNames.FULLNAME);
  22. xmlw.writeCharacters(dataSource.getFullname());
  23. xmlw.writeEndElement();
  24. xmlw.writeStartElement(XMLTagNames.DESCRIPTION);
  25. xmlw.writeCharacters(dataSource.getDescription());
  26. xmlw.writeEndElement();
  27. }
  28. }

代码示例来源:origin: net.sourceforge.ondex.core/tools

  1. if (!nomd.checkDataSource(dataSource.getId()))
  2. nomd
  3. .createDataSource(dataSource.getId(), dataSource.getFullname(), dataSource
  4. .getDescription());

相关文章