@Test public void testIsValid() throws Exception { GenericDocFactory factory = new GenericDocFactory(); assertTrue(factory.isValid(load("/sdmx-generic-sample.xml"))); assertFalse(factory.isValid(load("/sdmx-compact-sample.xml"))); }
@Override public boolean isValid(Document doc) { Optional<Node> dataSetNode = lookupDataSetNode(doc); return dataSetNode.isPresent() && hasKeyFamilyRef(dataSetNode.get()); }
GenericDocFactory extends AbstractDocumentFactory { @Override public boolean isValid(Document doc) { Optional<Node> dataSetNode = lookupDataSetNode(doc); return dataSetNode.isPresent() && hasKeyFamilyRef(dataSetNode.get()); } }
GenericDocFactory extends AbstractDocumentFactory { @Override public boolean isValid(Document doc) { Optional<Node> dataSetNode = lookupDataSetNode(doc); return dataSetNode.isPresent() && hasKeyFamilyRef(dataSetNode.get()); }  }
GenericDocFactory extends AbstractDocumentFactory { @Override public boolean isValid(Document doc) { Optional<Node> dataSetNode = lookupDataSetNode(doc); return dataSetNode.isPresent() && hasKeyFamilyRef(dataSetNode.get()); }  @Override String getName(); @Override boolean isValid(Document doc); @Override SdmxSource create(Document doc); }
GenericDocFactory extends AbstractDocumentFactory { @Override public boolean isValid(Document doc) { Optional<Node> dataSetNode = lookupDataSetNode(doc); return dataSetNode.isPresent() && hasKeyFamilyRef(dataSetNode.get()); }  @Override String getName(); @Override boolean isValid(Document doc); @Override SdmxSource create(Document doc);  }