private InvCatalogRef createCatalogRefDataset() { final InvCatalogRef catalogRef = new InvCatalogRef(null, "catalogName", "irrelevant"); catalogRef.setCatalog(catalog); return catalogRef; }
protected InvCatalogRef readCatalogRef(InvCatalogImpl cat, InvDatasetImpl parent, Element catRefElem, URI baseURI) { String title = catRefElem.getAttributeValue("title", xlinkNS); if (title == null) title = catRefElem.getAttributeValue("name"); String href = catRefElem.getAttributeValue("href", xlinkNS); String useRemCatSerStr = catRefElem.getAttributeValue("useRemoteCatalogService"); Boolean useRemoteCatalogService = null; if (useRemCatSerStr != null) useRemoteCatalogService = Boolean.parseBoolean(useRemCatSerStr); InvCatalogRef catRef = new InvCatalogRef(parent, title, href, useRemoteCatalogService); readDatasetInfo(cat, catRef, catRefElem, baseURI); return catRef; }
protected InvCatalogRef readCatalogRef(InvCatalogImpl cat, InvDatasetImpl parent, Element catRefElem, URI baseURI) { String title = catRefElem.getAttributeValue("title", xlinkNS); if (title == null) title = catRefElem.getAttributeValue("name"); String href = catRefElem.getAttributeValue("href", xlinkNS); String useRemCatSerStr = catRefElem.getAttributeValue("useRemoteCatalogService"); Boolean useRemoteCatalogService = null; if (useRemCatSerStr != null) useRemoteCatalogService = Boolean.parseBoolean(useRemCatSerStr); InvCatalogRef catRef = new InvCatalogRef(parent, title, href, useRemoteCatalogService); readDatasetInfo(cat, catRef, catRefElem, baseURI); return catRef; }
protected InvCatalogRef readCatalogRef( InvCatalogImpl cat, InvDatasetImpl parent, Element catRefElem, URI baseURI) { String title = catRefElem.getAttributeValue("title", xlinkNS); if (title == null) title = catRefElem.getAttributeValue("name"); String href = catRefElem.getAttributeValue("href", xlinkNS); InvCatalogRef catRef = new InvCatalogRef( parent, title, href); readDatasetInfo( cat, catRef, catRefElem, baseURI); return catRef; }
InvCatalogRef filesCat = new InvCatalogRef(this, FILES, getCatalogHref(FILES)); filesCat.finish(); datasets.add(filesCat);
InvDatasetImpl ds = new InvCatalogRef(this, RUN_TITLE, getCatalogHref(RUNS)); ds.finish(); datasets.add(ds); InvDatasetImpl ds = new InvCatalogRef(this, FORECAST_TITLE, getCatalogHref(FORECAST)); ds.finish(); datasets.add(ds); InvDatasetImpl ds = new InvCatalogRef(this, OFFSET_TITLE, getCatalogHref(OFFSET)); ds.finish(); datasets.add(ds); InvCatalogRef filesCat = new InvCatalogRef(this, FILES, getCatalogHref(FILES)); filesCat.finish(); datasets.add(filesCat);
InvDatasetImpl ds = new InvCatalogRef(this, TITLE_RUNS, getCatalogHref(RUNS)); ds.finish(); datasets.add( ds); ds = new InvCatalogRef(this, TITLE_RUNS, getCatalogHref(RUNS)); ds.finish(); datasets.add( ds); ds = new InvCatalogRef(this, TITLE_OFFSET, getCatalogHref(OFFSET)); ds.finish(); datasets.add( ds); ds = new InvCatalogRef(this, TITLE_FORECAST, getCatalogHref(FORECAST)); ds.finish(); datasets.add( ds);
curInvDs = new InvCatalogRef( parentInvDs, newName, this.getXlinkHref( crawlableDs ) );
curInvDs = new InvCatalogRef( parentInvDs, newName, this.getXlinkHref( crawlableDs ) );
curInvDs = new InvCatalogRef( parentInvDs, newName, this.getXlinkHref( crawlableDs ) );
InvCatalogRef curCatRef = new InvCatalogRef( (InvDatasetImpl) collectionDataset, title, docName); ((InvDatasetImpl) collectionDataset).addDataset( curCatRef);
resultDs = new InvCatalogRef( null, catRef.getName(), catRef.getXlinkHref()); } else { resultDs = new InvDatasetImpl( null, dataset.getName() );
InvCatalogRef curCatRef = new InvCatalogRef( (InvDatasetImpl) collectionDataset, title, docName); ((InvDatasetImpl) collectionDataset).addDataset( curCatRef);
InvCatalogRef curCatRef = new InvCatalogRef( (InvDatasetImpl) collectionDataset, title, docName); ((InvDatasetImpl) collectionDataset).addDataset( curCatRef);
resultDs = new InvCatalogRef( null, catRef.getName(), catRef.getXlinkHref()); } else { resultDs = new InvDatasetImpl( null, dataset.getName() );
resultDs = new InvCatalogRef( null, catRef.getName(), catRef.getXlinkHref()); } else { resultDs = new InvDatasetImpl( null, dataset.getName() );
InvDatasetImpl ds = new InvCatalogRef(this, RUN_TITLE, getCatalogHref(RUNS)); ds.finish(); top.addDataset(ds); InvDatasetImpl ds = new InvCatalogRef(this, FORECAST_TITLE, getCatalogHref(FORECAST)); ds.finish(); top.addDataset(ds); InvDatasetImpl ds = new InvCatalogRef(this, OFFSET_TITLE, getCatalogHref(OFFSET)); ds.finish(); top.addDataset(ds); InvCatalogRef filesCat = new InvCatalogRef(this, FILES, getCatalogHref(FILES)); filesCat.finish(); top.addDataset(filesCat);
@Test public void testAppendCatalogNodeToParent() throws URISyntaxException { //preparation final URI whatever = null; final InvCatalogRef catalogReference = new InvCatalogRef(null, "catalogRefName", "http://a.b"); catalogReference.setCatalog(new InvCatalogImpl("whatever", "1.0", whatever)); //execution CatalogTreeUtils.appendCatalogNode(parentNode, getDefaultTreeModel(), catalogReference); //verification assertEquals(1, parentNode.getChildCount()); assertEquals(1, parentNode.getChildAt(0).getChildCount()); final DefaultMutableTreeNode child1 = (DefaultMutableTreeNode) parentNode.getChildAt(0); assertEquals(true, child1.getUserObject() instanceof String); assertEquals("catalogRefName", child1.getUserObject()); final DefaultMutableTreeNode child2 = (DefaultMutableTreeNode) parentNode.getChildAt(0).getChildAt(0); assertEquals(true, child2.getUserObject() instanceof CatalogNode); final CatalogNode catalogNode = (CatalogNode) child2.getUserObject(); assertEquals("http://a.b", catalogNode.getCatalogUri()); }
InvCatalogRef filesCat = new InvCatalogRef(this, FILES, getCatalogHref(FILES)); filesCat.finish(); top.addDataset(filesCat);