@Override public boolean finish() { return super.finish(); }
@Override public boolean finish() { return super.finish(); }
@Override public boolean finish() { return super.finish(); }
public boolean addMetadata( InvDataset dataset) { // <dataset name="2005061512_NAM.wmo" urlPath="2005061512_NAM.wmo"/> java.util.regex.Matcher matcher = this.pattern.matcher( dataset.getName() ); if ( ! matcher.find()) return( false); // Pattern not found. StringBuffer startTime = new StringBuffer(); matcher.appendReplacement( startTime, this.substitutionPattern ); startTime.delete( 0, matcher.start() ); try { ((InvDatasetImpl) dataset).setTimeCoverage( new DateRange( new DateType( startTime.toString(), null, null), null, new TimeDuration( this.duration ), null ) ); } catch ( ParseException e ) { logger.debug( "Start time <" + startTime.toString() + "> or duration <" + this.duration + "> not parsable: " + e.getMessage()); return( false); } ( (InvDatasetImpl) dataset ).finish(); return ( true ); } }
public boolean addMetadata( InvDataset dataset) { // <dataset name="2005061512_NAM.wmo" urlPath="2005061512_NAM.wmo"/> java.util.regex.Matcher matcher = this.pattern.matcher( dataset.getName() ); if ( ! matcher.find()) return( false); // Pattern not found. StringBuffer startTime = new StringBuffer(); matcher.appendReplacement( startTime, this.substitutionPattern ); startTime.delete( 0, matcher.start() ); try { ((InvDatasetImpl) dataset).setTimeCoverage( new DateRange( new DateType( startTime.toString(), null, null), null, new TimeDuration( this.duration ), null ) ); } catch ( ParseException e ) { logger.debug( "Start time <" + startTime.toString() + "> or duration <" + this.duration + "> not parsable: " + e.getMessage()); return( false); } ( (InvDatasetImpl) dataset ).finish(); return ( true ); } }
public boolean addMetadata( InvDataset dataset) { // <dataset name="2005061512_NAM.wmo" urlPath="2005061512_NAM.wmo"/> java.util.regex.Matcher matcher = this.pattern.matcher( dataset.getName() ); if ( ! matcher.find()) return( false); // Pattern not found. StringBuffer startTime = new StringBuffer(); matcher.appendReplacement( startTime, this.substitutionPattern ); startTime.delete( 0, matcher.start() ); try { ((InvDatasetImpl) dataset).setTimeCoverage( new DateRange( new DateType( startTime.toString(), null, null), null, new TimeDuration( this.duration ), null ) ); } catch ( ParseException e ) { logger.debug( "Start time <" + startTime.toString() + "> or duration <" + this.duration + "> not parsable: " + e.getMessage()); return( false); } ( (InvDatasetImpl) dataset ).finish(); return ( true ); } }
/** * Finish constructing after all elements have been added or modified. * This routine will do any needed internal consistency work. * Its ok to call multiple times. * * @return true if successful. */ public boolean finish() { // make topDataset if needed //if (topDataset == null) { if (datasets.size() == 1) { // already only one; make it top topDataset = (InvDatasetImpl) datasets.get(0); } else { // create one topDataset = new InvDatasetImpl(null, name == null ? "Top Dataset" : name); for (InvDataset dataset : datasets) topDataset.addDataset((InvDatasetImpl) dataset); topDataset.setServicesLocal(services); } //} topDataset.setCatalog(this); // build dataset hash table dsHash = new HashMap<String, InvDataset>(); addDatasetIds(topDataset); // recurse through the datasets and finish them return topDataset.finish(); }
/** * Finish constructing after all elements have been added or modified. * This routine will do any needed internal consistency work. * Its ok to call multiple times. * * @return true if successful. */ public boolean finish() { // make topDataset if needed //if (topDataset == null) { if (datasets.size() == 1) { // already only one; make it top topDataset = (InvDatasetImpl) datasets.get(0); } else { // create one topDataset = new InvDatasetImpl(null, name == null ? "Top Dataset" : name); for (InvDataset dataset : datasets) topDataset.addDataset((InvDatasetImpl) dataset); topDataset.setServicesLocal(services); } //} topDataset.setCatalog(this); // build dataset hash table dsHash = new HashMap<String, InvDataset>(); addDatasetIds(topDataset); // recurse through the datasets and finish them return topDataset.finish(); }
/** * Finish constructing after all elements have been added or modified. * This routine will do any needed internal consistency work. * Its ok to call multiple times. * * @return true if successful. */ public boolean finish() { // make topDataset if needed //if (topDataset == null) { if (datasets.size() == 1) { // already only one; make it top topDataset = (InvDatasetImpl) datasets.get(0); } else { // create one topDataset = new InvDatasetImpl(null, name == null ? "Top Dataset" : name); for (InvDataset dataset : datasets) topDataset.addDataset((InvDatasetImpl) dataset); topDataset.setServicesLocal(services); } //} topDataset.setCatalog(this); // build dataset hash table dsHash = new HashMap<String, InvDataset>(); addDatasetIds(topDataset); // recurse through the datasets and finish them return topDataset.finish(); }
/** * Construct an InvDatasetImpl which refers to a urlPath. * This is used to create a standalone InvDatasetImpl, outside of an InvCatalog. * An "anonymous" InvServerImpl is created and attached to the InvDataset. * * @param urlPath : construct URL from this path * @param dataType : data type * @param stype : ServiceType */ public InvDatasetImpl(String urlPath, FeatureType dataType, ServiceType stype) { super(null, "local file"); tm.setDataType(dataType); tm.setServiceName("anon"); this.urlPath = urlPath; // create anonymous service addService(new InvService(tm.getServiceName(), stype.toString(), "", "", null)); finish(); }
/** * Construct an InvDatasetImpl which refers to a urlPath. * This is used to create a standalone InvDatasetImpl, outside of an InvCatalog. * An "anonymous" InvServerImpl is created and attached to the InvDataset. * * @param urlPath : construct URL from this path * @param dataType : data type * @param stype : ServiceType */ public InvDatasetImpl(String urlPath, FeatureType dataType, ServiceType stype) { super(null, "local file"); tm.setDataType(dataType); tm.setServiceName("anon"); this.urlPath = urlPath; // create anonomous service addService(new InvService(tm.getServiceName(), stype.toString(), "", "", null)); finish(); }
/** * Construct an InvDatasetImpl which refers to a urlPath. * This is used to create a standalone InvDatasetImpl, outside of an InvCatalog. * An "anonymous" InvServerImpl is created and attached to the InvDataset. * * @param urlPath : construct URL from this path * @param dataType : data type * @param stype : ServiceType */ public InvDatasetImpl(String urlPath, FeatureType dataType, ServiceType stype) { super(null, "local file"); tm.setDataType(dataType); tm.setServiceName("anon"); this.urlPath = urlPath; // create anonymous service addService(new InvService(tm.getServiceName(), stype.toString(), "", "", null)); finish(); }
private InvDatasetImpl createDataset(String[] serviceTypeNames) throws URISyntaxException { final InvDatasetImpl dapDataset = new InvDatasetImpl(null, "datasetName", FeatureType.NONE, serviceTypeNames[0], "http://wherever.you.want.bc"); final InvCatalogImpl catalog = new InvCatalogImpl("catalogName", "1.0", new URI("http://x.y")); dapDataset.setCatalog(catalog); for (String serviceName : serviceTypeNames) { final InvService dapService = new InvService(serviceName, serviceName, "irrelevant", "irrelevant", "irrelevant"); final InvAccessImpl invAccess = new InvAccessImpl(dapDataset, "http://y.z", dapService); dapDataset.addAccess(invAccess); } dapDataset.finish(); return dapDataset; }
ds.finish(); datasets.add(ds);
private InvDataset createDataset(InvCatalog catalog, String datasetName, final String serviceName) { final InvDatasetImpl dapDataset = new InvDatasetImpl(null, datasetName, FeatureType.NONE, serviceName, "http://wherever.you.want.bc"); dapDataset.setCatalog(catalog); final InvService dapService = new InvService(serviceName, serviceName, "irrelevant", "irrelevant", "irrelevant"); dapDataset.addAccess(new InvAccessImpl(dapDataset, "http://y.z", dapService)); dapDataset.finish(); return dapDataset; }
private InvDatasetImpl createDataset(InvCatalogImpl catalog, String datasetName, final String serviceName) { final InvDatasetImpl dapDataset = new InvDatasetImpl(null, datasetName, FeatureType.NONE, serviceName, "http://wherever.you.want.bc"); dapDataset.setCatalog(catalog); final InvService dapService = new InvService(serviceName, serviceName, "irrelevant", "irrelevant", "irrelevant"); dapDataset.addAccess(new InvAccessImpl(dapDataset, "http://y.z", dapService)); dapDataset.finish(); return dapDataset; }
private InvDatasetImpl createDataset(InvCatalogImpl catalog, String datasetName, final String serviceName) { final InvDatasetImpl dapDataset = new InvDatasetImpl(null, datasetName, FeatureType.NONE, serviceName, "http://wherever.you.want.bc"); dapDataset.setCatalog(catalog); final InvService dapService = new InvService(serviceName, serviceName, "irrelevant", "irrelevant", "irrelevant"); dapDataset.addAccess(new InvAccessImpl(dapDataset, "http://y.z", dapService)); dapDataset.finish(); return dapDataset; }
ThreddsMetadata tm = ds.getLocalMetadata(); ds.getLocalMetadataInheritable().setServiceName(collectionService.getName()); ds.finish(); top.addDataset(ds);