@Test public void addAtomAttribute() { data.addAtomAttribute("title", "Atom1", "Attr1"); Assert.assertEquals(data.getAtoms().size(), 1); Assert.assertEquals(data.getAttributes().size(), 1); Assert.assertTrue(data.getAtoms().contains("Atom1")); Assert.assertTrue(data.getAttributes().contains("Attr1")); data.addAtomAttribute("description", "Atom1", "Attr2"); Assert.assertEquals(data.getAtoms().size(), 1); Assert.assertEquals(data.getAttributes().size(), 2); Assert.assertTrue(data.getAtoms().contains("Atom1")); Assert.assertTrue(data.getAttributes().contains("Attr1")); Assert.assertTrue(data.getAttributes().contains("Attr2")); data.addAtomAttribute("title", "Atom2", "Attr1"); Assert.assertEquals(data.getAtoms().size(), 2); Assert.assertEquals(data.getAttributes().size(), 2); Assert.assertTrue(data.getAtoms().contains("Atom1")); Assert.assertTrue(data.getAtoms().contains("Atom2")); Assert.assertTrue(data.getAttributes().contains("Attr1")); Assert.assertTrue(data.getAttributes().contains("Attr2")); }
public void addAtomAttribute(String sliceName, String atomUri, String attributeValue) { checkAttributeOrAtomName(atomUri); checkAttributeOrAtomName(attributeValue); checkSliceName(sliceName, false); int x1 = addAtom(atomUri); int x2 = addAttribute(attributeValue); int x3 = addSlice(sliceName); tensor.setEntry(1.0d, x1, x2, x3); }
TensorMatchingData { public void addAtomAttribute(String sliceName, String atomUri, String attributeValue) { checkAttributeOrAtomName(atomUri); checkAttributeOrAtomName(attributeValue); checkSliceName(sliceName, false); int x1 = addAtom(atomUri); int x2 = addAttribute(attributeValue); int x3 = addSlice(sliceName); tensor.setEntry(1.0d, x1, x2, x3); } }
TensorMatchingData { public void addAtomAttribute(String sliceName, String atomUri, String attributeValue) { checkAttributeOrAtomName(atomUri); checkAttributeOrAtomName(attributeValue); checkSliceName(sliceName, false); int x1 = addAtom(atomUri); int x2 = addAttribute(attributeValue); int x3 = addSlice(sliceName); tensor.setEntry(1.0d, x1, x2, x3); } TensorMatchingData(); }
TensorMatchingData { public void addAtomAttribute(String sliceName, String atomUri, String attributeValue) { checkAttributeOrAtomName(atomUri); checkAttributeOrAtomName(attributeValue); checkSliceName(sliceName, false); int x1 = addAtom(atomUri); int x2 = addAttribute(attributeValue); int x3 = addSlice(sliceName); tensor.setEntry(1.0d, x1, x2, x3); } TensorMatchingData(); void addAtomConnection(String atom1, String atom2, boolean addOnlyIfAtomsExist); void addAtomAttribute(String sliceName, String atomUri, String attributeValue); void addAtomAttribute(TensorEntry entry); String getFirstAttributeOfAtom(String atom, String slice); boolean isValidTensor(); int[] getTensorDimensions(); ArrayList<String> getAtomHeaders(); List<String> getAtoms(); List<String> getAttributes(); List<String> getSlices(); int getNumberOfConnections(); TensorMatchingData writeCleanedOutputFiles(String folder); void writeOutputFiles(String folder); }
TensorMatchingData { public void addAtomAttribute(String sliceName, String atomUri, String attributeValue) { checkAttributeOrAtomName(atomUri); checkAttributeOrAtomName(attributeValue); checkSliceName(sliceName, false); int x1 = addAtom(atomUri); int x2 = addAttribute(attributeValue); int x3 = addSlice(sliceName); tensor.setEntry(1.0d, x1, x2, x3); } TensorMatchingData(); void addAtomConnection(String atom1, String atom2, boolean addOnlyIfAtomsExist); void addAtomAttribute(String sliceName, String atomUri, String attributeValue); void addAtomAttribute(TensorEntry entry); String getFirstAttributeOfAtom(String atom, String slice); boolean isValidTensor(); int[] getTensorDimensions(); ArrayList<String> getAtomHeaders(); List<String> getAtoms(); List<String> getAttributes(); List<String> getSlices(); int getNumberOfConnections(); TensorMatchingData writeCleanedOutputFiles(String folder); void writeOutputFiles(String folder); static final String HEADERS_FILE; static final String ATOM_INDICES_FILE; static final String CONNECTION_SLICE_NAME; }