target
stringlengths
20
113k
src_fm
stringlengths
11
86.3k
src_fm_fc
stringlengths
21
86.4k
src_fm_fc_co
stringlengths
30
86.4k
src_fm_fc_ms
stringlengths
42
86.8k
src_fm_fc_ms_ff
stringlengths
43
86.8k
@Test public void shouldInitializeTicket() throws URISyntaxException { processSut.initialize(validProps()); verify(ticketMock).setRemoteInputFolder(new URI("http: }
public void initialize(Properties initProps) { props = initProps; hotfolderManager = createHotfolderManager(); abbyyTicket = createAbbyyTicket(this); processId = java.util.UUID.randomUUID().toString(); windowsPathForServer = props.getProperty("serverOutputLocation"); try { URI serverUri = new URI(props.getProperty("ser...
AbbyyProcess extends AbstractProcess implements OcrProcess,Serializable,Cloneable, Runnable { public void initialize(Properties initProps) { props = initProps; hotfolderManager = createHotfolderManager(); abbyyTicket = createAbbyyTicket(this); processId = java.util.UUID.randomUUID().toString(); windowsPathForServer =...
AbbyyProcess extends AbstractProcess implements OcrProcess,Serializable,Cloneable, Runnable { public void initialize(Properties initProps) { props = initProps; hotfolderManager = createHotfolderManager(); abbyyTicket = createAbbyyTicket(this); processId = java.util.UUID.randomUUID().toString(); windowsPathForServer =...
AbbyyProcess extends AbstractProcess implements OcrProcess,Serializable,Cloneable, Runnable { public void initialize(Properties initProps) { props = initProps; hotfolderManager = createHotfolderManager(); abbyyTicket = createAbbyyTicket(this); processId = java.util.UUID.randomUUID().toString(); windowsPathForServer =...
AbbyyProcess extends AbstractProcess implements OcrProcess,Serializable,Cloneable, Runnable { public void initialize(Properties initProps) { props = initProps; hotfolderManager = createHotfolderManager(); abbyyTicket = createAbbyyTicket(this); processId = java.util.UUID.randomUUID().toString(); windowsPathForServer =...
@Test(expected=IllegalArgumentException.class) public void shouldNotAcceptIllegalUri() throws URISyntaxException { Properties props = validProps(); props.setProperty("serverUrl", ">not-a-url"); processSut.initialize(props); }
public void initialize(Properties initProps) { props = initProps; hotfolderManager = createHotfolderManager(); abbyyTicket = createAbbyyTicket(this); processId = java.util.UUID.randomUUID().toString(); windowsPathForServer = props.getProperty("serverOutputLocation"); try { URI serverUri = new URI(props.getProperty("ser...
AbbyyProcess extends AbstractProcess implements OcrProcess,Serializable,Cloneable, Runnable { public void initialize(Properties initProps) { props = initProps; hotfolderManager = createHotfolderManager(); abbyyTicket = createAbbyyTicket(this); processId = java.util.UUID.randomUUID().toString(); windowsPathForServer =...
AbbyyProcess extends AbstractProcess implements OcrProcess,Serializable,Cloneable, Runnable { public void initialize(Properties initProps) { props = initProps; hotfolderManager = createHotfolderManager(); abbyyTicket = createAbbyyTicket(this); processId = java.util.UUID.randomUUID().toString(); windowsPathForServer =...
AbbyyProcess extends AbstractProcess implements OcrProcess,Serializable,Cloneable, Runnable { public void initialize(Properties initProps) { props = initProps; hotfolderManager = createHotfolderManager(); abbyyTicket = createAbbyyTicket(this); processId = java.util.UUID.randomUUID().toString(); windowsPathForServer =...
AbbyyProcess extends AbstractProcess implements OcrProcess,Serializable,Cloneable, Runnable { public void initialize(Properties initProps) { props = initProps; hotfolderManager = createHotfolderManager(); abbyyTicket = createAbbyyTicket(this); processId = java.util.UUID.randomUUID().toString(); windowsPathForServer =...
@Test public void shouldCombineProperties() { Properties combinedProps = factorySut.getCombinedProps(); assertEquals("userValue", combinedProps.getProperty("userKey")); assertEquals("fileValue", combinedProps.getProperty("fileKey")); }
protected Properties getCombinedProps() { String configFile = userProperties.getProperty("abbyy.config", "gbv-antiqua.properties"); FileAccess fileAccess = beanProvider.getFileAccess(); Properties fileProps = fileAccess.getPropertiesFromFile(configFile); Properties combinedProps = new Properties(fileProps); for (String...
AbbyyFactory extends OcrFactoryWithProperties { protected Properties getCombinedProps() { String configFile = userProperties.getProperty("abbyy.config", "gbv-antiqua.properties"); FileAccess fileAccess = beanProvider.getFileAccess(); Properties fileProps = fileAccess.getPropertiesFromFile(configFile); Properties combin...
AbbyyFactory extends OcrFactoryWithProperties { protected Properties getCombinedProps() { String configFile = userProperties.getProperty("abbyy.config", "gbv-antiqua.properties"); FileAccess fileAccess = beanProvider.getFileAccess(); Properties fileProps = fileAccess.getPropertiesFromFile(configFile); Properties combin...
AbbyyFactory extends OcrFactoryWithProperties { protected Properties getCombinedProps() { String configFile = userProperties.getProperty("abbyy.config", "gbv-antiqua.properties"); FileAccess fileAccess = beanProvider.getFileAccess(); Properties fileProps = fileAccess.getPropertiesFromFile(configFile); Properties combin...
AbbyyFactory extends OcrFactoryWithProperties { protected Properties getCombinedProps() { String configFile = userProperties.getProperty("abbyy.config", "gbv-antiqua.properties"); FileAccess fileAccess = beanProvider.getFileAccess(); Properties fileProps = fileAccess.getPropertiesFromFile(configFile); Properties combin...
@Test public void shouldUseDefaultConfigFile() { factorySut.getCombinedProps(); verify(fileAccessMock).getPropertiesFromFile("gbv-antiqua.properties"); }
protected Properties getCombinedProps() { String configFile = userProperties.getProperty("abbyy.config", "gbv-antiqua.properties"); FileAccess fileAccess = beanProvider.getFileAccess(); Properties fileProps = fileAccess.getPropertiesFromFile(configFile); Properties combinedProps = new Properties(fileProps); for (String...
AbbyyFactory extends OcrFactoryWithProperties { protected Properties getCombinedProps() { String configFile = userProperties.getProperty("abbyy.config", "gbv-antiqua.properties"); FileAccess fileAccess = beanProvider.getFileAccess(); Properties fileProps = fileAccess.getPropertiesFromFile(configFile); Properties combin...
AbbyyFactory extends OcrFactoryWithProperties { protected Properties getCombinedProps() { String configFile = userProperties.getProperty("abbyy.config", "gbv-antiqua.properties"); FileAccess fileAccess = beanProvider.getFileAccess(); Properties fileProps = fileAccess.getPropertiesFromFile(configFile); Properties combin...
AbbyyFactory extends OcrFactoryWithProperties { protected Properties getCombinedProps() { String configFile = userProperties.getProperty("abbyy.config", "gbv-antiqua.properties"); FileAccess fileAccess = beanProvider.getFileAccess(); Properties fileProps = fileAccess.getPropertiesFromFile(configFile); Properties combin...
AbbyyFactory extends OcrFactoryWithProperties { protected Properties getCombinedProps() { String configFile = userProperties.getProperty("abbyy.config", "gbv-antiqua.properties"); FileAccess fileAccess = beanProvider.getFileAccess(); Properties fileProps = fileAccess.getPropertiesFromFile(configFile); Properties combin...
@Test public void shouldStartEngine() throws UnsupportedEncodingException { when(validatorMock.validateParameters(any(OcrParameters.class))).thenReturn("OK"); main.execute(validOptions()); verify(engineStarterMock).startOcrWithParams(any(OcrParameters.class)); }
void execute(String[] args) throws UnsupportedEncodingException { initOptions(args); if (terminated) { return; } OcrParameters params = transformOptions(); if (terminated) { return; } String validationMessage = paramValidator.validateParameters(params); if ("OK".equals(validationMessage)) { out.println("Starting OCR......
Main { void execute(String[] args) throws UnsupportedEncodingException { initOptions(args); if (terminated) { return; } OcrParameters params = transformOptions(); if (terminated) { return; } String validationMessage = paramValidator.validateParameters(params); if ("OK".equals(validationMessage)) { out.println("Starting...
Main { void execute(String[] args) throws UnsupportedEncodingException { initOptions(args); if (terminated) { return; } OcrParameters params = transformOptions(); if (terminated) { return; } String validationMessage = paramValidator.validateParameters(params); if ("OK".equals(validationMessage)) { out.println("Starting...
Main { void execute(String[] args) throws UnsupportedEncodingException { initOptions(args); if (terminated) { return; } OcrParameters params = transformOptions(); if (terminated) { return; } String validationMessage = paramValidator.validateParameters(params); if ("OK".equals(validationMessage)) { out.println("Starting...
Main { void execute(String[] args) throws UnsupportedEncodingException { initOptions(args); if (terminated) { return; } OcrParameters params = transformOptions(); if (terminated) { return; } String validationMessage = paramValidator.validateParameters(params); if ("OK".equals(validationMessage)) { out.println("Starting...
@Test public void shouldDeleteRemoteOutputs() throws URISyntaxException, IOException { List<OcrOutput> outputsToDelete = validOutputs(); managerSut.deleteOutputs(outputsToDelete); verify(hotfolderMock, times(2)).deleteIfExists(any(URI.class)); }
public void deleteOutputs(List<OcrOutput> outputs) throws IOException { for (OcrOutput out : outputs) { AbbyyOutput abbyyOut = (AbbyyOutput) out; URI remoteUri = abbyyOut.getRemoteUri(); hotfolder.deleteIfExists(remoteUri); } }
HotfolderManager { public void deleteOutputs(List<OcrOutput> outputs) throws IOException { for (OcrOutput out : outputs) { AbbyyOutput abbyyOut = (AbbyyOutput) out; URI remoteUri = abbyyOut.getRemoteUri(); hotfolder.deleteIfExists(remoteUri); } } }
HotfolderManager { public void deleteOutputs(List<OcrOutput> outputs) throws IOException { for (OcrOutput out : outputs) { AbbyyOutput abbyyOut = (AbbyyOutput) out; URI remoteUri = abbyyOut.getRemoteUri(); hotfolder.deleteIfExists(remoteUri); } } HotfolderManager(String serverUrl, String user, String password); Hotfo...
HotfolderManager { public void deleteOutputs(List<OcrOutput> outputs) throws IOException { for (OcrOutput out : outputs) { AbbyyOutput abbyyOut = (AbbyyOutput) out; URI remoteUri = abbyyOut.getRemoteUri(); hotfolder.deleteIfExists(remoteUri); } } HotfolderManager(String serverUrl, String user, String password); Hotfo...
HotfolderManager { public void deleteOutputs(List<OcrOutput> outputs) throws IOException { for (OcrOutput out : outputs) { AbbyyOutput abbyyOut = (AbbyyOutput) out; URI remoteUri = abbyyOut.getRemoteUri(); hotfolder.deleteIfExists(remoteUri); } } HotfolderManager(String serverUrl, String user, String password); Hotfo...
@Test public void shouldDeleteRemoteImages() throws URISyntaxException, IOException { List<OcrImage> imagesToDelete = validImages(); managerSut.deleteImages(imagesToDelete); verify(hotfolderMock, times(4)).deleteIfExists(any(URI.class)); }
public void deleteImages(List<OcrImage> images) throws IOException { for (OcrImage ocrImage : images) { AbbyyImage image = (AbbyyImage) ocrImage; URI remoteUri = image.getRemoteUri(); hotfolder.deleteIfExists(remoteUri); URI errorImageUri = image.getErrorUri(); hotfolder.deleteIfExists(errorImageUri); } }
HotfolderManager { public void deleteImages(List<OcrImage> images) throws IOException { for (OcrImage ocrImage : images) { AbbyyImage image = (AbbyyImage) ocrImage; URI remoteUri = image.getRemoteUri(); hotfolder.deleteIfExists(remoteUri); URI errorImageUri = image.getErrorUri(); hotfolder.deleteIfExists(errorImageUri)...
HotfolderManager { public void deleteImages(List<OcrImage> images) throws IOException { for (OcrImage ocrImage : images) { AbbyyImage image = (AbbyyImage) ocrImage; URI remoteUri = image.getRemoteUri(); hotfolder.deleteIfExists(remoteUri); URI errorImageUri = image.getErrorUri(); hotfolder.deleteIfExists(errorImageUri)...
HotfolderManager { public void deleteImages(List<OcrImage> images) throws IOException { for (OcrImage ocrImage : images) { AbbyyImage image = (AbbyyImage) ocrImage; URI remoteUri = image.getRemoteUri(); hotfolder.deleteIfExists(remoteUri); URI errorImageUri = image.getErrorUri(); hotfolder.deleteIfExists(errorImageUri)...
HotfolderManager { public void deleteImages(List<OcrImage> images) throws IOException { for (OcrImage ocrImage : images) { AbbyyImage image = (AbbyyImage) ocrImage; URI remoteUri = image.getRemoteUri(); hotfolder.deleteIfExists(remoteUri); URI errorImageUri = image.getErrorUri(); hotfolder.deleteIfExists(errorImageUri)...
@Test public void shouldUploadImages() throws URISyntaxException, IOException { List<OcrImage> imagesToCopy = validImages(); managerSut.copyImagesToHotfolder(imagesToCopy); verify(hotfolderMock).upload(new URI("file:/01.tif"), new URI("http: verify(hotfolderMock).upload(new URI("file:/02.tif"), new URI("http: }
public void copyImagesToHotfolder(List<OcrImage> ocrImages) throws IOException { for (OcrImage ocrImage : ocrImages) { AbbyyImage image = (AbbyyImage) ocrImage; URI fromUri = image.getLocalUri(); URI toUri = image.getRemoteUri(); hotfolder.upload(fromUri, toUri); } }
HotfolderManager { public void copyImagesToHotfolder(List<OcrImage> ocrImages) throws IOException { for (OcrImage ocrImage : ocrImages) { AbbyyImage image = (AbbyyImage) ocrImage; URI fromUri = image.getLocalUri(); URI toUri = image.getRemoteUri(); hotfolder.upload(fromUri, toUri); } } }
HotfolderManager { public void copyImagesToHotfolder(List<OcrImage> ocrImages) throws IOException { for (OcrImage ocrImage : ocrImages) { AbbyyImage image = (AbbyyImage) ocrImage; URI fromUri = image.getLocalUri(); URI toUri = image.getRemoteUri(); hotfolder.upload(fromUri, toUri); } } HotfolderManager(String serverUrl...
HotfolderManager { public void copyImagesToHotfolder(List<OcrImage> ocrImages) throws IOException { for (OcrImage ocrImage : ocrImages) { AbbyyImage image = (AbbyyImage) ocrImage; URI fromUri = image.getLocalUri(); URI toUri = image.getRemoteUri(); hotfolder.upload(fromUri, toUri); } } HotfolderManager(String serverUrl...
HotfolderManager { public void copyImagesToHotfolder(List<OcrImage> ocrImages) throws IOException { for (OcrImage ocrImage : ocrImages) { AbbyyImage image = (AbbyyImage) ocrImage; URI fromUri = image.getLocalUri(); URI toUri = image.getRemoteUri(); hotfolder.upload(fromUri, toUri); } } HotfolderManager(String serverUrl...
@Test public void shouldDownloadResultOutputs() throws URISyntaxException, IOException { List<OcrOutput> outputsToMove = validOutputs(); managerSut.retrieveResults(outputsToMove); verify(hotfolderMock).download(new URI("http: verify(hotfolderMock).deleteIfExists(new URI("http: verify(hotfolderMock).download(new URI("ht...
public void retrieveResults(List<OcrOutput> ocrOutputs) throws IOException { for (OcrOutput entry : ocrOutputs) { AbbyyOutput o = (AbbyyOutput) entry; URI remoteUri = o.getRemoteUri(); URI localUri = o.getLocalUri(); hotfolder.download(remoteUri, localUri); hotfolder.deleteIfExists(remoteUri); } }
HotfolderManager { public void retrieveResults(List<OcrOutput> ocrOutputs) throws IOException { for (OcrOutput entry : ocrOutputs) { AbbyyOutput o = (AbbyyOutput) entry; URI remoteUri = o.getRemoteUri(); URI localUri = o.getLocalUri(); hotfolder.download(remoteUri, localUri); hotfolder.deleteIfExists(remoteUri); } } }
HotfolderManager { public void retrieveResults(List<OcrOutput> ocrOutputs) throws IOException { for (OcrOutput entry : ocrOutputs) { AbbyyOutput o = (AbbyyOutput) entry; URI remoteUri = o.getRemoteUri(); URI localUri = o.getLocalUri(); hotfolder.download(remoteUri, localUri); hotfolder.deleteIfExists(remoteUri); } } Ho...
HotfolderManager { public void retrieveResults(List<OcrOutput> ocrOutputs) throws IOException { for (OcrOutput entry : ocrOutputs) { AbbyyOutput o = (AbbyyOutput) entry; URI remoteUri = o.getRemoteUri(); URI localUri = o.getLocalUri(); hotfolder.download(remoteUri, localUri); hotfolder.deleteIfExists(remoteUri); } } Ho...
HotfolderManager { public void retrieveResults(List<OcrOutput> ocrOutputs) throws IOException { for (OcrOutput entry : ocrOutputs) { AbbyyOutput o = (AbbyyOutput) entry; URI remoteUri = o.getRemoteUri(); URI localUri = o.getLocalUri(); hotfolder.download(remoteUri, localUri); hotfolder.deleteIfExists(remoteUri); } } Ho...
@Test public void shouldSendTicket() throws URISyntaxException, IOException { AbbyyTicket ticketMock = mock(AbbyyTicket.class); when(ticketMock.getRemoteInputUri()).thenReturn(new URI("http: managerSut.createAndSendTicket(ticketMock, "ticket"); verify(hotfolderMock).copyTmpFile("ticket.xml", new URI("http: }
public void createAndSendTicket(AbbyyTicket abbyyTicket, String name) throws IOException, URISyntaxException { String ticketFileName = name + ".xml"; URI inputTicketUri = abbyyTicket.getRemoteInputUri(); OutputStream os = hotfolder.createTmpFile(ticketFileName); abbyyTicket.write(os); if (os != null) os.close(); hotfol...
HotfolderManager { public void createAndSendTicket(AbbyyTicket abbyyTicket, String name) throws IOException, URISyntaxException { String ticketFileName = name + ".xml"; URI inputTicketUri = abbyyTicket.getRemoteInputUri(); OutputStream os = hotfolder.createTmpFile(ticketFileName); abbyyTicket.write(os); if (os != null)...
HotfolderManager { public void createAndSendTicket(AbbyyTicket abbyyTicket, String name) throws IOException, URISyntaxException { String ticketFileName = name + ".xml"; URI inputTicketUri = abbyyTicket.getRemoteInputUri(); OutputStream os = hotfolder.createTmpFile(ticketFileName); abbyyTicket.write(os); if (os != null)...
HotfolderManager { public void createAndSendTicket(AbbyyTicket abbyyTicket, String name) throws IOException, URISyntaxException { String ticketFileName = name + ".xml"; URI inputTicketUri = abbyyTicket.getRemoteInputUri(); OutputStream os = hotfolder.createTmpFile(ticketFileName); abbyyTicket.write(os); if (os != null)...
HotfolderManager { public void createAndSendTicket(AbbyyTicket abbyyTicket, String name) throws IOException, URISyntaxException { String ticketFileName = name + ".xml"; URI inputTicketUri = abbyyTicket.getRemoteInputUri(); OutputStream os = hotfolder.createTmpFile(ticketFileName); abbyyTicket.write(os); if (os != null)...
@Test public void shouldWaitForResultsVeryShort() throws URISyntaxException, TimeoutException, IOException { List<OcrOutput> outputsToWaitFor = validOutputs(); when(hotfolderMock.exists(any(URI.class))).thenReturn(true); when(hotfolderMock.exists(new URI("http: managerSut.waitForResults(10, 1, outputsToWaitFor, new URI...
public void waitForResults(long timeout, long waitInterval, List<OcrOutput> outputs, URI errorResultXmlUri) throws TimeoutException, IOException { long start = System.currentTimeMillis(); List<URI> mustBeThereUris = extractFromOutputs(outputs); outerLoop: while (true) { checkIfError(start, timeout, errorResultXmlUri); ...
HotfolderManager { public void waitForResults(long timeout, long waitInterval, List<OcrOutput> outputs, URI errorResultXmlUri) throws TimeoutException, IOException { long start = System.currentTimeMillis(); List<URI> mustBeThereUris = extractFromOutputs(outputs); outerLoop: while (true) { checkIfError(start, timeout, e...
HotfolderManager { public void waitForResults(long timeout, long waitInterval, List<OcrOutput> outputs, URI errorResultXmlUri) throws TimeoutException, IOException { long start = System.currentTimeMillis(); List<URI> mustBeThereUris = extractFromOutputs(outputs); outerLoop: while (true) { checkIfError(start, timeout, e...
HotfolderManager { public void waitForResults(long timeout, long waitInterval, List<OcrOutput> outputs, URI errorResultXmlUri) throws TimeoutException, IOException { long start = System.currentTimeMillis(); List<URI> mustBeThereUris = extractFromOutputs(outputs); outerLoop: while (true) { checkIfError(start, timeout, e...
HotfolderManager { public void waitForResults(long timeout, long waitInterval, List<OcrOutput> outputs, URI errorResultXmlUri) throws TimeoutException, IOException { long start = System.currentTimeMillis(); List<URI> mustBeThereUris = extractFromOutputs(outputs); outerLoop: while (true) { checkIfError(start, timeout, e...
@Test public void shouldWaitOneIterationForEachFile() throws URISyntaxException, IOException, TimeoutException { List<OcrOutput> outputsToWaitFor = validOutputs(); when(hotfolderMock.exists(new URI("http: when(hotfolderMock.exists(new URI("http: when(hotfolderMock.exists(new URI("http: managerSut.waitForResults(10, 1, ...
public void waitForResults(long timeout, long waitInterval, List<OcrOutput> outputs, URI errorResultXmlUri) throws TimeoutException, IOException { long start = System.currentTimeMillis(); List<URI> mustBeThereUris = extractFromOutputs(outputs); outerLoop: while (true) { checkIfError(start, timeout, errorResultXmlUri); ...
HotfolderManager { public void waitForResults(long timeout, long waitInterval, List<OcrOutput> outputs, URI errorResultXmlUri) throws TimeoutException, IOException { long start = System.currentTimeMillis(); List<URI> mustBeThereUris = extractFromOutputs(outputs); outerLoop: while (true) { checkIfError(start, timeout, e...
HotfolderManager { public void waitForResults(long timeout, long waitInterval, List<OcrOutput> outputs, URI errorResultXmlUri) throws TimeoutException, IOException { long start = System.currentTimeMillis(); List<URI> mustBeThereUris = extractFromOutputs(outputs); outerLoop: while (true) { checkIfError(start, timeout, e...
HotfolderManager { public void waitForResults(long timeout, long waitInterval, List<OcrOutput> outputs, URI errorResultXmlUri) throws TimeoutException, IOException { long start = System.currentTimeMillis(); List<URI> mustBeThereUris = extractFromOutputs(outputs); outerLoop: while (true) { checkIfError(start, timeout, e...
HotfolderManager { public void waitForResults(long timeout, long waitInterval, List<OcrOutput> outputs, URI errorResultXmlUri) throws TimeoutException, IOException { long start = System.currentTimeMillis(); List<URI> mustBeThereUris = extractFromOutputs(outputs); outerLoop: while (true) { checkIfError(start, timeout, e...
@Test(expected=TimeoutException.class) public void shouldProvokeTimeout() throws URISyntaxException, IOException, TimeoutException { List<OcrOutput> outputsToWaitFor = validOutputs(); when(hotfolderMock.exists(new URI("http: managerSut.waitForResults(1, 1, outputsToWaitFor, new URI("http: }
public void waitForResults(long timeout, long waitInterval, List<OcrOutput> outputs, URI errorResultXmlUri) throws TimeoutException, IOException { long start = System.currentTimeMillis(); List<URI> mustBeThereUris = extractFromOutputs(outputs); outerLoop: while (true) { checkIfError(start, timeout, errorResultXmlUri); ...
HotfolderManager { public void waitForResults(long timeout, long waitInterval, List<OcrOutput> outputs, URI errorResultXmlUri) throws TimeoutException, IOException { long start = System.currentTimeMillis(); List<URI> mustBeThereUris = extractFromOutputs(outputs); outerLoop: while (true) { checkIfError(start, timeout, e...
HotfolderManager { public void waitForResults(long timeout, long waitInterval, List<OcrOutput> outputs, URI errorResultXmlUri) throws TimeoutException, IOException { long start = System.currentTimeMillis(); List<URI> mustBeThereUris = extractFromOutputs(outputs); outerLoop: while (true) { checkIfError(start, timeout, e...
HotfolderManager { public void waitForResults(long timeout, long waitInterval, List<OcrOutput> outputs, URI errorResultXmlUri) throws TimeoutException, IOException { long start = System.currentTimeMillis(); List<URI> mustBeThereUris = extractFromOutputs(outputs); outerLoop: while (true) { checkIfError(start, timeout, e...
HotfolderManager { public void waitForResults(long timeout, long waitInterval, List<OcrOutput> outputs, URI errorResultXmlUri) throws TimeoutException, IOException { long start = System.currentTimeMillis(); List<URI> mustBeThereUris = extractFromOutputs(outputs); outerLoop: while (true) { checkIfError(start, timeout, e...
@Test(expected=IOException.class) public void shouldFindErrorFile() throws URISyntaxException, IOException, TimeoutException { List<OcrOutput> outputsToWaitFor = validOutputs(); when(hotfolderMock.exists(new URI("http: managerSut.waitForResults(1, 1, outputsToWaitFor, new URI("http: }
public void waitForResults(long timeout, long waitInterval, List<OcrOutput> outputs, URI errorResultXmlUri) throws TimeoutException, IOException { long start = System.currentTimeMillis(); List<URI> mustBeThereUris = extractFromOutputs(outputs); outerLoop: while (true) { checkIfError(start, timeout, errorResultXmlUri); ...
HotfolderManager { public void waitForResults(long timeout, long waitInterval, List<OcrOutput> outputs, URI errorResultXmlUri) throws TimeoutException, IOException { long start = System.currentTimeMillis(); List<URI> mustBeThereUris = extractFromOutputs(outputs); outerLoop: while (true) { checkIfError(start, timeout, e...
HotfolderManager { public void waitForResults(long timeout, long waitInterval, List<OcrOutput> outputs, URI errorResultXmlUri) throws TimeoutException, IOException { long start = System.currentTimeMillis(); List<URI> mustBeThereUris = extractFromOutputs(outputs); outerLoop: while (true) { checkIfError(start, timeout, e...
HotfolderManager { public void waitForResults(long timeout, long waitInterval, List<OcrOutput> outputs, URI errorResultXmlUri) throws TimeoutException, IOException { long start = System.currentTimeMillis(); List<URI> mustBeThereUris = extractFromOutputs(outputs); outerLoop: while (true) { checkIfError(start, timeout, e...
HotfolderManager { public void waitForResults(long timeout, long waitInterval, List<OcrOutput> outputs, URI errorResultXmlUri) throws TimeoutException, IOException { long start = System.currentTimeMillis(); List<URI> mustBeThereUris = extractFromOutputs(outputs); outerLoop: while (true) { checkIfError(start, timeout, e...
@Test public void shouldAcceptMaxSizeOfAllFiles() throws IOException, URISyntaxException { when(hotfolderMock.getUsedSpace(any(URI.class))).thenReturn(1L).thenReturn(2L).thenReturn(3L); boolean enoughSpace = managerSut.enoughSpaceAvailable(7, new URI("http: assertTrue("There should be enough space.", enoughSpace); }
public boolean enoughSpaceAvailable(long maxSpace, URI inputFolder, URI outputFolder, URI errorFolder) throws IOException { long totalFileSize = hotfolder.getUsedSpace(inputFolder) + hotfolder.getUsedSpace(outputFolder) + hotfolder.getUsedSpace(errorFolder); logger.debug("TotalFileSize = " + totalFileSize); if (totalFi...
HotfolderManager { public boolean enoughSpaceAvailable(long maxSpace, URI inputFolder, URI outputFolder, URI errorFolder) throws IOException { long totalFileSize = hotfolder.getUsedSpace(inputFolder) + hotfolder.getUsedSpace(outputFolder) + hotfolder.getUsedSpace(errorFolder); logger.debug("TotalFileSize = " + totalFil...
HotfolderManager { public boolean enoughSpaceAvailable(long maxSpace, URI inputFolder, URI outputFolder, URI errorFolder) throws IOException { long totalFileSize = hotfolder.getUsedSpace(inputFolder) + hotfolder.getUsedSpace(outputFolder) + hotfolder.getUsedSpace(errorFolder); logger.debug("TotalFileSize = " + totalFil...
HotfolderManager { public boolean enoughSpaceAvailable(long maxSpace, URI inputFolder, URI outputFolder, URI errorFolder) throws IOException { long totalFileSize = hotfolder.getUsedSpace(inputFolder) + hotfolder.getUsedSpace(outputFolder) + hotfolder.getUsedSpace(errorFolder); logger.debug("TotalFileSize = " + totalFil...
HotfolderManager { public boolean enoughSpaceAvailable(long maxSpace, URI inputFolder, URI outputFolder, URI errorFolder) throws IOException { long totalFileSize = hotfolder.getUsedSpace(inputFolder) + hotfolder.getUsedSpace(outputFolder) + hotfolder.getUsedSpace(errorFolder); logger.debug("TotalFileSize = " + totalFil...
@Test public void shouldNotStartEngine() throws UnsupportedEncodingException { when(validatorMock.validateParameters(any(OcrParameters.class))).thenReturn("Input folder does not exist"); main.execute(validOptions()); verify(engineStarterMock, times(0)).startOcrWithParams(any(OcrParameters.class)); String outString = ne...
void execute(String[] args) throws UnsupportedEncodingException { initOptions(args); if (terminated) { return; } OcrParameters params = transformOptions(); if (terminated) { return; } String validationMessage = paramValidator.validateParameters(params); if ("OK".equals(validationMessage)) { out.println("Starting OCR......
Main { void execute(String[] args) throws UnsupportedEncodingException { initOptions(args); if (terminated) { return; } OcrParameters params = transformOptions(); if (terminated) { return; } String validationMessage = paramValidator.validateParameters(params); if ("OK".equals(validationMessage)) { out.println("Starting...
Main { void execute(String[] args) throws UnsupportedEncodingException { initOptions(args); if (terminated) { return; } OcrParameters params = transformOptions(); if (terminated) { return; } String validationMessage = paramValidator.validateParameters(params); if ("OK".equals(validationMessage)) { out.println("Starting...
Main { void execute(String[] args) throws UnsupportedEncodingException { initOptions(args); if (terminated) { return; } OcrParameters params = transformOptions(); if (terminated) { return; } String validationMessage = paramValidator.validateParameters(params); if ("OK".equals(validationMessage)) { out.println("Starting...
Main { void execute(String[] args) throws UnsupportedEncodingException { initOptions(args); if (terminated) { return; } OcrParameters params = transformOptions(); if (terminated) { return; } String validationMessage = paramValidator.validateParameters(params); if ("OK".equals(validationMessage)) { out.println("Starting...
@Test public void shouldHaveTooLittleSpace() throws IOException, URISyntaxException { when(hotfolderMock.getUsedSpace(any(URI.class))).thenReturn(1L).thenReturn(2L).thenReturn(3L); boolean enoughSpace = managerSut.enoughSpaceAvailable(5, new URI("http: assertFalse("There should be too little space", enoughSpace); }
public boolean enoughSpaceAvailable(long maxSpace, URI inputFolder, URI outputFolder, URI errorFolder) throws IOException { long totalFileSize = hotfolder.getUsedSpace(inputFolder) + hotfolder.getUsedSpace(outputFolder) + hotfolder.getUsedSpace(errorFolder); logger.debug("TotalFileSize = " + totalFileSize); if (totalFi...
HotfolderManager { public boolean enoughSpaceAvailable(long maxSpace, URI inputFolder, URI outputFolder, URI errorFolder) throws IOException { long totalFileSize = hotfolder.getUsedSpace(inputFolder) + hotfolder.getUsedSpace(outputFolder) + hotfolder.getUsedSpace(errorFolder); logger.debug("TotalFileSize = " + totalFil...
HotfolderManager { public boolean enoughSpaceAvailable(long maxSpace, URI inputFolder, URI outputFolder, URI errorFolder) throws IOException { long totalFileSize = hotfolder.getUsedSpace(inputFolder) + hotfolder.getUsedSpace(outputFolder) + hotfolder.getUsedSpace(errorFolder); logger.debug("TotalFileSize = " + totalFil...
HotfolderManager { public boolean enoughSpaceAvailable(long maxSpace, URI inputFolder, URI outputFolder, URI errorFolder) throws IOException { long totalFileSize = hotfolder.getUsedSpace(inputFolder) + hotfolder.getUsedSpace(outputFolder) + hotfolder.getUsedSpace(errorFolder); logger.debug("TotalFileSize = " + totalFil...
HotfolderManager { public boolean enoughSpaceAvailable(long maxSpace, URI inputFolder, URI outputFolder, URI errorFolder) throws IOException { long totalFileSize = hotfolder.getUsedSpace(inputFolder) + hotfolder.getUsedSpace(outputFolder) + hotfolder.getUsedSpace(errorFolder); logger.debug("TotalFileSize = " + totalFil...
@Test public void shouldNotSplitBecauseOfFewImages() { when(processMock.getNumberOfImages()).thenReturn(2); List<AbbyyProcess> splitResults = splitterSut.split(processMock, 2); assertEquals("Should not split a small process", processMock, splitResults.get(0)); }
public List<AbbyyProcess> split(AbbyyProcess process, int splitSize) { if (process.getNumberOfImages() == 0) { throw new IllegalArgumentException("Cannot split the process, it has no images: " + process.getName()); } if (process.getNumberOfImages() <= splitSize) { List<AbbyyProcess> sp = new ArrayList<AbbyyProcess>(); ...
ProcessSplitter { public List<AbbyyProcess> split(AbbyyProcess process, int splitSize) { if (process.getNumberOfImages() == 0) { throw new IllegalArgumentException("Cannot split the process, it has no images: " + process.getName()); } if (process.getNumberOfImages() <= splitSize) { List<AbbyyProcess> sp = new ArrayList...
ProcessSplitter { public List<AbbyyProcess> split(AbbyyProcess process, int splitSize) { if (process.getNumberOfImages() == 0) { throw new IllegalArgumentException("Cannot split the process, it has no images: " + process.getName()); } if (process.getNumberOfImages() <= splitSize) { List<AbbyyProcess> sp = new ArrayList...
ProcessSplitter { public List<AbbyyProcess> split(AbbyyProcess process, int splitSize) { if (process.getNumberOfImages() == 0) { throw new IllegalArgumentException("Cannot split the process, it has no images: " + process.getName()); } if (process.getNumberOfImages() <= splitSize) { List<AbbyyProcess> sp = new ArrayList...
ProcessSplitter { public List<AbbyyProcess> split(AbbyyProcess process, int splitSize) { if (process.getNumberOfImages() == 0) { throw new IllegalArgumentException("Cannot split the process, it has no images: " + process.getName()); } if (process.getNumberOfImages() <= splitSize) { List<AbbyyProcess> sp = new ArrayList...
@Test(expected=IllegalArgumentException.class) public void shouldRejectProcessWithoutImages() { when(processMock.getNumberOfImages()).thenReturn(0); splitterSut.split(processMock, 1); }
public List<AbbyyProcess> split(AbbyyProcess process, int splitSize) { if (process.getNumberOfImages() == 0) { throw new IllegalArgumentException("Cannot split the process, it has no images: " + process.getName()); } if (process.getNumberOfImages() <= splitSize) { List<AbbyyProcess> sp = new ArrayList<AbbyyProcess>(); ...
ProcessSplitter { public List<AbbyyProcess> split(AbbyyProcess process, int splitSize) { if (process.getNumberOfImages() == 0) { throw new IllegalArgumentException("Cannot split the process, it has no images: " + process.getName()); } if (process.getNumberOfImages() <= splitSize) { List<AbbyyProcess> sp = new ArrayList...
ProcessSplitter { public List<AbbyyProcess> split(AbbyyProcess process, int splitSize) { if (process.getNumberOfImages() == 0) { throw new IllegalArgumentException("Cannot split the process, it has no images: " + process.getName()); } if (process.getNumberOfImages() <= splitSize) { List<AbbyyProcess> sp = new ArrayList...
ProcessSplitter { public List<AbbyyProcess> split(AbbyyProcess process, int splitSize) { if (process.getNumberOfImages() == 0) { throw new IllegalArgumentException("Cannot split the process, it has no images: " + process.getName()); } if (process.getNumberOfImages() <= splitSize) { List<AbbyyProcess> sp = new ArrayList...
ProcessSplitter { public List<AbbyyProcess> split(AbbyyProcess process, int splitSize) { if (process.getNumberOfImages() == 0) { throw new IllegalArgumentException("Cannot split the process, it has no images: " + process.getName()); } if (process.getNumberOfImages() <= splitSize) { List<AbbyyProcess> sp = new ArrayList...
@Test public void shouldSplitOneProcessIntoTwo() throws URISyntaxException { when(processMock.getNumberOfImages()).thenReturn(2); when(processMock.getImages()).thenReturn(testImages()); when(processMock.getName()).thenReturn("testMock"); AbbyyProcess subProcessMock1 = mock(AbbyyProcess.class); AbbyyProcess subProcessMo...
public List<AbbyyProcess> split(AbbyyProcess process, int splitSize) { if (process.getNumberOfImages() == 0) { throw new IllegalArgumentException("Cannot split the process, it has no images: " + process.getName()); } if (process.getNumberOfImages() <= splitSize) { List<AbbyyProcess> sp = new ArrayList<AbbyyProcess>(); ...
ProcessSplitter { public List<AbbyyProcess> split(AbbyyProcess process, int splitSize) { if (process.getNumberOfImages() == 0) { throw new IllegalArgumentException("Cannot split the process, it has no images: " + process.getName()); } if (process.getNumberOfImages() <= splitSize) { List<AbbyyProcess> sp = new ArrayList...
ProcessSplitter { public List<AbbyyProcess> split(AbbyyProcess process, int splitSize) { if (process.getNumberOfImages() == 0) { throw new IllegalArgumentException("Cannot split the process, it has no images: " + process.getName()); } if (process.getNumberOfImages() <= splitSize) { List<AbbyyProcess> sp = new ArrayList...
ProcessSplitter { public List<AbbyyProcess> split(AbbyyProcess process, int splitSize) { if (process.getNumberOfImages() == 0) { throw new IllegalArgumentException("Cannot split the process, it has no images: " + process.getName()); } if (process.getNumberOfImages() <= splitSize) { List<AbbyyProcess> sp = new ArrayList...
ProcessSplitter { public List<AbbyyProcess> split(AbbyyProcess process, int splitSize) { if (process.getNumberOfImages() == 0) { throw new IllegalArgumentException("Cannot split the process, it has no images: " + process.getName()); } if (process.getNumberOfImages() <= splitSize) { List<AbbyyProcess> sp = new ArrayList...
@Test public void shouldWakeUpAfterClearingSpace() throws IOException, InterruptedException { when(processMock1.hasEnoughSpaceForExecution()).thenReturn(false, true); executorSut.setWaitingTime(10); executorSut.execute(processMock1); shutdownExecutor(); verify(processMock1).run(); }
void setWaitingTime(long newTime) { waitingTimeInMillis = newTime; }
OcrExecutor extends ThreadPoolExecutor implements Executor { void setWaitingTime(long newTime) { waitingTimeInMillis = newTime; } }
OcrExecutor extends ThreadPoolExecutor implements Executor { void setWaitingTime(long newTime) { waitingTimeInMillis = newTime; } OcrExecutor(int maxParallelThreads); }
OcrExecutor extends ThreadPoolExecutor implements Executor { void setWaitingTime(long newTime) { waitingTimeInMillis = newTime; } OcrExecutor(int maxParallelThreads); }
OcrExecutor extends ThreadPoolExecutor implements Executor { void setWaitingTime(long newTime) { waitingTimeInMillis = newTime; } OcrExecutor(int maxParallelThreads); }
@Test public void shouldWaitTooLong() throws IOException, InterruptedException { when(processMock1.hasEnoughSpaceForExecution()).thenReturn(false); executorSut.setWaitingTime(50); executorSut.execute(processMock1); shutdownExecutor(); verify(processMock1, never()).run(); }
void setWaitingTime(long newTime) { waitingTimeInMillis = newTime; }
OcrExecutor extends ThreadPoolExecutor implements Executor { void setWaitingTime(long newTime) { waitingTimeInMillis = newTime; } }
OcrExecutor extends ThreadPoolExecutor implements Executor { void setWaitingTime(long newTime) { waitingTimeInMillis = newTime; } OcrExecutor(int maxParallelThreads); }
OcrExecutor extends ThreadPoolExecutor implements Executor { void setWaitingTime(long newTime) { waitingTimeInMillis = newTime; } OcrExecutor(int maxParallelThreads); }
OcrExecutor extends ThreadPoolExecutor implements Executor { void setWaitingTime(long newTime) { waitingTimeInMillis = newTime; } OcrExecutor(int maxParallelThreads); }
@Test public void secondProcessShouldWakeTheFirst() throws IOException, InterruptedException { executorSut.setWaitingTime(VERY_LONG); when(processMock1.hasEnoughSpaceForExecution()).thenReturn(false, true); when(processMock2.hasEnoughSpaceForExecution()).thenReturn(true); executorSut.execute(processMock1); Thread.sleep...
void setWaitingTime(long newTime) { waitingTimeInMillis = newTime; }
OcrExecutor extends ThreadPoolExecutor implements Executor { void setWaitingTime(long newTime) { waitingTimeInMillis = newTime; } }
OcrExecutor extends ThreadPoolExecutor implements Executor { void setWaitingTime(long newTime) { waitingTimeInMillis = newTime; } OcrExecutor(int maxParallelThreads); }
OcrExecutor extends ThreadPoolExecutor implements Executor { void setWaitingTime(long newTime) { waitingTimeInMillis = newTime; } OcrExecutor(int maxParallelThreads); }
OcrExecutor extends ThreadPoolExecutor implements Executor { void setWaitingTime(long newTime) { waitingTimeInMillis = newTime; } OcrExecutor(int maxParallelThreads); }
@Test public void firstProcessShouldWakeTheSecond() throws IOException, InterruptedException { executorSut.setWaitingTime(VERY_LONG); when(processMock1.hasEnoughSpaceForExecution()).thenReturn(true); when(processMock2.hasEnoughSpaceForExecution()).thenReturn(false, true); doAnswer(withShortPause).when(processMock1).run...
void setWaitingTime(long newTime) { waitingTimeInMillis = newTime; }
OcrExecutor extends ThreadPoolExecutor implements Executor { void setWaitingTime(long newTime) { waitingTimeInMillis = newTime; } }
OcrExecutor extends ThreadPoolExecutor implements Executor { void setWaitingTime(long newTime) { waitingTimeInMillis = newTime; } OcrExecutor(int maxParallelThreads); }
OcrExecutor extends ThreadPoolExecutor implements Executor { void setWaitingTime(long newTime) { waitingTimeInMillis = newTime; } OcrExecutor(int maxParallelThreads); }
OcrExecutor extends ThreadPoolExecutor implements Executor { void setWaitingTime(long newTime) { waitingTimeInMillis = newTime; } OcrExecutor(int maxParallelThreads); }
@Test public void shouldCreateNewLock() throws IOException { when(hotfolderMock.exists(lockUri)).thenReturn(false); when(hotfolderMock.createTmpFile(anyString())).thenReturn(new ByteArrayOutputStream()); lockHandlerSut.createOrOverwriteLock(false); verify(hotfolderMock, never()).deleteIfExists(lockUri); verify(hotfolde...
@Override public void createOrOverwriteLock(boolean overwriteLock) { boolean threwException = false; Lock monitor = hazelcast.getLock("monitor"); monitor.lock(); try { if (overwriteLock) { hotfolder.deleteIfExists(lockUri); } Set<String> lockRegisteringSet = hazelcast.getSet("lockSet"); boolean lockExists = hotfolder.e...
HazelcastLockFileHandler extends LockFileHandler { @Override public void createOrOverwriteLock(boolean overwriteLock) { boolean threwException = false; Lock monitor = hazelcast.getLock("monitor"); monitor.lock(); try { if (overwriteLock) { hotfolder.deleteIfExists(lockUri); } Set<String> lockRegisteringSet = hazelcast....
HazelcastLockFileHandler extends LockFileHandler { @Override public void createOrOverwriteLock(boolean overwriteLock) { boolean threwException = false; Lock monitor = hazelcast.getLock("monitor"); monitor.lock(); try { if (overwriteLock) { hotfolder.deleteIfExists(lockUri); } Set<String> lockRegisteringSet = hazelcast....
HazelcastLockFileHandler extends LockFileHandler { @Override public void createOrOverwriteLock(boolean overwriteLock) { boolean threwException = false; Lock monitor = hazelcast.getLock("monitor"); monitor.lock(); try { if (overwriteLock) { hotfolder.deleteIfExists(lockUri); } Set<String> lockRegisteringSet = hazelcast....
HazelcastLockFileHandler extends LockFileHandler { @Override public void createOrOverwriteLock(boolean overwriteLock) { boolean threwException = false; Lock monitor = hazelcast.getLock("monitor"); monitor.lock(); try { if (overwriteLock) { hotfolder.deleteIfExists(lockUri); } Set<String> lockRegisteringSet = hazelcast....
@Test(expected=ConcurrentModificationException.class) public void shouldCancelWhenLockIsPresentButNotRegistered() throws IOException { when(hotfolderMock.exists(lockUri)).thenReturn(true); when(registeringSetMock.contains(anyObject())).thenReturn(false); lockHandlerSut.createOrOverwriteLock(false); }
@Override public void createOrOverwriteLock(boolean overwriteLock) { boolean threwException = false; Lock monitor = hazelcast.getLock("monitor"); monitor.lock(); try { if (overwriteLock) { hotfolder.deleteIfExists(lockUri); } Set<String> lockRegisteringSet = hazelcast.getSet("lockSet"); boolean lockExists = hotfolder.e...
HazelcastLockFileHandler extends LockFileHandler { @Override public void createOrOverwriteLock(boolean overwriteLock) { boolean threwException = false; Lock monitor = hazelcast.getLock("monitor"); monitor.lock(); try { if (overwriteLock) { hotfolder.deleteIfExists(lockUri); } Set<String> lockRegisteringSet = hazelcast....
HazelcastLockFileHandler extends LockFileHandler { @Override public void createOrOverwriteLock(boolean overwriteLock) { boolean threwException = false; Lock monitor = hazelcast.getLock("monitor"); monitor.lock(); try { if (overwriteLock) { hotfolder.deleteIfExists(lockUri); } Set<String> lockRegisteringSet = hazelcast....
HazelcastLockFileHandler extends LockFileHandler { @Override public void createOrOverwriteLock(boolean overwriteLock) { boolean threwException = false; Lock monitor = hazelcast.getLock("monitor"); monitor.lock(); try { if (overwriteLock) { hotfolder.deleteIfExists(lockUri); } Set<String> lockRegisteringSet = hazelcast....
HazelcastLockFileHandler extends LockFileHandler { @Override public void createOrOverwriteLock(boolean overwriteLock) { boolean threwException = false; Lock monitor = hazelcast.getLock("monitor"); monitor.lock(); try { if (overwriteLock) { hotfolder.deleteIfExists(lockUri); } Set<String> lockRegisteringSet = hazelcast....
@Test public void shouldSetDefaultValues() throws UnsupportedEncodingException { ArgumentCaptor<OcrParameters> captor = ArgumentCaptor.forClass(OcrParameters.class); main.execute(onlyRequiredOptions()); verify(validatorMock).validateParameters(captor.capture()); OcrParameters param = captor.getValue(); assertEquals("ti...
void execute(String[] args) throws UnsupportedEncodingException { initOptions(args); if (terminated) { return; } OcrParameters params = transformOptions(); if (terminated) { return; } String validationMessage = paramValidator.validateParameters(params); if ("OK".equals(validationMessage)) { out.println("Starting OCR......
Main { void execute(String[] args) throws UnsupportedEncodingException { initOptions(args); if (terminated) { return; } OcrParameters params = transformOptions(); if (terminated) { return; } String validationMessage = paramValidator.validateParameters(params); if ("OK".equals(validationMessage)) { out.println("Starting...
Main { void execute(String[] args) throws UnsupportedEncodingException { initOptions(args); if (terminated) { return; } OcrParameters params = transformOptions(); if (terminated) { return; } String validationMessage = paramValidator.validateParameters(params); if ("OK".equals(validationMessage)) { out.println("Starting...
Main { void execute(String[] args) throws UnsupportedEncodingException { initOptions(args); if (terminated) { return; } OcrParameters params = transformOptions(); if (terminated) { return; } String validationMessage = paramValidator.validateParameters(params); if ("OK".equals(validationMessage)) { out.println("Starting...
Main { void execute(String[] args) throws UnsupportedEncodingException { initOptions(args); if (terminated) { return; } OcrParameters params = transformOptions(); if (terminated) { return; } String validationMessage = paramValidator.validateParameters(params); if ("OK".equals(validationMessage)) { out.println("Starting...
@Test public void shouldIgnoreLockIfPresentAndRegistered() throws IOException { when(hotfolderMock.exists(lockUri)).thenReturn(true); when(registeringSetMock.contains(anyObject())).thenReturn(true); lockHandlerSut.createOrOverwriteLock(false); verify(hotfolderMock, never()).deleteIfExists(lockUri); verify(hotfolderMock...
@Override public void createOrOverwriteLock(boolean overwriteLock) { boolean threwException = false; Lock monitor = hazelcast.getLock("monitor"); monitor.lock(); try { if (overwriteLock) { hotfolder.deleteIfExists(lockUri); } Set<String> lockRegisteringSet = hazelcast.getSet("lockSet"); boolean lockExists = hotfolder.e...
HazelcastLockFileHandler extends LockFileHandler { @Override public void createOrOverwriteLock(boolean overwriteLock) { boolean threwException = false; Lock monitor = hazelcast.getLock("monitor"); monitor.lock(); try { if (overwriteLock) { hotfolder.deleteIfExists(lockUri); } Set<String> lockRegisteringSet = hazelcast....
HazelcastLockFileHandler extends LockFileHandler { @Override public void createOrOverwriteLock(boolean overwriteLock) { boolean threwException = false; Lock monitor = hazelcast.getLock("monitor"); monitor.lock(); try { if (overwriteLock) { hotfolder.deleteIfExists(lockUri); } Set<String> lockRegisteringSet = hazelcast....
HazelcastLockFileHandler extends LockFileHandler { @Override public void createOrOverwriteLock(boolean overwriteLock) { boolean threwException = false; Lock monitor = hazelcast.getLock("monitor"); monitor.lock(); try { if (overwriteLock) { hotfolder.deleteIfExists(lockUri); } Set<String> lockRegisteringSet = hazelcast....
HazelcastLockFileHandler extends LockFileHandler { @Override public void createOrOverwriteLock(boolean overwriteLock) { boolean threwException = false; Lock monitor = hazelcast.getLock("monitor"); monitor.lock(); try { if (overwriteLock) { hotfolder.deleteIfExists(lockUri); } Set<String> lockRegisteringSet = hazelcast....
@Test public void shouldOverwriteLock() throws IOException { when(hotfolderMock.exists(lockUri)).thenReturn(false); when(hotfolderMock.createTmpFile(anyString())).thenReturn(new ByteArrayOutputStream()); lockHandlerSut.createOrOverwriteLock(true); verify(hotfolderMock).deleteIfExists(lockUri); verify(hotfolderMock).cop...
@Override public void createOrOverwriteLock(boolean overwriteLock) { boolean threwException = false; Lock monitor = hazelcast.getLock("monitor"); monitor.lock(); try { if (overwriteLock) { hotfolder.deleteIfExists(lockUri); } Set<String> lockRegisteringSet = hazelcast.getSet("lockSet"); boolean lockExists = hotfolder.e...
HazelcastLockFileHandler extends LockFileHandler { @Override public void createOrOverwriteLock(boolean overwriteLock) { boolean threwException = false; Lock monitor = hazelcast.getLock("monitor"); monitor.lock(); try { if (overwriteLock) { hotfolder.deleteIfExists(lockUri); } Set<String> lockRegisteringSet = hazelcast....
HazelcastLockFileHandler extends LockFileHandler { @Override public void createOrOverwriteLock(boolean overwriteLock) { boolean threwException = false; Lock monitor = hazelcast.getLock("monitor"); monitor.lock(); try { if (overwriteLock) { hotfolder.deleteIfExists(lockUri); } Set<String> lockRegisteringSet = hazelcast....
HazelcastLockFileHandler extends LockFileHandler { @Override public void createOrOverwriteLock(boolean overwriteLock) { boolean threwException = false; Lock monitor = hazelcast.getLock("monitor"); monitor.lock(); try { if (overwriteLock) { hotfolder.deleteIfExists(lockUri); } Set<String> lockRegisteringSet = hazelcast....
HazelcastLockFileHandler extends LockFileHandler { @Override public void createOrOverwriteLock(boolean overwriteLock) { boolean threwException = false; Lock monitor = hazelcast.getLock("monitor"); monitor.lock(); try { if (overwriteLock) { hotfolder.deleteIfExists(lockUri); } Set<String> lockRegisteringSet = hazelcast....
@Test public void shouldDeleteLock() throws IOException { when(hazelMock.getCluster().getMembers().size()).thenReturn(1); lockHandlerSut.deleteLockAndCleanUp(); verify(hotfolderMock).delete(lockUri); }
@Override public void deleteLockAndCleanUp() { Lock monitor = hazelcast.getLock("monitor"); monitor.lock(); try { if (hazelcast.getCluster().getMembers().size() == 1) { hotfolder.delete(lockUri); } } catch (IOException e) { logger.error("Error while deleting lock file: " + lockUri, e); } finally { monitor.unlock(); haz...
HazelcastLockFileHandler extends LockFileHandler { @Override public void deleteLockAndCleanUp() { Lock monitor = hazelcast.getLock("monitor"); monitor.lock(); try { if (hazelcast.getCluster().getMembers().size() == 1) { hotfolder.delete(lockUri); } } catch (IOException e) { logger.error("Error while deleting lock file:...
HazelcastLockFileHandler extends LockFileHandler { @Override public void deleteLockAndCleanUp() { Lock monitor = hazelcast.getLock("monitor"); monitor.lock(); try { if (hazelcast.getCluster().getMembers().size() == 1) { hotfolder.delete(lockUri); } } catch (IOException e) { logger.error("Error while deleting lock file:...
HazelcastLockFileHandler extends LockFileHandler { @Override public void deleteLockAndCleanUp() { Lock monitor = hazelcast.getLock("monitor"); monitor.lock(); try { if (hazelcast.getCluster().getMembers().size() == 1) { hotfolder.delete(lockUri); } } catch (IOException e) { logger.error("Error while deleting lock file:...
HazelcastLockFileHandler extends LockFileHandler { @Override public void deleteLockAndCleanUp() { Lock monitor = hazelcast.getLock("monitor"); monitor.lock(); try { if (hazelcast.getCluster().getMembers().size() == 1) { hotfolder.delete(lockUri); } } catch (IOException e) { logger.error("Error while deleting lock file:...
@Test public void shouldNotDeleteLock() throws IOException { when(hazelMock.getCluster().getMembers().size()).thenReturn(2); lockHandlerSut.deleteLockAndCleanUp(); verify(hotfolderMock, never()).delete(lockUri); }
@Override public void deleteLockAndCleanUp() { Lock monitor = hazelcast.getLock("monitor"); monitor.lock(); try { if (hazelcast.getCluster().getMembers().size() == 1) { hotfolder.delete(lockUri); } } catch (IOException e) { logger.error("Error while deleting lock file: " + lockUri, e); } finally { monitor.unlock(); haz...
HazelcastLockFileHandler extends LockFileHandler { @Override public void deleteLockAndCleanUp() { Lock monitor = hazelcast.getLock("monitor"); monitor.lock(); try { if (hazelcast.getCluster().getMembers().size() == 1) { hotfolder.delete(lockUri); } } catch (IOException e) { logger.error("Error while deleting lock file:...
HazelcastLockFileHandler extends LockFileHandler { @Override public void deleteLockAndCleanUp() { Lock monitor = hazelcast.getLock("monitor"); monitor.lock(); try { if (hazelcast.getCluster().getMembers().size() == 1) { hotfolder.delete(lockUri); } } catch (IOException e) { logger.error("Error while deleting lock file:...
HazelcastLockFileHandler extends LockFileHandler { @Override public void deleteLockAndCleanUp() { Lock monitor = hazelcast.getLock("monitor"); monitor.lock(); try { if (hazelcast.getCluster().getMembers().size() == 1) { hotfolder.delete(lockUri); } } catch (IOException e) { logger.error("Error while deleting lock file:...
HazelcastLockFileHandler extends LockFileHandler { @Override public void deleteLockAndCleanUp() { Lock monitor = hazelcast.getLock("monitor"); monitor.lock(); try { if (hazelcast.getCluster().getMembers().size() == 1) { hotfolder.delete(lockUri); } } catch (IOException e) { logger.error("Error while deleting lock file:...
@Test public void shouldWakeUpByItself() throws InterruptedException { configureProcessMock(processMockA1, "book1", OcrPriority.NORMAL, 1L, NOT_ENOUGH_SPACE, ENOUGH_SPACE); executorSutA.setWaitingTime(10); executorSutA.execute(processMockA1); shutdownExecutors(); verify(processMockA1).run(); }
void setWaitingTime(long newTime) { waitingTimeInMillis = newTime; }
HazelcastExecutor extends ThreadPoolExecutor implements Executor { void setWaitingTime(long newTime) { waitingTimeInMillis = newTime; } }
HazelcastExecutor extends ThreadPoolExecutor implements Executor { void setWaitingTime(long newTime) { waitingTimeInMillis = newTime; } HazelcastExecutor(int maxParallelThreads, HazelcastInstance hazelcast); }
HazelcastExecutor extends ThreadPoolExecutor implements Executor { void setWaitingTime(long newTime) { waitingTimeInMillis = newTime; } HazelcastExecutor(int maxParallelThreads, HazelcastInstance hazelcast); }
HazelcastExecutor extends ThreadPoolExecutor implements Executor { void setWaitingTime(long newTime) { waitingTimeInMillis = newTime; } HazelcastExecutor(int maxParallelThreads, HazelcastInstance hazelcast); }
@Test public void shouldNeverWakeUp() throws InterruptedException { configureProcessMock(processMockA1, "book1", OcrPriority.NORMAL, 1L, NOT_ENOUGH_SPACE); executorSutA.setWaitingTime(10); executorSutA.execute(processMockA1); shutdownExecutors(); verify(processMockA1, never()).run(); }
void setWaitingTime(long newTime) { waitingTimeInMillis = newTime; }
HazelcastExecutor extends ThreadPoolExecutor implements Executor { void setWaitingTime(long newTime) { waitingTimeInMillis = newTime; } }
HazelcastExecutor extends ThreadPoolExecutor implements Executor { void setWaitingTime(long newTime) { waitingTimeInMillis = newTime; } HazelcastExecutor(int maxParallelThreads, HazelcastInstance hazelcast); }
HazelcastExecutor extends ThreadPoolExecutor implements Executor { void setWaitingTime(long newTime) { waitingTimeInMillis = newTime; } HazelcastExecutor(int maxParallelThreads, HazelcastInstance hazelcast); }
HazelcastExecutor extends ThreadPoolExecutor implements Executor { void setWaitingTime(long newTime) { waitingTimeInMillis = newTime; } HazelcastExecutor(int maxParallelThreads, HazelcastInstance hazelcast); }
@Test public void secondShouldFreeFirst() throws InterruptedException { configureProcessMock(processMockA1, "book1", OcrPriority.NORMAL, 1L, NOT_ENOUGH_SPACE, ENOUGH_SPACE); configureProcessMock(processMockA2, "book2", OcrPriority.ABOVENORMAL, 2L, ENOUGH_SPACE); executorSutA.setWaitingTime(VERY_LONG); executorSutA.exec...
void setWaitingTime(long newTime) { waitingTimeInMillis = newTime; }
HazelcastExecutor extends ThreadPoolExecutor implements Executor { void setWaitingTime(long newTime) { waitingTimeInMillis = newTime; } }
HazelcastExecutor extends ThreadPoolExecutor implements Executor { void setWaitingTime(long newTime) { waitingTimeInMillis = newTime; } HazelcastExecutor(int maxParallelThreads, HazelcastInstance hazelcast); }
HazelcastExecutor extends ThreadPoolExecutor implements Executor { void setWaitingTime(long newTime) { waitingTimeInMillis = newTime; } HazelcastExecutor(int maxParallelThreads, HazelcastInstance hazelcast); }
HazelcastExecutor extends ThreadPoolExecutor implements Executor { void setWaitingTime(long newTime) { waitingTimeInMillis = newTime; } HazelcastExecutor(int maxParallelThreads, HazelcastInstance hazelcast); }
@Test public void shouldPreferHigherPriority() throws InterruptedException { executorSutA = initSut(1); executorSutB = initSut(1); executorSutC = initSut(1); configureProcessMock(processMockA1, "bookA1", OcrPriority.NORMAL, 1L, ENOUGH_SPACE); doAnswer(withShortPause).when(processMockA1).run(); configureProcessMock(proc...
long getStartedLastProcessAt() { return startedExecutingAt; }
HazelcastExecutor extends ThreadPoolExecutor implements Executor { long getStartedLastProcessAt() { return startedExecutingAt; } }
HazelcastExecutor extends ThreadPoolExecutor implements Executor { long getStartedLastProcessAt() { return startedExecutingAt; } HazelcastExecutor(int maxParallelThreads, HazelcastInstance hazelcast); }
HazelcastExecutor extends ThreadPoolExecutor implements Executor { long getStartedLastProcessAt() { return startedExecutingAt; } HazelcastExecutor(int maxParallelThreads, HazelcastInstance hazelcast); }
HazelcastExecutor extends ThreadPoolExecutor implements Executor { long getStartedLastProcessAt() { return startedExecutingAt; } HazelcastExecutor(int maxParallelThreads, HazelcastInstance hazelcast); }
@Test public void shouldPreferSmallerTimestamp() throws InterruptedException { executorSutA = initSut(1); executorSutB = initSut(1); executorSutC = initSut(1); configureProcessMock(processMockA1, "bookA1", OcrPriority.NORMAL, 1L, ENOUGH_SPACE); doAnswer(withShortPause).when(processMockA1).run(); configureProcessMock(pr...
long getStartedLastProcessAt() { return startedExecutingAt; }
HazelcastExecutor extends ThreadPoolExecutor implements Executor { long getStartedLastProcessAt() { return startedExecutingAt; } }
HazelcastExecutor extends ThreadPoolExecutor implements Executor { long getStartedLastProcessAt() { return startedExecutingAt; } HazelcastExecutor(int maxParallelThreads, HazelcastInstance hazelcast); }
HazelcastExecutor extends ThreadPoolExecutor implements Executor { long getStartedLastProcessAt() { return startedExecutingAt; } HazelcastExecutor(int maxParallelThreads, HazelcastInstance hazelcast); }
HazelcastExecutor extends ThreadPoolExecutor implements Executor { long getStartedLastProcessAt() { return startedExecutingAt; } HazelcastExecutor(int maxParallelThreads, HazelcastInstance hazelcast); }
@Test public void sendingPost() throws Exception { Http http = new Http("", ""); String response = http.submitPost("http: assertThat(response, containsString("<httpMethod>POST</httpMethod>")); }
public String submitPost(String url, byte[] postData) { String response = ""; try { URL u = new URL(url); HttpURLConnection connection = (HttpURLConnection) u.openConnection(); connection.setDoOutput(true); connection.setDoInput(true); connection.setRequestMethod("POST"); setupAuthorization(connection); connection.setR...
Http { public String submitPost(String url, byte[] postData) { String response = ""; try { URL u = new URL(url); HttpURLConnection connection = (HttpURLConnection) u.openConnection(); connection.setDoOutput(true); connection.setDoInput(true); connection.setRequestMethod("POST"); setupAuthorization(connection); connecti...
Http { public String submitPost(String url, byte[] postData) { String response = ""; try { URL u = new URL(url); HttpURLConnection connection = (HttpURLConnection) u.openConnection(); connection.setDoOutput(true); connection.setDoInput(true); connection.setRequestMethod("POST"); setupAuthorization(connection); connecti...
Http { public String submitPost(String url, byte[] postData) { String response = ""; try { URL u = new URL(url); HttpURLConnection connection = (HttpURLConnection) u.openConnection(); connection.setDoOutput(true); connection.setDoInput(true); connection.setRequestMethod("POST"); setupAuthorization(connection); connecti...
Http { public String submitPost(String url, byte[] postData) { String response = ""; try { URL u = new URL(url); HttpURLConnection connection = (HttpURLConnection) u.openConnection(); connection.setDoOutput(true); connection.setDoInput(true); connection.setRequestMethod("POST"); setupAuthorization(connection); connecti...
@Test public void shouldStartEngineDespiteNoFolders() { when(fileAccessMock.getAllFolders(anyString(), any(String[].class))).thenReturn(new File[]{}); starterSut.startOcrWithParams(validParams()); verify(engineMock).recognize(); }
public void startOcrWithParams(OcrParameters params) { OcrFactory factory = factoryProvider.createFactory(params.ocrEngine, params.props); engine = factory.createEngine(); FileAccess fileAccess = beanProvider.getFileAccess(); File[] allBookFolders = fileAccess.getAllFolders(params.inputFolder, params.inputFormats); for...
OcrEngineStarter { public void startOcrWithParams(OcrParameters params) { OcrFactory factory = factoryProvider.createFactory(params.ocrEngine, params.props); engine = factory.createEngine(); FileAccess fileAccess = beanProvider.getFileAccess(); File[] allBookFolders = fileAccess.getAllFolders(params.inputFolder, params...
OcrEngineStarter { public void startOcrWithParams(OcrParameters params) { OcrFactory factory = factoryProvider.createFactory(params.ocrEngine, params.props); engine = factory.createEngine(); FileAccess fileAccess = beanProvider.getFileAccess(); File[] allBookFolders = fileAccess.getAllFolders(params.inputFolder, params...
OcrEngineStarter { public void startOcrWithParams(OcrParameters params) { OcrFactory factory = factoryProvider.createFactory(params.ocrEngine, params.props); engine = factory.createEngine(); FileAccess fileAccess = beanProvider.getFileAccess(); File[] allBookFolders = fileAccess.getAllFolders(params.inputFolder, params...
OcrEngineStarter { public void startOcrWithParams(OcrParameters params) { OcrFactory factory = factoryProvider.createFactory(params.ocrEngine, params.props); engine = factory.createEngine(); FileAccess fileAccess = beanProvider.getFileAccess(); File[] allBookFolders = fileAccess.getAllFolders(params.inputFolder, params...
@Test public void serverMustReceiveCredentials() throws Exception { Http http = new Http("user", "pw"); String response = http.submitPost("http: assertThat(response, containsString("<basicAuth>user:pw</basicAuth>")); }
public String submitPost(String url, byte[] postData) { String response = ""; try { URL u = new URL(url); HttpURLConnection connection = (HttpURLConnection) u.openConnection(); connection.setDoOutput(true); connection.setDoInput(true); connection.setRequestMethod("POST"); setupAuthorization(connection); connection.setR...
Http { public String submitPost(String url, byte[] postData) { String response = ""; try { URL u = new URL(url); HttpURLConnection connection = (HttpURLConnection) u.openConnection(); connection.setDoOutput(true); connection.setDoInput(true); connection.setRequestMethod("POST"); setupAuthorization(connection); connecti...
Http { public String submitPost(String url, byte[] postData) { String response = ""; try { URL u = new URL(url); HttpURLConnection connection = (HttpURLConnection) u.openConnection(); connection.setDoOutput(true); connection.setDoInput(true); connection.setRequestMethod("POST"); setupAuthorization(connection); connecti...
Http { public String submitPost(String url, byte[] postData) { String response = ""; try { URL u = new URL(url); HttpURLConnection connection = (HttpURLConnection) u.openConnection(); connection.setDoOutput(true); connection.setDoInput(true); connection.setRequestMethod("POST"); setupAuthorization(connection); connecti...
Http { public String submitPost(String url, byte[] postData) { String response = ""; try { URL u = new URL(url); HttpURLConnection connection = (HttpURLConnection) u.openConnection(); connection.setDoOutput(true); connection.setDoInput(true); connection.setRequestMethod("POST"); setupAuthorization(connection); connecti...
@Test public void serverMustReceivePostData() throws Exception { Http http = new Http("", ""); byte[] bytesToSend = {4, 2}; String response = http.submitPost("http: assertThat(response, containsString("<contentLength>2</contentLength>")); assertThat(response, containsString("<content>42</content>")); }
public String submitPost(String url, byte[] postData) { String response = ""; try { URL u = new URL(url); HttpURLConnection connection = (HttpURLConnection) u.openConnection(); connection.setDoOutput(true); connection.setDoInput(true); connection.setRequestMethod("POST"); setupAuthorization(connection); connection.setR...
Http { public String submitPost(String url, byte[] postData) { String response = ""; try { URL u = new URL(url); HttpURLConnection connection = (HttpURLConnection) u.openConnection(); connection.setDoOutput(true); connection.setDoInput(true); connection.setRequestMethod("POST"); setupAuthorization(connection); connecti...
Http { public String submitPost(String url, byte[] postData) { String response = ""; try { URL u = new URL(url); HttpURLConnection connection = (HttpURLConnection) u.openConnection(); connection.setDoOutput(true); connection.setDoInput(true); connection.setRequestMethod("POST"); setupAuthorization(connection); connecti...
Http { public String submitPost(String url, byte[] postData) { String response = ""; try { URL u = new URL(url); HttpURLConnection connection = (HttpURLConnection) u.openConnection(); connection.setDoOutput(true); connection.setDoInput(true); connection.setRequestMethod("POST"); setupAuthorization(connection); connecti...
Http { public String submitPost(String url, byte[] postData) { String response = ""; try { URL u = new URL(url); HttpURLConnection connection = (HttpURLConnection) u.openConnection(); connection.setDoOutput(true); connection.setDoInput(true); connection.setRequestMethod("POST"); setupAuthorization(connection); connecti...
@Test public void sendingGet() throws Exception { Http http = new Http("", ""); String response = http.submitGet("http: assertThat(response, containsString("<httpMethod>GET</httpMethod>")); }
public String submitGet(String url) { String response = ""; try { URL u = new URL(url); HttpURLConnection connection = (HttpURLConnection) u.openConnection(); setupAuthorization(connection); InputStream is = getResponseFrom(connection); response = IOUtils.toString(is); } catch (IOException e) { throw new RuntimeExcepti...
Http { public String submitGet(String url) { String response = ""; try { URL u = new URL(url); HttpURLConnection connection = (HttpURLConnection) u.openConnection(); setupAuthorization(connection); InputStream is = getResponseFrom(connection); response = IOUtils.toString(is); } catch (IOException e) { throw new Runtime...
Http { public String submitGet(String url) { String response = ""; try { URL u = new URL(url); HttpURLConnection connection = (HttpURLConnection) u.openConnection(); setupAuthorization(connection); InputStream is = getResponseFrom(connection); response = IOUtils.toString(is); } catch (IOException e) { throw new Runtime...
Http { public String submitGet(String url) { String response = ""; try { URL u = new URL(url); HttpURLConnection connection = (HttpURLConnection) u.openConnection(); setupAuthorization(connection); InputStream is = getResponseFrom(connection); response = IOUtils.toString(is); } catch (IOException e) { throw new Runtime...
Http { public String submitGet(String url) { String response = ""; try { URL u = new URL(url); HttpURLConnection connection = (HttpURLConnection) u.openConnection(); setupAuthorization(connection); InputStream is = getResponseFrom(connection); response = IOUtils.toString(is); } catch (IOException e) { throw new Runtime...
@Test(expected=RuntimeException.class) public void sendingPostToUnauthorized() throws Exception { Http http = new Http("", ""); http.submitPost("http: }
public String submitPost(String url, byte[] postData) { String response = ""; try { URL u = new URL(url); HttpURLConnection connection = (HttpURLConnection) u.openConnection(); connection.setDoOutput(true); connection.setDoInput(true); connection.setRequestMethod("POST"); setupAuthorization(connection); connection.setR...
Http { public String submitPost(String url, byte[] postData) { String response = ""; try { URL u = new URL(url); HttpURLConnection connection = (HttpURLConnection) u.openConnection(); connection.setDoOutput(true); connection.setDoInput(true); connection.setRequestMethod("POST"); setupAuthorization(connection); connecti...
Http { public String submitPost(String url, byte[] postData) { String response = ""; try { URL u = new URL(url); HttpURLConnection connection = (HttpURLConnection) u.openConnection(); connection.setDoOutput(true); connection.setDoInput(true); connection.setRequestMethod("POST"); setupAuthorization(connection); connecti...
Http { public String submitPost(String url, byte[] postData) { String response = ""; try { URL u = new URL(url); HttpURLConnection connection = (HttpURLConnection) u.openConnection(); connection.setDoOutput(true); connection.setDoInput(true); connection.setRequestMethod("POST"); setupAuthorization(connection); connecti...
Http { public String submitPost(String url, byte[] postData) { String response = ""; try { URL u = new URL(url); HttpURLConnection connection = (HttpURLConnection) u.openConnection(); connection.setDoOutput(true); connection.setDoInput(true); connection.setRequestMethod("POST"); setupAuthorization(connection); connecti...
@Test(expected=RuntimeException.class) public void sendingGetToUnauthorized() throws Exception { Http http = new Http("", ""); http.submitGet("http: }
public String submitGet(String url) { String response = ""; try { URL u = new URL(url); HttpURLConnection connection = (HttpURLConnection) u.openConnection(); setupAuthorization(connection); InputStream is = getResponseFrom(connection); response = IOUtils.toString(is); } catch (IOException e) { throw new RuntimeExcepti...
Http { public String submitGet(String url) { String response = ""; try { URL u = new URL(url); HttpURLConnection connection = (HttpURLConnection) u.openConnection(); setupAuthorization(connection); InputStream is = getResponseFrom(connection); response = IOUtils.toString(is); } catch (IOException e) { throw new Runtime...
Http { public String submitGet(String url) { String response = ""; try { URL u = new URL(url); HttpURLConnection connection = (HttpURLConnection) u.openConnection(); setupAuthorization(connection); InputStream is = getResponseFrom(connection); response = IOUtils.toString(is); } catch (IOException e) { throw new Runtime...
Http { public String submitGet(String url) { String response = ""; try { URL u = new URL(url); HttpURLConnection connection = (HttpURLConnection) u.openConnection(); setupAuthorization(connection); InputStream is = getResponseFrom(connection); response = IOUtils.toString(is); } catch (IOException e) { throw new Runtime...
Http { public String submitGet(String url) { String response = ""; try { URL u = new URL(url); HttpURLConnection connection = (HttpURLConnection) u.openConnection(); setupAuthorization(connection); InputStream is = getResponseFrom(connection); response = IOUtils.toString(is); } catch (IOException e) { throw new Runtime...
@Test(expected=RuntimeException.class) public void sendingPostToUnreachable() throws Exception { Http http = new Http("", ""); http.submitPost("http: }
public String submitPost(String url, byte[] postData) { String response = ""; try { URL u = new URL(url); HttpURLConnection connection = (HttpURLConnection) u.openConnection(); connection.setDoOutput(true); connection.setDoInput(true); connection.setRequestMethod("POST"); setupAuthorization(connection); connection.setR...
Http { public String submitPost(String url, byte[] postData) { String response = ""; try { URL u = new URL(url); HttpURLConnection connection = (HttpURLConnection) u.openConnection(); connection.setDoOutput(true); connection.setDoInput(true); connection.setRequestMethod("POST"); setupAuthorization(connection); connecti...
Http { public String submitPost(String url, byte[] postData) { String response = ""; try { URL u = new URL(url); HttpURLConnection connection = (HttpURLConnection) u.openConnection(); connection.setDoOutput(true); connection.setDoInput(true); connection.setRequestMethod("POST"); setupAuthorization(connection); connecti...
Http { public String submitPost(String url, byte[] postData) { String response = ""; try { URL u = new URL(url); HttpURLConnection connection = (HttpURLConnection) u.openConnection(); connection.setDoOutput(true); connection.setDoInput(true); connection.setRequestMethod("POST"); setupAuthorization(connection); connecti...
Http { public String submitPost(String url, byte[] postData) { String response = ""; try { URL u = new URL(url); HttpURLConnection connection = (HttpURLConnection) u.openConnection(); connection.setDoOutput(true); connection.setDoInput(true); connection.setRequestMethod("POST"); setupAuthorization(connection); connecti...
@Test(expected=RuntimeException.class) public void sendingGetToUnreachable() throws Exception { Http http = new Http("", ""); http.submitGet("http: }
public String submitGet(String url) { String response = ""; try { URL u = new URL(url); HttpURLConnection connection = (HttpURLConnection) u.openConnection(); setupAuthorization(connection); InputStream is = getResponseFrom(connection); response = IOUtils.toString(is); } catch (IOException e) { throw new RuntimeExcepti...
Http { public String submitGet(String url) { String response = ""; try { URL u = new URL(url); HttpURLConnection connection = (HttpURLConnection) u.openConnection(); setupAuthorization(connection); InputStream is = getResponseFrom(connection); response = IOUtils.toString(is); } catch (IOException e) { throw new Runtime...
Http { public String submitGet(String url) { String response = ""; try { URL u = new URL(url); HttpURLConnection connection = (HttpURLConnection) u.openConnection(); setupAuthorization(connection); InputStream is = getResponseFrom(connection); response = IOUtils.toString(is); } catch (IOException e) { throw new Runtime...
Http { public String submitGet(String url) { String response = ""; try { URL u = new URL(url); HttpURLConnection connection = (HttpURLConnection) u.openConnection(); setupAuthorization(connection); InputStream is = getResponseFrom(connection); response = IOUtils.toString(is); } catch (IOException e) { throw new Runtime...
Http { public String submitGet(String url) { String response = ""; try { URL u = new URL(url); HttpURLConnection connection = (HttpURLConnection) u.openConnection(); setupAuthorization(connection); InputStream is = getResponseFrom(connection); response = IOUtils.toString(is); } catch (IOException e) { throw new Runtime...
@Test public void sendingGetWithoutAuthentication() throws Exception { Http http = new Http("user", "pw"); InputStream is = http.submitGetWithoutAuthentication("http: String response = IOUtils.toString(is); assertThat(response, containsString("<httpMethod>GET</httpMethod>")); assertThat(response, containsString("<basic...
public InputStream submitGetWithoutAuthentication(String url) { InputStream response = null; try { URL u = new URL(url); HttpURLConnection connection = (HttpURLConnection) u.openConnection(); response = getResponseFrom(connection); } catch (IOException e) { throw new RuntimeException("Error with connection.", e); } ret...
Http { public InputStream submitGetWithoutAuthentication(String url) { InputStream response = null; try { URL u = new URL(url); HttpURLConnection connection = (HttpURLConnection) u.openConnection(); response = getResponseFrom(connection); } catch (IOException e) { throw new RuntimeException("Error with connection.", e)...
Http { public InputStream submitGetWithoutAuthentication(String url) { InputStream response = null; try { URL u = new URL(url); HttpURLConnection connection = (HttpURLConnection) u.openConnection(); response = getResponseFrom(connection); } catch (IOException e) { throw new RuntimeException("Error with connection.", e)...
Http { public InputStream submitGetWithoutAuthentication(String url) { InputStream response = null; try { URL u = new URL(url); HttpURLConnection connection = (HttpURLConnection) u.openConnection(); response = getResponseFrom(connection); } catch (IOException e) { throw new RuntimeException("Error with connection.", e)...
Http { public InputStream submitGetWithoutAuthentication(String url) { InputStream response = null; try { URL u = new URL(url); HttpURLConnection connection = (HttpURLConnection) u.openConnection(); response = getResponseFrom(connection); } catch (IOException e) { throw new RuntimeException("Error with connection.", e)...
@Test public void submittingOneImage() { client.submitImage(fakeImage); verify(httpMock, times(1)).submitPost(sdkServer + "submitImage", fakeImage); }
public void submitImage(byte[] imageBytes) { String returnedXml = http.submitPost(submitImageUrl(), imageBytes); if (taskId == null) { Element task = getTaskElement(returnedXml); taskId = task.getAttribute("id"); } }
OcrsdkClient { public void submitImage(byte[] imageBytes) { String returnedXml = http.submitPost(submitImageUrl(), imageBytes); if (taskId == null) { Element task = getTaskElement(returnedXml); taskId = task.getAttribute("id"); } } }
OcrsdkClient { public void submitImage(byte[] imageBytes) { String returnedXml = http.submitPost(submitImageUrl(), imageBytes); if (taskId == null) { Element task = getTaskElement(returnedXml); taskId = task.getAttribute("id"); } } OcrsdkClient(String username, String password); }
OcrsdkClient { public void submitImage(byte[] imageBytes) { String returnedXml = http.submitPost(submitImageUrl(), imageBytes); if (taskId == null) { Element task = getTaskElement(returnedXml); taskId = task.getAttribute("id"); } } OcrsdkClient(String username, String password); void submitImage(byte[] imageBytes); voi...
OcrsdkClient { public void submitImage(byte[] imageBytes) { String returnedXml = http.submitPost(submitImageUrl(), imageBytes); if (taskId == null) { Element task = getTaskElement(returnedXml); taskId = task.getAttribute("id"); } } OcrsdkClient(String username, String password); void submitImage(byte[] imageBytes); voi...
@Test public void submittingTwoImages() { client.submitImage(fakeImage); client.submitImage(fakeImage); verify(httpMock, times(1)).submitPost(sdkServer + "submitImage", fakeImage); verify(httpMock, times(1)).submitPost(sdkServer + "submitImage?taskId=some-id", fakeImage); }
public void submitImage(byte[] imageBytes) { String returnedXml = http.submitPost(submitImageUrl(), imageBytes); if (taskId == null) { Element task = getTaskElement(returnedXml); taskId = task.getAttribute("id"); } }
OcrsdkClient { public void submitImage(byte[] imageBytes) { String returnedXml = http.submitPost(submitImageUrl(), imageBytes); if (taskId == null) { Element task = getTaskElement(returnedXml); taskId = task.getAttribute("id"); } } }
OcrsdkClient { public void submitImage(byte[] imageBytes) { String returnedXml = http.submitPost(submitImageUrl(), imageBytes); if (taskId == null) { Element task = getTaskElement(returnedXml); taskId = task.getAttribute("id"); } } OcrsdkClient(String username, String password); }
OcrsdkClient { public void submitImage(byte[] imageBytes) { String returnedXml = http.submitPost(submitImageUrl(), imageBytes); if (taskId == null) { Element task = getTaskElement(returnedXml); taskId = task.getAttribute("id"); } } OcrsdkClient(String username, String password); void submitImage(byte[] imageBytes); voi...
OcrsdkClient { public void submitImage(byte[] imageBytes) { String returnedXml = http.submitPost(submitImageUrl(), imageBytes); if (taskId == null) { Element task = getTaskElement(returnedXml); taskId = task.getAttribute("id"); } } OcrsdkClient(String username, String password); void submitImage(byte[] imageBytes); voi...
@Test public void shouldStartWithBookAndImage() { prepareOneBookWithOneImage(); starterSut.startOcrWithParams(validParams()); verify(processMock).setName("book1"); verify(engineMock).recognize(); }
public void startOcrWithParams(OcrParameters params) { OcrFactory factory = factoryProvider.createFactory(params.ocrEngine, params.props); engine = factory.createEngine(); FileAccess fileAccess = beanProvider.getFileAccess(); File[] allBookFolders = fileAccess.getAllFolders(params.inputFolder, params.inputFormats); for...
OcrEngineStarter { public void startOcrWithParams(OcrParameters params) { OcrFactory factory = factoryProvider.createFactory(params.ocrEngine, params.props); engine = factory.createEngine(); FileAccess fileAccess = beanProvider.getFileAccess(); File[] allBookFolders = fileAccess.getAllFolders(params.inputFolder, params...
OcrEngineStarter { public void startOcrWithParams(OcrParameters params) { OcrFactory factory = factoryProvider.createFactory(params.ocrEngine, params.props); engine = factory.createEngine(); FileAccess fileAccess = beanProvider.getFileAccess(); File[] allBookFolders = fileAccess.getAllFolders(params.inputFolder, params...
OcrEngineStarter { public void startOcrWithParams(OcrParameters params) { OcrFactory factory = factoryProvider.createFactory(params.ocrEngine, params.props); engine = factory.createEngine(); FileAccess fileAccess = beanProvider.getFileAccess(); File[] allBookFolders = fileAccess.getAllFolders(params.inputFolder, params...
OcrEngineStarter { public void startOcrWithParams(OcrParameters params) { OcrFactory factory = factoryProvider.createFactory(params.ocrEngine, params.props); engine = factory.createEngine(); FileAccess fileAccess = beanProvider.getFileAccess(); File[] allBookFolders = fileAccess.getAllFolders(params.inputFolder, params...
@Test public void submittingThreeImages() { client.submitImage(fakeImage); client.submitImage(fakeImage); client.submitImage(fakeImage); verify(httpMock, times(1)).submitPost(sdkServer + "submitImage", fakeImage); verify(httpMock, times(2)).submitPost(sdkServer + "submitImage?taskId=some-id", fakeImage); }
public void submitImage(byte[] imageBytes) { String returnedXml = http.submitPost(submitImageUrl(), imageBytes); if (taskId == null) { Element task = getTaskElement(returnedXml); taskId = task.getAttribute("id"); } }
OcrsdkClient { public void submitImage(byte[] imageBytes) { String returnedXml = http.submitPost(submitImageUrl(), imageBytes); if (taskId == null) { Element task = getTaskElement(returnedXml); taskId = task.getAttribute("id"); } } }
OcrsdkClient { public void submitImage(byte[] imageBytes) { String returnedXml = http.submitPost(submitImageUrl(), imageBytes); if (taskId == null) { Element task = getTaskElement(returnedXml); taskId = task.getAttribute("id"); } } OcrsdkClient(String username, String password); }
OcrsdkClient { public void submitImage(byte[] imageBytes) { String returnedXml = http.submitPost(submitImageUrl(), imageBytes); if (taskId == null) { Element task = getTaskElement(returnedXml); taskId = task.getAttribute("id"); } } OcrsdkClient(String username, String password); void submitImage(byte[] imageBytes); voi...
OcrsdkClient { public void submitImage(byte[] imageBytes) { String returnedXml = http.submitPost(submitImageUrl(), imageBytes); if (taskId == null) { Element task = getTaskElement(returnedXml); taskId = task.getAttribute("id"); } } OcrsdkClient(String username, String password); void submitImage(byte[] imageBytes); voi...
@Test(expected=IllegalStateException.class) public void processingWithFourExportFormats() { client.addExportFormat("xml"); client.addExportFormat("txt"); client.addExportFormat("docx"); client.addExportFormat("pdfa"); }
public void addExportFormat(String format) { if (formatsToUse.size() == 3) { throw new IllegalStateException("Max 3 result formats allowed!"); } formatsToUse.add(format); }
OcrsdkClient { public void addExportFormat(String format) { if (formatsToUse.size() == 3) { throw new IllegalStateException("Max 3 result formats allowed!"); } formatsToUse.add(format); } }
OcrsdkClient { public void addExportFormat(String format) { if (formatsToUse.size() == 3) { throw new IllegalStateException("Max 3 result formats allowed!"); } formatsToUse.add(format); } OcrsdkClient(String username, String password); }
OcrsdkClient { public void addExportFormat(String format) { if (formatsToUse.size() == 3) { throw new IllegalStateException("Max 3 result formats allowed!"); } formatsToUse.add(format); } OcrsdkClient(String username, String password); void submitImage(byte[] imageBytes); void addLanguage(String lang); void addExportFo...
OcrsdkClient { public void addExportFormat(String format) { if (formatsToUse.size() == 3) { throw new IllegalStateException("Max 3 result formats allowed!"); } formatsToUse.add(format); } OcrsdkClient(String username, String password); void submitImage(byte[] imageBytes); void addLanguage(String lang); void addExportFo...
@Test public void shouldStartAndSendMails() { prepareOneBookWithOneImage(); OcrParameters params = validParams(); when(engineMock.getEstimatedDurationInSeconds()).thenReturn(1); starterSut.startOcrWithParams(params); verify(mailerMock).sendStarted("test@test.com", 1); verify(engineMock).recognize(); verify(mailerMock)....
public void startOcrWithParams(OcrParameters params) { OcrFactory factory = factoryProvider.createFactory(params.ocrEngine, params.props); engine = factory.createEngine(); FileAccess fileAccess = beanProvider.getFileAccess(); File[] allBookFolders = fileAccess.getAllFolders(params.inputFolder, params.inputFormats); for...
OcrEngineStarter { public void startOcrWithParams(OcrParameters params) { OcrFactory factory = factoryProvider.createFactory(params.ocrEngine, params.props); engine = factory.createEngine(); FileAccess fileAccess = beanProvider.getFileAccess(); File[] allBookFolders = fileAccess.getAllFolders(params.inputFolder, params...
OcrEngineStarter { public void startOcrWithParams(OcrParameters params) { OcrFactory factory = factoryProvider.createFactory(params.ocrEngine, params.props); engine = factory.createEngine(); FileAccess fileAccess = beanProvider.getFileAccess(); File[] allBookFolders = fileAccess.getAllFolders(params.inputFolder, params...
OcrEngineStarter { public void startOcrWithParams(OcrParameters params) { OcrFactory factory = factoryProvider.createFactory(params.ocrEngine, params.props); engine = factory.createEngine(); FileAccess fileAccess = beanProvider.getFileAccess(); File[] allBookFolders = fileAccess.getAllFolders(params.inputFolder, params...
OcrEngineStarter { public void startOcrWithParams(OcrParameters params) { OcrFactory factory = factoryProvider.createFactory(params.ocrEngine, params.props); engine = factory.createEngine(); FileAccess fileAccess = beanProvider.getFileAccess(); File[] allBookFolders = fileAccess.getAllFolders(params.inputFolder, params...
@Test public void testGui() throws Throwable { if (!isInteractive()) return; SelectPostgisLayerJDialog selectPostgisLayerJDialog = new SelectPostgisLayerJDialog( null); TestingUtil.testGui(selectPostgisLayerJDialog); System.out.println(selectPostgisLayerJDialog.getPassword()); }
public String getPassword() { char[] chars = getPasswordInputField().getValue(); if (chars == null) return null; return new String(chars); }
SelectPostgisLayerJDialog extends CancellableDialogAdapter { public String getPassword() { char[] chars = getPasswordInputField().getValue(); if (chars == null) return null; return new String(chars); } }
SelectPostgisLayerJDialog extends CancellableDialogAdapter { public String getPassword() { char[] chars = getPasswordInputField().getValue(); if (chars == null) return null; return new String(chars); } SelectPostgisLayerJDialog(Component parentWindowComponent); }
SelectPostgisLayerJDialog extends CancellableDialogAdapter { public String getPassword() { char[] chars = getPasswordInputField().getValue(); if (chars == null) return null; return new String(chars); } SelectPostgisLayerJDialog(Component parentWindowComponent); @Override boolean okClose(); String getHost(); String getP...
SelectPostgisLayerJDialog extends CancellableDialogAdapter { public String getPassword() { char[] chars = getPasswordInputField().getValue(); if (chars == null) return null; return new String(chars); } SelectPostgisLayerJDialog(Component parentWindowComponent); @Override boolean okClose(); String getHost(); String getP...
@Test public void testExportJWSonly() throws Throwable { File expDir = GpTestingUtil.createAtlasExportTesttDir(); assertEquals(0, CliOptions.performArgs(new String[] { "-e", expDir.toString(), "-j", "--atlas", testAtlas.toString() })); assertFalse(ArrayUtils.contains(expDir.list(), JarExportUtil.DISK)); assertTrue(Arra...
public static int performArgs(final String[] args) { boolean exitAfterInterpret = false; CliOptions.Errors errorDuringInterpret = null; boolean startGui = false; File awcFile = null; File exportFile = null; CliOptions cliOptions = new CliOptions(); try { final CommandLine commandLine = cliOptions.parse(args); if (comma...
CliOptions extends Options { public static int performArgs(final String[] args) { boolean exitAfterInterpret = false; CliOptions.Errors errorDuringInterpret = null; boolean startGui = false; File awcFile = null; File exportFile = null; CliOptions cliOptions = new CliOptions(); try { final CommandLine commandLine = cliO...
CliOptions extends Options { public static int performArgs(final String[] args) { boolean exitAfterInterpret = false; CliOptions.Errors errorDuringInterpret = null; boolean startGui = false; File awcFile = null; File exportFile = null; CliOptions cliOptions = new CliOptions(); try { final CommandLine commandLine = cliO...
CliOptions extends Options { public static int performArgs(final String[] args) { boolean exitAfterInterpret = false; CliOptions.Errors errorDuringInterpret = null; boolean startGui = false; File awcFile = null; File exportFile = null; CliOptions cliOptions = new CliOptions(); try { final CommandLine commandLine = cliO...
CliOptions extends Options { public static int performArgs(final String[] args) { boolean exitAfterInterpret = false; CliOptions.Errors errorDuringInterpret = null; boolean startGui = false; File awcFile = null; File exportFile = null; CliOptions cliOptions = new CliOptions(); try { final CommandLine commandLine = cliO...
@Test public void testExportJWSonlyWithUrl() throws Throwable { File expDir = GpTestingUtil.createAtlasExportTesttDir(); assertEquals( 0, CliOptions.performArgs(new String[] { "-e", expDir.toString(), "-j", "--atlas", testAtlas.toString(), "-u", "http: assertFalse(ArrayUtils.contains(expDir.list(), JarExportUtil.DISK))...
public static int performArgs(final String[] args) { boolean exitAfterInterpret = false; CliOptions.Errors errorDuringInterpret = null; boolean startGui = false; File awcFile = null; File exportFile = null; CliOptions cliOptions = new CliOptions(); try { final CommandLine commandLine = cliOptions.parse(args); if (comma...
CliOptions extends Options { public static int performArgs(final String[] args) { boolean exitAfterInterpret = false; CliOptions.Errors errorDuringInterpret = null; boolean startGui = false; File awcFile = null; File exportFile = null; CliOptions cliOptions = new CliOptions(); try { final CommandLine commandLine = cliO...
CliOptions extends Options { public static int performArgs(final String[] args) { boolean exitAfterInterpret = false; CliOptions.Errors errorDuringInterpret = null; boolean startGui = false; File awcFile = null; File exportFile = null; CliOptions cliOptions = new CliOptions(); try { final CommandLine commandLine = cliO...
CliOptions extends Options { public static int performArgs(final String[] args) { boolean exitAfterInterpret = false; CliOptions.Errors errorDuringInterpret = null; boolean startGui = false; File awcFile = null; File exportFile = null; CliOptions cliOptions = new CliOptions(); try { final CommandLine commandLine = cliO...
CliOptions extends Options { public static int performArgs(final String[] args) { boolean exitAfterInterpret = false; CliOptions.Errors errorDuringInterpret = null; boolean startGui = false; File awcFile = null; File exportFile = null; CliOptions cliOptions = new CliOptions(); try { final CommandLine commandLine = cliO...
@Test public void testCommandLineExecution() throws Throwable { assertEquals("Missing value for a", Errors.PARSEEXCEPTION.getErrCode(), CliOptions.performArgs(new String[] { "-a" })); assertEquals("Illegal value for atlas", Errors.AWCPARAM_ILLEGAL.getErrCode(), CliOptions.performArgs(new String[] { "-a asdf342fds" }));...
public static int performArgs(final String[] args) { boolean exitAfterInterpret = false; CliOptions.Errors errorDuringInterpret = null; boolean startGui = false; File awcFile = null; File exportFile = null; CliOptions cliOptions = new CliOptions(); try { final CommandLine commandLine = cliOptions.parse(args); if (comma...
CliOptions extends Options { public static int performArgs(final String[] args) { boolean exitAfterInterpret = false; CliOptions.Errors errorDuringInterpret = null; boolean startGui = false; File awcFile = null; File exportFile = null; CliOptions cliOptions = new CliOptions(); try { final CommandLine commandLine = cliO...
CliOptions extends Options { public static int performArgs(final String[] args) { boolean exitAfterInterpret = false; CliOptions.Errors errorDuringInterpret = null; boolean startGui = false; File awcFile = null; File exportFile = null; CliOptions cliOptions = new CliOptions(); try { final CommandLine commandLine = cliO...
CliOptions extends Options { public static int performArgs(final String[] args) { boolean exitAfterInterpret = false; CliOptions.Errors errorDuringInterpret = null; boolean startGui = false; File awcFile = null; File exportFile = null; CliOptions cliOptions = new CliOptions(); try { final CommandLine commandLine = cliO...
CliOptions extends Options { public static int performArgs(final String[] args) { boolean exitAfterInterpret = false; CliOptions.Errors errorDuringInterpret = null; boolean startGui = false; File awcFile = null; File exportFile = null; CliOptions cliOptions = new CliOptions(); try { final CommandLine commandLine = cliO...
@Test public void testPrintHelp() { new CliOptions().printHelp(); }
public void printHelp() { HelpFormatter formatter = new HelpFormatter(); formatter.printHelp("geopublisher", this); }
CliOptions extends Options { public void printHelp() { HelpFormatter formatter = new HelpFormatter(); formatter.printHelp("geopublisher", this); } }
CliOptions extends Options { public void printHelp() { HelpFormatter formatter = new HelpFormatter(); formatter.printHelp("geopublisher", this); } CliOptions(); }
CliOptions extends Options { public void printHelp() { HelpFormatter formatter = new HelpFormatter(); formatter.printHelp("geopublisher", this); } CliOptions(); CommandLine parse(String[] args); void printHelp(); static int performArgs(final String[] args); }
CliOptions extends Options { public void printHelp() { HelpFormatter formatter = new HelpFormatter(); formatter.printHelp("geopublisher", this); } CliOptions(); CommandLine parse(String[] args); void printHelp(); static int performArgs(final String[] args); static final String VERBOSE; static final String HELP; static ...
@Test public void testPrintGroup() { }
private void printGroup(Group g, String... wayToHere) { LangUtil.extendArray(wayToHere, R("GroupTree.Action.Edit")); for (int gi = 0; gi < g.getChildCount(); gi++) { TreeNode child = g.getChildAt(gi); if (!child.isLeaf()) { Group subg = (Group) child; String[] longWay = LangUtil.extendArray(wayToHere, subg.getTitle().t...
ACETranslationPrinter { private void printGroup(Group g, String... wayToHere) { LangUtil.extendArray(wayToHere, R("GroupTree.Action.Edit")); for (int gi = 0; gi < g.getChildCount(); gi++) { TreeNode child = g.getChildAt(gi); if (!child.isLeaf()) { Group subg = (Group) child; String[] longWay = LangUtil.extendArray(wayT...
ACETranslationPrinter { private void printGroup(Group g, String... wayToHere) { LangUtil.extendArray(wayToHere, R("GroupTree.Action.Edit")); for (int gi = 0; gi < g.getChildCount(); gi++) { TreeNode child = g.getChildAt(gi); if (!child.isLeaf()) { Group subg = (Group) child; String[] longWay = LangUtil.extendArray(wayT...
ACETranslationPrinter { private void printGroup(Group g, String... wayToHere) { LangUtil.extendArray(wayToHere, R("GroupTree.Action.Edit")); for (int gi = 0; gi < g.getChildCount(); gi++) { TreeNode child = g.getChildAt(gi); if (!child.isLeaf()) { Group subg = (Group) child; String[] longWay = LangUtil.extendArray(wayT...
ACETranslationPrinter { private void printGroup(Group g, String... wayToHere) { LangUtil.extendArray(wayToHere, R("GroupTree.Action.Edit")); for (int gi = 0; gi < g.getChildCount(); gi++) { TreeNode child = g.getChildAt(gi); if (!child.isLeaf()) { Group subg = (Group) child; String[] longWay = LangUtil.extendArray(wayT...
@Test @Ignore public void testUserExists() throws IOException { if (gphc.checkService() != SERVICE_STATUS.OK) return; assertFalse(gphc.userExists("asd")); assertTrue(gphc.userExists("w2")); }
public boolean userExists() throws IOException { return userExists(getUserName()); }
GpHosterClient { public boolean userExists() throws IOException { return userExists(getUserName()); } }
GpHosterClient { public boolean userExists() throws IOException { return userExists(getUserName()); } GpHosterClient(GpHosterServerSettings serverDesc); GpHosterClient(); }
GpHosterClient { public boolean userExists() throws IOException { return userExists(getUserName()); } GpHosterClient(GpHosterServerSettings serverDesc); GpHosterClient(); void setUserName(String userName); String getUserName(); void setPassword(String password); String getPassword(); boolean userExists(); boolean atla...
GpHosterClient { public boolean userExists() throws IOException { return userExists(getUserName()); } GpHosterClient(GpHosterServerSettings serverDesc); GpHosterClient(); void setUserName(String userName); String getUserName(); void setPassword(String password); String getPassword(); boolean userExists(); boolean atla...
@Test public void testUserCreate() throws IOException { if (gphc.checkService() != SERVICE_STATUS.OK) return; final String testUsername = "testUser" + System.currentTimeMillis(); assertFalse(gphc.userExists(testUsername)); assertEquals(CREATE_USER_RESULT.CREATED_PWDSENT, gphc.userCreate(testUsername, "tzeggai@wikisquar...
public CREATE_USER_RESULT userCreate(String username, String email) throws IOException { SwingUtil.checkNotOnEDT(); int code = sendRESTint(METHOD.GET.toString(), CREATE_USER_PATH + username + "?email=" + email, null, MASTUSER, MASTPASSWD); if (code == SC_OK) return CREATE_USER_RESULT.CREATED_PWDSENT; if (code == 401) r...
GpHosterClient { public CREATE_USER_RESULT userCreate(String username, String email) throws IOException { SwingUtil.checkNotOnEDT(); int code = sendRESTint(METHOD.GET.toString(), CREATE_USER_PATH + username + "?email=" + email, null, MASTUSER, MASTPASSWD); if (code == SC_OK) return CREATE_USER_RESULT.CREATED_PWDSENT; i...
GpHosterClient { public CREATE_USER_RESULT userCreate(String username, String email) throws IOException { SwingUtil.checkNotOnEDT(); int code = sendRESTint(METHOD.GET.toString(), CREATE_USER_PATH + username + "?email=" + email, null, MASTUSER, MASTPASSWD); if (code == SC_OK) return CREATE_USER_RESULT.CREATED_PWDSENT; i...
GpHosterClient { public CREATE_USER_RESULT userCreate(String username, String email) throws IOException { SwingUtil.checkNotOnEDT(); int code = sendRESTint(METHOD.GET.toString(), CREATE_USER_PATH + username + "?email=" + email, null, MASTUSER, MASTPASSWD); if (code == SC_OK) return CREATE_USER_RESULT.CREATED_PWDSENT; i...
GpHosterClient { public CREATE_USER_RESULT userCreate(String username, String email) throws IOException { SwingUtil.checkNotOnEDT(); int code = sendRESTint(METHOD.GET.toString(), CREATE_USER_PATH + username + "?email=" + email, null, MASTUSER, MASTPASSWD); if (code == SC_OK) return CREATE_USER_RESULT.CREATED_PWDSENT; i...
@Test @Ignore public void testAtlasBasenameFree() throws IOException { assertTrue(gphc.atlasBasenameFree("33234534")); }
public boolean atlasBasenameFree(String baseName) throws IOException { return SC_OK == sendRESTint(METHOD.GET.toString(), CHECKFREE_ATLASNAME_PATH + baseName, null, null, null); }
GpHosterClient { public boolean atlasBasenameFree(String baseName) throws IOException { return SC_OK == sendRESTint(METHOD.GET.toString(), CHECKFREE_ATLASNAME_PATH + baseName, null, null, null); } }
GpHosterClient { public boolean atlasBasenameFree(String baseName) throws IOException { return SC_OK == sendRESTint(METHOD.GET.toString(), CHECKFREE_ATLASNAME_PATH + baseName, null, null, null); } GpHosterClient(GpHosterServerSettings serverDesc); GpHosterClient(); }
GpHosterClient { public boolean atlasBasenameFree(String baseName) throws IOException { return SC_OK == sendRESTint(METHOD.GET.toString(), CHECKFREE_ATLASNAME_PATH + baseName, null, null, null); } GpHosterClient(GpHosterServerSettings serverDesc); GpHosterClient(); void setUserName(String userName); String getUserName...
GpHosterClient { public boolean atlasBasenameFree(String baseName) throws IOException { return SC_OK == sendRESTint(METHOD.GET.toString(), CHECKFREE_ATLASNAME_PATH + baseName, null, null, null); } GpHosterClient(GpHosterServerSettings serverDesc); GpHosterClient(); void setUserName(String userName); String getUserName...
@Test public void testExportAtlasLibsNoSignNoGUI() throws Exception { assertNotNull(atlasExportTesttDir); LOGGER.debug("atlasExportTesttDir=" + atlasExportTesttDir.getAbsolutePath()); FileUtils.deleteDirectory(atlasExportTesttDir); assertTrue(atlasExportTesttDir.mkdir()); JarExportUtil jeu = new JarExportUtil(atlasConf...
public void export() throws Exception { totalSteps = 10; totalSteps += ace.getAtlasDir().listFiles(filterForRootLevelFiles).length; totalSteps += ace.getUsedDpes().size(); totalSteps += getJarAndNativeLibNames().length; info(GpUtil.R("ExportDialog.processWindowTitle.Exporting")); try { final File targetJar = new File(g...
JarExportUtil extends AbstractAtlasExporter { public void export() throws Exception { totalSteps = 10; totalSteps += ace.getAtlasDir().listFiles(filterForRootLevelFiles).length; totalSteps += ace.getUsedDpes().size(); totalSteps += getJarAndNativeLibNames().length; info(GpUtil.R("ExportDialog.processWindowTitle.Exporti...
JarExportUtil extends AbstractAtlasExporter { public void export() throws Exception { totalSteps = 10; totalSteps += ace.getAtlasDir().listFiles(filterForRootLevelFiles).length; totalSteps += ace.getUsedDpes().size(); totalSteps += getJarAndNativeLibNames().length; info(GpUtil.R("ExportDialog.processWindowTitle.Exporti...
JarExportUtil extends AbstractAtlasExporter { public void export() throws Exception { totalSteps = 10; totalSteps += ace.getAtlasDir().listFiles(filterForRootLevelFiles).length; totalSteps += ace.getUsedDpes().size(); totalSteps += getJarAndNativeLibNames().length; info(GpUtil.R("ExportDialog.processWindowTitle.Exporti...
JarExportUtil extends AbstractAtlasExporter { public void export() throws Exception { totalSteps = 10; totalSteps += ace.getAtlasDir().listFiles(filterForRootLevelFiles).length; totalSteps += ace.getUsedDpes().size(); totalSteps += getJarAndNativeLibNames().length; info(GpUtil.R("ExportDialog.processWindowTitle.Exporti...
@Test public void testGetJarLibNames() throws IOException { assertNotNull(atlasExportTesttDir); LOGGER.debug("atlasExportTesttDir=" + atlasExportTesttDir.getAbsolutePath()); FileUtils.deleteDirectory(atlasExportTesttDir); assertTrue(atlasExportTesttDir.mkdir()); JarExportUtil jeu = new JarExportUtil(atlasConfig, atlasE...
String[] getJarLibNames() { String[] libs; Properties p = new Properties(); String propertiesName = "/atlasdependencies.properties"; try { URL resource = HTMLInfoLoboBrowser.class .getResource(propertiesName); p.load(resource.openStream()); String atlasDependecies = p.getProperty("classpath"); atlasDependecies = atlasD...
JarExportUtil extends AbstractAtlasExporter { String[] getJarLibNames() { String[] libs; Properties p = new Properties(); String propertiesName = "/atlasdependencies.properties"; try { URL resource = HTMLInfoLoboBrowser.class .getResource(propertiesName); p.load(resource.openStream()); String atlasDependecies = p.getPr...
JarExportUtil extends AbstractAtlasExporter { String[] getJarLibNames() { String[] libs; Properties p = new Properties(); String propertiesName = "/atlasdependencies.properties"; try { URL resource = HTMLInfoLoboBrowser.class .getResource(propertiesName); p.load(resource.openStream()); String atlasDependecies = p.getPr...
JarExportUtil extends AbstractAtlasExporter { String[] getJarLibNames() { String[] libs; Properties p = new Properties(); String propertiesName = "/atlasdependencies.properties"; try { URL resource = HTMLInfoLoboBrowser.class .getResource(propertiesName); p.load(resource.openStream()); String atlasDependecies = p.getPr...
JarExportUtil extends AbstractAtlasExporter { String[] getJarLibNames() { String[] libs; Properties p = new Properties(); String propertiesName = "/atlasdependencies.properties"; try { URL resource = HTMLInfoLoboBrowser.class .getResource(propertiesName); p.load(resource.openStream()); String atlasDependecies = p.getPr...
@Test public void testImportArabicInHeader() throws AtlasException, FactoryException, TransformException, SAXException, IOException, ParserConfigurationException { URL url = GpTestingUtil.TestDatasetsVector.arabicInHeader.getUrl(); List<String> illegalAtts = DpLayerVectorFeatureSourceShapefileEd .checkAttributeNames(ur...
static List<String> checkAttributeNames(URL url) throws IOException { ArrayList<String> illegalAttributeNames = new ArrayList<String>(); ShapefileDataStore store = new ShapefileDataStore(url); try { SimpleFeatureType schema2 = store.getSchema(); for (int aindex = 0; aindex < schema2.getAttributeCount(); aindex++) { Att...
DpLayerVectorFeatureSourceShapefileEd extends DpLayerVectorFeatureSourceShapefile implements DpEditableInterface { static List<String> checkAttributeNames(URL url) throws IOException { ArrayList<String> illegalAttributeNames = new ArrayList<String>(); ShapefileDataStore store = new ShapefileDataStore(url); try { Simp...
DpLayerVectorFeatureSourceShapefileEd extends DpLayerVectorFeatureSourceShapefile implements DpEditableInterface { static List<String> checkAttributeNames(URL url) throws IOException { ArrayList<String> illegalAttributeNames = new ArrayList<String>(); ShapefileDataStore store = new ShapefileDataStore(url); try { Simp...
DpLayerVectorFeatureSourceShapefileEd extends DpLayerVectorFeatureSourceShapefile implements DpEditableInterface { static List<String> checkAttributeNames(URL url) throws IOException { ArrayList<String> illegalAttributeNames = new ArrayList<String>(); ShapefileDataStore store = new ShapefileDataStore(url); try { Simp...
DpLayerVectorFeatureSourceShapefileEd extends DpLayerVectorFeatureSourceShapefile implements DpEditableInterface { static List<String> checkAttributeNames(URL url) throws IOException { ArrayList<String> illegalAttributeNames = new ArrayList<String>(); ShapefileDataStore store = new ShapefileDataStore(url); try { Simp...
@Test public void testJarExecutables() throws IOException { JarExportUtil jeu = new JarExportUtil(atlasConfig, atlasExportTesttDir, true, true, false); FileUtils.deleteDirectory(jeu.getTempDir()); }
public File getTempDir() { return tempDir; }
JarExportUtil extends AbstractAtlasExporter { public File getTempDir() { return tempDir; } }
JarExportUtil extends AbstractAtlasExporter { public File getTempDir() { return tempDir; } JarExportUtil(final AtlasConfigEditable ace_, ResultProgressHandle progress, final File exportDirectory, final Boolean toDisk, final Boolean toJws, final Boolean copyJRE); JarExportUtil(final AtlasConfigEditable ace_, f...
JarExportUtil extends AbstractAtlasExporter { public File getTempDir() { return tempDir; } JarExportUtil(final AtlasConfigEditable ace_, ResultProgressHandle progress, final File exportDirectory, final Boolean toDisk, final Boolean toJws, final Boolean copyJRE); JarExportUtil(final AtlasConfigEditable ace_, f...
JarExportUtil extends AbstractAtlasExporter { public File getTempDir() { return tempDir; } JarExportUtil(final AtlasConfigEditable ace_, ResultProgressHandle progress, final File exportDirectory, final Boolean toDisk, final Boolean toJws, final Boolean copyJRE); JarExportUtil(final AtlasConfigEditable ace_, f...
@Test public void testCreateIndexHTML() throws IOException, InterruptedException, InvocationTargetException { File tmp1 = TestingUtil.getNewTempDir(); JarExportUtil jeu = new JarExportUtil(atlasConfig, tmp1, false, false, false); final File html = jeu.createIndexHTML(atlasConfig, tmp1); assertTrue(html.exists()); Syste...
File createIndexHTML(final AtlasConfigEditable ace, final File directory) throws AtlasExportException { final File htmlFile = new File(directory, "index.html"); FileWriter fileWriter = null; try { fileWriter = new FileWriter(htmlFile); fileWriter .write("<?xml version='1.0' encoding='UTF-8'?><html><head><title>" + ace....
JarExportUtil extends AbstractAtlasExporter { File createIndexHTML(final AtlasConfigEditable ace, final File directory) throws AtlasExportException { final File htmlFile = new File(directory, "index.html"); FileWriter fileWriter = null; try { fileWriter = new FileWriter(htmlFile); fileWriter .write("<?xml version='1.0'...
JarExportUtil extends AbstractAtlasExporter { File createIndexHTML(final AtlasConfigEditable ace, final File directory) throws AtlasExportException { final File htmlFile = new File(directory, "index.html"); FileWriter fileWriter = null; try { fileWriter = new FileWriter(htmlFile); fileWriter .write("<?xml version='1.0'...
JarExportUtil extends AbstractAtlasExporter { File createIndexHTML(final AtlasConfigEditable ace, final File directory) throws AtlasExportException { final File htmlFile = new File(directory, "index.html"); FileWriter fileWriter = null; try { fileWriter = new FileWriter(htmlFile); fileWriter .write("<?xml version='1.0'...
JarExportUtil extends AbstractAtlasExporter { File createIndexHTML(final AtlasConfigEditable ace, final File directory) throws AtlasExportException { final File htmlFile = new File(directory, "index.html"); FileWriter fileWriter = null; try { fileWriter = new FileWriter(htmlFile); fileWriter .write("<?xml version='1.0'...
@Test public void testManageChartsForMapDialog() throws Throwable { Map map = null; DpLayerVectorFeatureSource dplv = null; AtlasConfigEditable ace = GpTestingUtil.getAtlasConfigE(TestAtlas.small); for (Map m : ace.getMapPool().values()) { for (DpRef<DpLayer<?, ? extends ChartStyle>> dpe : m.getLayers()) { if (dpe.getT...
public ManageChartsForMapDialog(Component owner, DpLayerVectorFeatureSource dplv, AtlasMapLegend mapLegend) { super(owner, GeopublisherGUI.R( "ManageChartsForMapDialog.TitleForDPLayer", dplv.getTitle() .toString())); this.dplv = dplv; this.atlasConfigEditable = (AtlasConfigEditable) dplv.getAtlasConfig(); this.map = ma...
ManageChartsForMapDialog extends CancellableDialogAdapter { public ManageChartsForMapDialog(Component owner, DpLayerVectorFeatureSource dplv, AtlasMapLegend mapLegend) { super(owner, GeopublisherGUI.R( "ManageChartsForMapDialog.TitleForDPLayer", dplv.getTitle() .toString())); this.dplv = dplv; this.atlasConfigEditable ...
ManageChartsForMapDialog extends CancellableDialogAdapter { public ManageChartsForMapDialog(Component owner, DpLayerVectorFeatureSource dplv, AtlasMapLegend mapLegend) { super(owner, GeopublisherGUI.R( "ManageChartsForMapDialog.TitleForDPLayer", dplv.getTitle() .toString())); this.dplv = dplv; this.atlasConfigEditable ...
ManageChartsForMapDialog extends CancellableDialogAdapter { public ManageChartsForMapDialog(Component owner, DpLayerVectorFeatureSource dplv, AtlasMapLegend mapLegend) { super(owner, GeopublisherGUI.R( "ManageChartsForMapDialog.TitleForDPLayer", dplv.getTitle() .toString())); this.dplv = dplv; this.atlasConfigEditable ...
ManageChartsForMapDialog extends CancellableDialogAdapter { public ManageChartsForMapDialog(Component owner, DpLayerVectorFeatureSource dplv, AtlasMapLegend mapLegend) { super(owner, GeopublisherGUI.R( "ManageChartsForMapDialog.TitleForDPLayer", dplv.getTitle() .toString())); this.dplv = dplv; this.atlasConfigEditable ...
@Test public void testDuplicateMap() throws AtlasException, FactoryException, TransformException, SAXException, IOException, ParserConfigurationException { AtlasConfigEditable ace = GpTestingUtil .getAtlasConfigE(TestAtlas.small); Map map1 = ace.getMapPool().get(0); File htmlDir1 = ace.getHtmlDirFor(map1); int count1 =...
@Override public void actionPerformed(ActionEvent e) { int idx = mapPoolJTable.getSelectedRow(); final Map map = mapPool.get(mapPoolJTable.convertRowIndexToModel(idx)); actionPerformed(map); }
MapPoolDuplicateAction extends AbstractAction { @Override public void actionPerformed(ActionEvent e) { int idx = mapPoolJTable.getSelectedRow(); final Map map = mapPool.get(mapPoolJTable.convertRowIndexToModel(idx)); actionPerformed(map); } }
MapPoolDuplicateAction extends AbstractAction { @Override public void actionPerformed(ActionEvent e) { int idx = mapPoolJTable.getSelectedRow(); final Map map = mapPool.get(mapPoolJTable.convertRowIndexToModel(idx)); actionPerformed(map); } MapPoolDuplicateAction(MapPoolJTable mapPoolJTable); }
MapPoolDuplicateAction extends AbstractAction { @Override public void actionPerformed(ActionEvent e) { int idx = mapPoolJTable.getSelectedRow(); final Map map = mapPool.get(mapPoolJTable.convertRowIndexToModel(idx)); actionPerformed(map); } MapPoolDuplicateAction(MapPoolJTable mapPoolJTable); @Override void actionPerfo...
MapPoolDuplicateAction extends AbstractAction { @Override public void actionPerformed(ActionEvent e) { int idx = mapPoolJTable.getSelectedRow(); final Map map = mapPool.get(mapPoolJTable.convertRowIndexToModel(idx)); actionPerformed(map); } MapPoolDuplicateAction(MapPoolJTable mapPoolJTable); @Override void actionPerfo...
@Test public void testGetQuality() throws AtlasException, FactoryException, TransformException, SAXException, IOException, ParserConfigurationException { AtlasConfigEditable atlasConfig = GpTestingUtil .getAtlasConfigE(GpTestingUtil.TestAtlas.small); DataPool dataPool = atlasConfig.getDataPool(); int dpeWithChartCount ...
public Double getQuality() { if (isBroken()) return 0.; if (quality == null || (System.currentTimeMillis() - qualityLastTimeCalculated) > 500) { qualityLastTimeCalculated = System.currentTimeMillis(); final List<String> languages = getAtlasConfig().getLanguages(); Double averageChartQuality = 1.; if (getCharts().size()...
DpEntry implements Comparable<DpEntry<? extends ChartStyle>>, Serializable, ExportableLayer { public Double getQuality() { if (isBroken()) return 0.; if (quality == null || (System.currentTimeMillis() - qualityLastTimeCalculated) > 500) { qualityLastTimeCalculated = System.currentTimeMillis(); final List<String> la...
DpEntry implements Comparable<DpEntry<? extends ChartStyle>>, Serializable, ExportableLayer { public Double getQuality() { if (isBroken()) return 0.; if (quality == null || (System.currentTimeMillis() - qualityLastTimeCalculated) > 500) { qualityLastTimeCalculated = System.currentTimeMillis(); final List<String> la...
DpEntry implements Comparable<DpEntry<? extends ChartStyle>>, Serializable, ExportableLayer { public Double getQuality() { if (isBroken()) return 0.; if (quality == null || (System.currentTimeMillis() - qualityLastTimeCalculated) > 500) { qualityLastTimeCalculated = System.currentTimeMillis(); final List<String> la...
DpEntry implements Comparable<DpEntry<? extends ChartStyle>>, Serializable, ExportableLayer { public Double getQuality() { if (isBroken()) return 0.; if (quality == null || (System.currentTimeMillis() - qualityLastTimeCalculated) > 500) { qualityLastTimeCalculated = System.currentTimeMillis(); final List<String> la...
@Test public void testFixBrokenBgColor(){ String oldHtml = "<html> <head> </head> <body bgcolor=\"ffe07a\"> <p><img height=\"298\" src=\"images/n4_java_vulkan_semeru_rauch_lava.jpg\" align=\"top\" width=\"447\">" + "</p><p><font size=\"+1\">Eruption des Vulkans Semeru auf der indonesischen Insel Java, 2004 </font><br><...
public static String fixBrokenBgColor(String oldHtml) { return oldHtml.replaceAll("color\\s?=\\s?[\",']([0-9,a-f,A-F]{6})[\",']", "#$1"); }
AvUtil extends GpCoreUtil { public static String fixBrokenBgColor(String oldHtml) { return oldHtml.replaceAll("color\\s?=\\s?[\",']([0-9,a-f,A-F]{6})[\",']", "#$1"); } }
AvUtil extends GpCoreUtil { public static String fixBrokenBgColor(String oldHtml) { return oldHtml.replaceAll("color\\s?=\\s?[\",']([0-9,a-f,A-F]{6})[\",']", "#$1"); } }
AvUtil extends GpCoreUtil { public static String fixBrokenBgColor(String oldHtml) { return oldHtml.replaceAll("color\\s?=\\s?[\",']([0-9,a-f,A-F]{6})[\",']", "#$1"); } static String fixBrokenBgColor(String oldHtml); static boolean fixBrokenBgColor(File oldHtml); }
AvUtil extends GpCoreUtil { public static String fixBrokenBgColor(String oldHtml) { return oldHtml.replaceAll("color\\s?=\\s?[\",']([0-9,a-f,A-F]{6})[\",']", "#$1"); } static String fixBrokenBgColor(String oldHtml); static boolean fixBrokenBgColor(File oldHtml); }
@Test public void testCreateLocalCopyFromURLRecoversIfTheFileIsDeleted() throws IOException { if (!TestingUtil.INTERACTIVE) return; URL url = new URL("http: assertNotNull(url); File file = AVSwingUtil .createLocalCopyFromURL(null, url, "test", "tif"); assertTrue(file.exists()); file.delete(); assertFalse(file.exists())...
public static File createLocalCopyFromURL(final Component owner, final URL url, String title, final String postFix) throws IOException { if (!url.toString().contains("jar:") && (url.toString().contains("file"))) { LOGGER.debug("Not copying the URL to temp file because we are local and not in a JAR."); return DataUtilit...
AVSwingUtil extends GpCoreUtil { public static File createLocalCopyFromURL(final Component owner, final URL url, String title, final String postFix) throws IOException { if (!url.toString().contains("jar:") && (url.toString().contains("file"))) { LOGGER.debug("Not copying the URL to temp file because we are local and n...
AVSwingUtil extends GpCoreUtil { public static File createLocalCopyFromURL(final Component owner, final URL url, String title, final String postFix) throws IOException { if (!url.toString().contains("jar:") && (url.toString().contains("file"))) { LOGGER.debug("Not copying the URL to temp file because we are local and n...
AVSwingUtil extends GpCoreUtil { public static File createLocalCopyFromURL(final Component owner, final URL url, String title, final String postFix) throws IOException { if (!url.toString().contains("jar:") && (url.toString().contains("file"))) { LOGGER.debug("Not copying the URL to temp file because we are local and n...
AVSwingUtil extends GpCoreUtil { public static File createLocalCopyFromURL(final Component owner, final URL url, String title, final String postFix) throws IOException { if (!url.toString().contains("jar:") && (url.toString().contains("file"))) { LOGGER.debug("Not copying the URL to temp file because we are local and n...
@Test public void testLoadPartEvenHeadless() throws IOException { if (TestingUtil.isInteractive()) { JNLPSwingUtil.loadPartAndCreateDialogForIt(null, "a"); AtlasStatusDialog myAsg = new AtlasStatusDialog(null, "my","my"); JNLPSwingUtil.loadPartAndCreateDialogForIt(myAsg, "a"); } }
public static void loadPartAndCreateDialogForIt( AtlasStatusDialogInterface asg, final String... parts) { try { if (GraphicsEnvironment.isHeadless()) { loadPart(parts, new NoGuiDownloadServiceListener()); return; } boolean edt = SwingUtilities.isEventDispatchThread(); LOGGER.debug("loadPartAndCreateDialogForIt(String[]...
JNLPSwingUtil extends JNLPUtil { public static void loadPartAndCreateDialogForIt( AtlasStatusDialogInterface asg, final String... parts) { try { if (GraphicsEnvironment.isHeadless()) { loadPart(parts, new NoGuiDownloadServiceListener()); return; } boolean edt = SwingUtilities.isEventDispatchThread(); LOGGER.debug("load...
JNLPSwingUtil extends JNLPUtil { public static void loadPartAndCreateDialogForIt( AtlasStatusDialogInterface asg, final String... parts) { try { if (GraphicsEnvironment.isHeadless()) { loadPart(parts, new NoGuiDownloadServiceListener()); return; } boolean edt = SwingUtilities.isEventDispatchThread(); LOGGER.debug("load...
JNLPSwingUtil extends JNLPUtil { public static void loadPartAndCreateDialogForIt( AtlasStatusDialogInterface asg, final String... parts) { try { if (GraphicsEnvironment.isHeadless()) { loadPart(parts, new NoGuiDownloadServiceListener()); return; } boolean edt = SwingUtilities.isEventDispatchThread(); LOGGER.debug("load...
JNLPSwingUtil extends JNLPUtil { public static void loadPartAndCreateDialogForIt( AtlasStatusDialogInterface asg, final String... parts) { try { if (GraphicsEnvironment.isHeadless()) { loadPart(parts, new NoGuiDownloadServiceListener()); return; } boolean edt = SwingUtilities.isEventDispatchThread(); LOGGER.debug("load...
@Test public void testCopy() throws AtlasException, FactoryException, TransformException, SAXException, IOException, ParserConfigurationException { for (int mi = 0; mi < ace.getMapPool().size(); mi++) { Map map = ace.getMapPool().get(mi); map.setPreviewMapExtendInGeopublisher(new Random().nextBoolean()); Map mapCopy = ...
@Override public Map copy() { final Map newMap = new Map(id, getAc()); copyTo(newMap); return newMap; }
Map extends DefaultMutableTreeNode implements Comparable<Object>, Copyable<Map> { @Override public Map copy() { final Map newMap = new Map(id, getAc()); copyTo(newMap); return newMap; } }
Map extends DefaultMutableTreeNode implements Comparable<Object>, Copyable<Map> { @Override public Map copy() { final Map newMap = new Map(id, getAc()); copyTo(newMap); return newMap; } Map(final String id, final AtlasConfig ac); Map(final AtlasConfig ac); }
Map extends DefaultMutableTreeNode implements Comparable<Object>, Copyable<Map> { @Override public Map copy() { final Map newMap = new Map(id, getAc()); copyTo(newMap); return newMap; } Map(final String id, final AtlasConfig ac); Map(final AtlasConfig ac); void resetMissingHTMLinfos(); void clearLayerList(); void un...
Map extends DefaultMutableTreeNode implements Comparable<Object>, Copyable<Map> { @Override public Map copy() { final Map newMap = new Map(id, getAc()); copyTo(newMap); return newMap; } Map(final String id, final AtlasConfig ac); Map(final AtlasConfig ac); void resetMissingHTMLinfos(); void clearLayerList(); void un...
@Test public void testSaveAndLoad() throws Exception { ace.getMapPool().get(0).setPreviewMapExtendInGeopublisher(true); AtlasConfigEditable ace2 = GpTestingUtil.saveAndLoad(ace); for (int mi = 0; mi < ace.getMapPool().size(); mi++) { Map map = ace.getMapPool().get(mi); Map map2 = ace2.getMapPool().get(mi); checkEquals(...
public void setPreviewMapExtendInGeopublisher( boolean previewMapExtendInGeopublisher) { this.previewMapExtendInGeopublisher = previewMapExtendInGeopublisher; }
Map extends DefaultMutableTreeNode implements Comparable<Object>, Copyable<Map> { public void setPreviewMapExtendInGeopublisher( boolean previewMapExtendInGeopublisher) { this.previewMapExtendInGeopublisher = previewMapExtendInGeopublisher; } }
Map extends DefaultMutableTreeNode implements Comparable<Object>, Copyable<Map> { public void setPreviewMapExtendInGeopublisher( boolean previewMapExtendInGeopublisher) { this.previewMapExtendInGeopublisher = previewMapExtendInGeopublisher; } Map(final String id, final AtlasConfig ac); Map(final AtlasConfig ac); }
Map extends DefaultMutableTreeNode implements Comparable<Object>, Copyable<Map> { public void setPreviewMapExtendInGeopublisher( boolean previewMapExtendInGeopublisher) { this.previewMapExtendInGeopublisher = previewMapExtendInGeopublisher; } Map(final String id, final AtlasConfig ac); Map(final AtlasConfig ac); voi...
Map extends DefaultMutableTreeNode implements Comparable<Object>, Copyable<Map> { public void setPreviewMapExtendInGeopublisher( boolean previewMapExtendInGeopublisher) { this.previewMapExtendInGeopublisher = previewMapExtendInGeopublisher; } Map(final String id, final AtlasConfig ac); Map(final AtlasConfig ac); voi...
@Test public void testParseGeocommonsReadme() { }
private void parseGeocommonsReadme(URL geocommonsReadmeURL, int phase) { try { InputStream openStream = geocommonsReadmeURL.openStream(); try { InputStreamReader inStream = new InputStreamReader(openStream); try { BufferedReader inReader = new BufferedReader(inStream); try { String title = ""; while (title.trim().isEmp...
DpLayerVectorFeatureSourceShapefileEd extends DpLayerVectorFeatureSourceShapefile implements DpEditableInterface { private void parseGeocommonsReadme(URL geocommonsReadmeURL, int phase) { try { InputStream openStream = geocommonsReadmeURL.openStream(); try { InputStreamReader inStream = new InputStreamReader(openStre...
DpLayerVectorFeatureSourceShapefileEd extends DpLayerVectorFeatureSourceShapefile implements DpEditableInterface { private void parseGeocommonsReadme(URL geocommonsReadmeURL, int phase) { try { InputStream openStream = geocommonsReadmeURL.openStream(); try { InputStreamReader inStream = new InputStreamReader(openStre...
DpLayerVectorFeatureSourceShapefileEd extends DpLayerVectorFeatureSourceShapefile implements DpEditableInterface { private void parseGeocommonsReadme(URL geocommonsReadmeURL, int phase) { try { InputStream openStream = geocommonsReadmeURL.openStream(); try { InputStreamReader inStream = new InputStreamReader(openStre...
DpLayerVectorFeatureSourceShapefileEd extends DpLayerVectorFeatureSourceShapefile implements DpEditableInterface { private void parseGeocommonsReadme(URL geocommonsReadmeURL, int phase) { try { InputStream openStream = geocommonsReadmeURL.openStream(); try { InputStreamReader inStream = new InputStreamReader(openStre...
@Test public void testUniqueValuesAddGUI() throws Throwable { final UniqueValuesRuleList rl = new RuleListFactory( GTTestingUtil.TestDatasetsVector.kreise.getStyledFS()) .createUniqueValuesRulesList(true); if (TestingUtil.INTERACTIVE) { UniqueValuesAddGUI dialog = new UniqueValuesAddGUI(null, rl); TestingUtil.testGui(d...
public UniqueValuesAddGUI(Component owner, final UniqueValuesRulesListInterface<VALUETYPE> rulesList) { super(owner); this.rulesList = rulesList; initialize(); String title = ASUtil.R("UniqueValuesRuleList.AddAllValues.SearchingMsg"); final AtlasStatusDialog statusDialog = new AtlasStatusDialog(owner, title, title); At...
UniqueValuesAddGUI extends CancellableDialogAdapter { public UniqueValuesAddGUI(Component owner, final UniqueValuesRulesListInterface<VALUETYPE> rulesList) { super(owner); this.rulesList = rulesList; initialize(); String title = ASUtil.R("UniqueValuesRuleList.AddAllValues.SearchingMsg"); final AtlasStatusDialog statusD...
UniqueValuesAddGUI extends CancellableDialogAdapter { public UniqueValuesAddGUI(Component owner, final UniqueValuesRulesListInterface<VALUETYPE> rulesList) { super(owner); this.rulesList = rulesList; initialize(); String title = ASUtil.R("UniqueValuesRuleList.AddAllValues.SearchingMsg"); final AtlasStatusDialog statusD...
UniqueValuesAddGUI extends CancellableDialogAdapter { public UniqueValuesAddGUI(Component owner, final UniqueValuesRulesListInterface<VALUETYPE> rulesList) { super(owner); this.rulesList = rulesList; initialize(); String title = ASUtil.R("UniqueValuesRuleList.AddAllValues.SearchingMsg"); final AtlasStatusDialog statusD...
UniqueValuesAddGUI extends CancellableDialogAdapter { public UniqueValuesAddGUI(Component owner, final UniqueValuesRulesListInterface<VALUETYPE> rulesList) { super(owner); this.rulesList = rulesList; initialize(); String title = ASUtil.R("UniqueValuesRuleList.AddAllValues.SearchingMsg"); final AtlasStatusDialog statusD...
@Test public void testSymbolSelectorGUI() throws Throwable { if (!TestingUtil.isInteractive()) return; AtlasStylerVector asv = AsTestingUtil .getAtlasStyler(TestDatasetsVector.polygonSnow); SinglePolygonSymbolRuleList singleSymbolRuleList = RuleListFactory .createSinglePolygonSymbolRulesList(new Translation( "test with...
public SymbolSelectorGUI(Component owner, AtlasStylerVector asv, String title, final SingleRuleList singleSymbolRuleList) { super(owner); if (asv == null) throw new IllegalStateException("asv may not be null here!"); this.asv = asv; if (title != null) setTitle(title); else setTitle(DIALOG_TITLE); this.singleSymbolRuleL...
SymbolSelectorGUI extends AtlasDialog { public SymbolSelectorGUI(Component owner, AtlasStylerVector asv, String title, final SingleRuleList singleSymbolRuleList) { super(owner); if (asv == null) throw new IllegalStateException("asv may not be null here!"); this.asv = asv; if (title != null) setTitle(title); else setTit...
SymbolSelectorGUI extends AtlasDialog { public SymbolSelectorGUI(Component owner, AtlasStylerVector asv, String title, final SingleRuleList singleSymbolRuleList) { super(owner); if (asv == null) throw new IllegalStateException("asv may not be null here!"); this.asv = asv; if (title != null) setTitle(title); else setTit...
SymbolSelectorGUI extends AtlasDialog { public SymbolSelectorGUI(Component owner, AtlasStylerVector asv, String title, final SingleRuleList singleSymbolRuleList) { super(owner); if (asv == null) throw new IllegalStateException("asv may not be null here!"); this.asv = asv; if (title != null) setTitle(title); else setTit...
SymbolSelectorGUI extends AtlasDialog { public SymbolSelectorGUI(Component owner, AtlasStylerVector asv, String title, final SingleRuleList singleSymbolRuleList) { super(owner); if (asv == null) throw new IllegalStateException("asv may not be null here!"); this.asv = asv; if (title != null) setTitle(title); else setTit...
@Test public void testShowGuiWithoutValueAttribute() throws Throwable { if (!hasGui()) return; AtlasStylerVector asv = AsTestingUtil .getAtlasStyler(TestDatasetsVector.countryShp); FeatureClassification classifier = new FeatureClassification( asv.getStyledFeatures()); ClassificationGUI gui = new FeatureClassificationGU...
private AtlasStylerVector getAtlasStyler() { return (AtlasStylerVector) atlasStyler; }
FeatureClassificationGUI extends ClassificationGUI { private AtlasStylerVector getAtlasStyler() { return (AtlasStylerVector) atlasStyler; } }
FeatureClassificationGUI extends ClassificationGUI { private AtlasStylerVector getAtlasStyler() { return (AtlasStylerVector) atlasStyler; } FeatureClassificationGUI(Component owner, FeatureClassification classifier, AtlasStylerVector atlasStyler, String title); }
FeatureClassificationGUI extends ClassificationGUI { private AtlasStylerVector getAtlasStyler() { return (AtlasStylerVector) atlasStyler; } FeatureClassificationGUI(Component owner, FeatureClassification classifier, AtlasStylerVector atlasStyler, String title); FeatureClassification getClassifier(); }
FeatureClassificationGUI extends ClassificationGUI { private AtlasStylerVector getAtlasStyler() { return (AtlasStylerVector) atlasStyler; } FeatureClassificationGUI(Component owner, FeatureClassification classifier, AtlasStylerVector atlasStyler, String title); FeatureClassification getClassifier(); }
@Test public void testShowGui() throws Throwable { if (!hasGui()) return; AtlasStylerVector asv = AsTestingUtil .getAtlasStyler(TestDatasetsVector.countryShp); FeatureClassification classifier = new FeatureClassification( asv.getStyledFeatures()); classifier.setValue_field_name(FeatureUtil.getNumericalFieldNames( asv.g...
private AtlasStylerVector getAtlasStyler() { return (AtlasStylerVector) atlasStyler; }
FeatureClassificationGUI extends ClassificationGUI { private AtlasStylerVector getAtlasStyler() { return (AtlasStylerVector) atlasStyler; } }
FeatureClassificationGUI extends ClassificationGUI { private AtlasStylerVector getAtlasStyler() { return (AtlasStylerVector) atlasStyler; } FeatureClassificationGUI(Component owner, FeatureClassification classifier, AtlasStylerVector atlasStyler, String title); }
FeatureClassificationGUI extends ClassificationGUI { private AtlasStylerVector getAtlasStyler() { return (AtlasStylerVector) atlasStyler; } FeatureClassificationGUI(Component owner, FeatureClassification classifier, AtlasStylerVector atlasStyler, String title); FeatureClassification getClassifier(); }
FeatureClassificationGUI extends ClassificationGUI { private AtlasStylerVector getAtlasStyler() { return (AtlasStylerVector) atlasStyler; } FeatureClassificationGUI(Component owner, FeatureClassification classifier, AtlasStylerVector atlasStyler, String title); FeatureClassification getClassifier(); }
@Test public void testTextLabelingClassLanguageSelectorDialog() throws Throwable { if (!hasGui()) return; TextRuleList textRulesList = new RuleListFactory( GTTestingUtil.TestDatasetsVector.countryShp.getStyledFS()) .createTextRulesList(true); TextLabelingClassLanguageSelectorDialog d = new TextLabelingClassLanguageSele...
public TextLabelingClassLanguageSelectorDialog(Component parentGui, TextRuleList rulesList) { super(parentGui, ASUtil .R("TextSymbolizerClass.CreateALanguageDefault.DialogTitle")); this.rulesList = rulesList; lcb = new LanguagesComboBox(AtlasStylerVector.getLanguages(), rulesList.getDefaultLanguages()); setContentPane(...
TextLabelingClassLanguageSelectorDialog extends CancellableDialogAdapter { public TextLabelingClassLanguageSelectorDialog(Component parentGui, TextRuleList rulesList) { super(parentGui, ASUtil .R("TextSymbolizerClass.CreateALanguageDefault.DialogTitle")); this.rulesList = rulesList; lcb = new LanguagesComboBox(AtlasS...
TextLabelingClassLanguageSelectorDialog extends CancellableDialogAdapter { public TextLabelingClassLanguageSelectorDialog(Component parentGui, TextRuleList rulesList) { super(parentGui, ASUtil .R("TextSymbolizerClass.CreateALanguageDefault.DialogTitle")); this.rulesList = rulesList; lcb = new LanguagesComboBox(AtlasS...
TextLabelingClassLanguageSelectorDialog extends CancellableDialogAdapter { public TextLabelingClassLanguageSelectorDialog(Component parentGui, TextRuleList rulesList) { super(parentGui, ASUtil .R("TextSymbolizerClass.CreateALanguageDefault.DialogTitle")); this.rulesList = rulesList; lcb = new LanguagesComboBox(AtlasS...
TextLabelingClassLanguageSelectorDialog extends CancellableDialogAdapter { public TextLabelingClassLanguageSelectorDialog(Component parentGui, TextRuleList rulesList) { super(parentGui, ASUtil .R("TextSymbolizerClass.CreateALanguageDefault.DialogTitle")); this.rulesList = rulesList; lcb = new LanguagesComboBox(AtlasS...
@Test public void testUpdateExternalGraphicLabel() throws Exception { String regex = "\\$\\{.*?\\}"; String url="http: assertTrue(RegexCache.getInstance().getPattern(regex).matcher(url).find()); }
protected void updateExternalGraphicLabel(final JLabel label, final Graphic graphic) { SVGGraphicFactory svgFactory = new SVGGraphicFactory(); Icon icon = null; if (graphic != null) { if ((graphic.getExternalGraphics() != null) && (graphic.getExternalGraphics().length > 0)) { ExternalGraphic externalGraphic = graphic.g...
AbstractStyleEditGUI extends JPanel { protected void updateExternalGraphicLabel(final JLabel label, final Graphic graphic) { SVGGraphicFactory svgFactory = new SVGGraphicFactory(); Icon icon = null; if (graphic != null) { if ((graphic.getExternalGraphics() != null) && (graphic.getExternalGraphics().length > 0)) { Exter...
AbstractStyleEditGUI extends JPanel { protected void updateExternalGraphicLabel(final JLabel label, final Graphic graphic) { SVGGraphicFactory svgFactory = new SVGGraphicFactory(); Icon icon = null; if (graphic != null) { if ((graphic.getExternalGraphics() != null) && (graphic.getExternalGraphics().length > 0)) { Exter...
AbstractStyleEditGUI extends JPanel { protected void updateExternalGraphicLabel(final JLabel label, final Graphic graphic) { SVGGraphicFactory svgFactory = new SVGGraphicFactory(); Icon icon = null; if (graphic != null) { if ((graphic.getExternalGraphics() != null) && (graphic.getExternalGraphics().length > 0)) { Exter...
AbstractStyleEditGUI extends JPanel { protected void updateExternalGraphicLabel(final JLabel label, final Graphic graphic) { SVGGraphicFactory svgFactory = new SVGGraphicFactory(); Icon icon = null; if (graphic != null) { if ((graphic.getExternalGraphics() != null) && (graphic.getExternalGraphics().length > 0)) { Exter...
@Test public void testLineSymbolEditGUI() throws Throwable { if (!TestingUtil.isInteractive()) return; LineSymbolEditGUI lineSymbolEditGUI = new LineSymbolEditGUI( AsTestingUtil.getAtlasStyler(TestDatasetsVector.countryShp), ps); TestingUtil.testGui(lineSymbolEditGUI); }
public LineSymbolEditGUI(final AtlasStylerVector asv, final org.geotools.styling.LineSymbolizer symbolizer) { super(asv); this.symbolizer = symbolizer; initialize(); }
LineSymbolEditGUI extends AbstractStyleEditGUI { public LineSymbolEditGUI(final AtlasStylerVector asv, final org.geotools.styling.LineSymbolizer symbolizer) { super(asv); this.symbolizer = symbolizer; initialize(); } }
LineSymbolEditGUI extends AbstractStyleEditGUI { public LineSymbolEditGUI(final AtlasStylerVector asv, final org.geotools.styling.LineSymbolizer symbolizer) { super(asv); this.symbolizer = symbolizer; initialize(); } LineSymbolEditGUI(final AtlasStylerVector asv, final org.geotools.styling.LineSymbolizer symbolizer); }
LineSymbolEditGUI extends AbstractStyleEditGUI { public LineSymbolEditGUI(final AtlasStylerVector asv, final org.geotools.styling.LineSymbolizer symbolizer) { super(asv); this.symbolizer = symbolizer; initialize(); } LineSymbolEditGUI(final AtlasStylerVector asv, final org.geotools.styling.LineSymbolizer symbolizer); ...
LineSymbolEditGUI extends AbstractStyleEditGUI { public LineSymbolEditGUI(final AtlasStylerVector asv, final org.geotools.styling.LineSymbolizer symbolizer) { super(asv); this.symbolizer = symbolizer; initialize(); } LineSymbolEditGUI(final AtlasStylerVector asv, final org.geotools.styling.LineSymbolizer symbolizer); ...
@Test public void testPolygonSymbolEditGUI() throws Throwable { if (!TestingUtil.isInteractive()) return; ps.setFill(null); ps.setStroke(null); PolygonSymbolEditGUI polygonSymbolEditGUI = new PolygonSymbolEditGUI(AsTestingUtil.getAtlasStyler(TestDatasetsVector.countryShp),ps); TestingUtil.testGui(polygonSymbolEditGUI);...
public PolygonSymbolEditGUI(final AtlasStylerVector asv, final org.geotools.styling.PolygonSymbolizer symbolizer) { super(asv); this.symbolizer = symbolizer; initialize(); }
PolygonSymbolEditGUI extends AbstractStyleEditGUI { public PolygonSymbolEditGUI(final AtlasStylerVector asv, final org.geotools.styling.PolygonSymbolizer symbolizer) { super(asv); this.symbolizer = symbolizer; initialize(); } }
PolygonSymbolEditGUI extends AbstractStyleEditGUI { public PolygonSymbolEditGUI(final AtlasStylerVector asv, final org.geotools.styling.PolygonSymbolizer symbolizer) { super(asv); this.symbolizer = symbolizer; initialize(); } PolygonSymbolEditGUI(final AtlasStylerVector asv, final org.geotools.styling.PolygonSymbol...
PolygonSymbolEditGUI extends AbstractStyleEditGUI { public PolygonSymbolEditGUI(final AtlasStylerVector asv, final org.geotools.styling.PolygonSymbolizer symbolizer) { super(asv); this.symbolizer = symbolizer; initialize(); } PolygonSymbolEditGUI(final AtlasStylerVector asv, final org.geotools.styling.PolygonSymbol...
PolygonSymbolEditGUI extends AbstractStyleEditGUI { public PolygonSymbolEditGUI(final AtlasStylerVector asv, final org.geotools.styling.PolygonSymbolizer symbolizer) { super(asv); this.symbolizer = symbolizer; initialize(); } PolygonSymbolEditGUI(final AtlasStylerVector asv, final org.geotools.styling.PolygonSymbol...
@Test public void testAtlasStylerPane() throws Throwable { if (!TestingUtil.hasGui()) return; StylerDialog asd = new StylerDialog(null, atlasStylerPolygon, null); TestingUtil.testGui(asd); }
public AtlasStylerPane(StylerDialog stylerDialog) { this.asd = stylerDialog; this.atlasStyler = stylerDialog.getAtlasStyler(); initialize(); atlasStyler.setQuite(true); { for (AbstractRulesList ruleList : atlasStyler.getRuleLists()) { createEditorComponent(ruleList); } } getRulesListsListTablePanel().getRulesListTable(...
AtlasStylerPane extends JSplitPane implements ClosableSubwindows { public AtlasStylerPane(StylerDialog stylerDialog) { this.asd = stylerDialog; this.atlasStyler = stylerDialog.getAtlasStyler(); initialize(); atlasStyler.setQuite(true); { for (AbstractRulesList ruleList : atlasStyler.getRuleLists()) { createEditorCompon...
AtlasStylerPane extends JSplitPane implements ClosableSubwindows { public AtlasStylerPane(StylerDialog stylerDialog) { this.asd = stylerDialog; this.atlasStyler = stylerDialog.getAtlasStyler(); initialize(); atlasStyler.setQuite(true); { for (AbstractRulesList ruleList : atlasStyler.getRuleLists()) { createEditorCompon...
AtlasStylerPane extends JSplitPane implements ClosableSubwindows { public AtlasStylerPane(StylerDialog stylerDialog) { this.asd = stylerDialog; this.atlasStyler = stylerDialog.getAtlasStyler(); initialize(); atlasStyler.setQuite(true); { for (AbstractRulesList ruleList : atlasStyler.getRuleLists()) { createEditorCompon...
AtlasStylerPane extends JSplitPane implements ClosableSubwindows { public AtlasStylerPane(StylerDialog stylerDialog) { this.asd = stylerDialog; this.atlasStyler = stylerDialog.getAtlasStyler(); initialize(); atlasStyler.setQuite(true); { for (AbstractRulesList ruleList : atlasStyler.getRuleLists()) { createEditorCompon...
@Test public void testAddRulesListDialog() throws Throwable { if (!TestingUtil.isInteractive()) return; AtlasStylerVector as = AsTestingUtil .getAtlasStyler(TestDatasetsVector.countryShp); AddRulesListDialog addRulesListDialog = new AddRulesListDialog(null, as); TestingUtil.testGui(addRulesListDialog); }
public AddRulesListDialog(Component owner, AtlasStyler atlasStyler) { super(owner, ASUtil.R("AddRulesListDialog.title", atlasStyler.getTitle())); this.owner = owner; this.atlasStyler = atlasStyler; jComboBoxRuleListType = new RulesListJComboBox(atlasStyler); jComboBoxRuleListType.addActionListener(new ActionListener() ...
AddRulesListDialog extends AtlasDialog implements Cancellable { public AddRulesListDialog(Component owner, AtlasStyler atlasStyler) { super(owner, ASUtil.R("AddRulesListDialog.title", atlasStyler.getTitle())); this.owner = owner; this.atlasStyler = atlasStyler; jComboBoxRuleListType = new RulesListJComboBox(atlasStyler...
AddRulesListDialog extends AtlasDialog implements Cancellable { public AddRulesListDialog(Component owner, AtlasStyler atlasStyler) { super(owner, ASUtil.R("AddRulesListDialog.title", atlasStyler.getTitle())); this.owner = owner; this.atlasStyler = atlasStyler; jComboBoxRuleListType = new RulesListJComboBox(atlasStyler...
AddRulesListDialog extends AtlasDialog implements Cancellable { public AddRulesListDialog(Component owner, AtlasStyler atlasStyler) { super(owner, ASUtil.R("AddRulesListDialog.title", atlasStyler.getTitle())); this.owner = owner; this.atlasStyler = atlasStyler; jComboBoxRuleListType = new RulesListJComboBox(atlasStyler...
AddRulesListDialog extends AtlasDialog implements Cancellable { public AddRulesListDialog(Component owner, AtlasStyler atlasStyler) { super(owner, ASUtil.R("AddRulesListDialog.title", atlasStyler.getTitle())); this.owner = owner; this.atlasStyler = atlasStyler; jComboBoxRuleListType = new RulesListJComboBox(atlasStyler...
@Test public void testCreate() throws IOException, URISyntaxException { }
public static DpEntry create(AtlasConfigEditable ace, File file, Component owner) throws AtlasImportException { for (DpEntryTesterInterface test : testers) { if (test.test(owner, file)) return test.create(ace, file, owner); } return null; }
DpEntryFactory { public static DpEntry create(AtlasConfigEditable ace, File file, Component owner) throws AtlasImportException { for (DpEntryTesterInterface test : testers) { if (test.test(owner, file)) return test.create(ace, file, owner); } return null; } }
DpEntryFactory { public static DpEntry create(AtlasConfigEditable ace, File file, Component owner) throws AtlasImportException { for (DpEntryTesterInterface test : testers) { if (test.test(owner, file)) return test.create(ace, file, owner); } return null; } private DpEntryFactory(); }
DpEntryFactory { public static DpEntry create(AtlasConfigEditable ace, File file, Component owner) throws AtlasImportException { for (DpEntryTesterInterface test : testers) { if (test.test(owner, file)) return test.create(ace, file, owner); } return null; } private DpEntryFactory(); static DpEntry create(AtlasConfigEd...
DpEntryFactory { public static DpEntry create(AtlasConfigEditable ace, File file, Component owner) throws AtlasImportException { for (DpEntryTesterInterface test : testers) { if (test.test(owner, file)) return test.create(ace, file, owner); } return null; } private DpEntryFactory(); static DpEntry create(AtlasConfigEd...
@Test public void testGetFontComboBox() throws IOException { TextSymbolizerEditGUI textSymbolizerEditGUI = new TextSymbolizerEditGUI( tr, atlasStyler, STYLED_FS.getFeatureCollection()); JComboBox jComboBoxFont = textSymbolizerEditGUI.getJComboBoxFont(); assertEquals("default number of fonts is 5", 5, jComboBoxFont.getI...
public JComboBox getJComboBoxFont() { if (jComboBoxFont == null) { jComboBoxFont = new JComboBox(); List<Literal>[] fontFamilies = asv.getAvailableFonts(); jComboBoxFont.setRenderer(new DefaultListCellRenderer() { @Override public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSel...
TextSymbolizerEditGUI extends AbstractStyleEditGUI { public JComboBox getJComboBoxFont() { if (jComboBoxFont == null) { jComboBoxFont = new JComboBox(); List<Literal>[] fontFamilies = asv.getAvailableFonts(); jComboBoxFont.setRenderer(new DefaultListCellRenderer() { @Override public Component getListCellRendererCompone...
TextSymbolizerEditGUI extends AbstractStyleEditGUI { public JComboBox getJComboBoxFont() { if (jComboBoxFont == null) { jComboBoxFont = new JComboBox(); List<Literal>[] fontFamilies = asv.getAvailableFonts(); jComboBoxFont.setRenderer(new DefaultListCellRenderer() { @Override public Component getListCellRendererCompone...
TextSymbolizerEditGUI extends AbstractStyleEditGUI { public JComboBox getJComboBoxFont() { if (jComboBoxFont == null) { jComboBoxFont = new JComboBox(); List<Literal>[] fontFamilies = asv.getAvailableFonts(); jComboBoxFont.setRenderer(new DefaultListCellRenderer() { @Override public Component getListCellRendererCompone...
TextSymbolizerEditGUI extends AbstractStyleEditGUI { public JComboBox getJComboBoxFont() { if (jComboBoxFont == null) { jComboBoxFont = new JComboBox(); List<Literal>[] fontFamilies = asv.getAvailableFonts(); jComboBoxFont.setRenderer(new DefaultListCellRenderer() { @Override public Component getListCellRendererCompone...
@Test public void testGetFontComboBox2() throws IOException { List<Font> fonts = new ArrayList<Font>(); atlasStyler.setFonts(fonts); TextSymbolizerEditGUI textSymbolizerEditGUI = new TextSymbolizerEditGUI( tr, atlasStyler, TestDatasetsVector.countryShp.getFeatureCollection()); JComboBox jComboBoxFont = textSymbolizerEd...
public JComboBox getJComboBoxFont() { if (jComboBoxFont == null) { jComboBoxFont = new JComboBox(); List<Literal>[] fontFamilies = asv.getAvailableFonts(); jComboBoxFont.setRenderer(new DefaultListCellRenderer() { @Override public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSel...
TextSymbolizerEditGUI extends AbstractStyleEditGUI { public JComboBox getJComboBoxFont() { if (jComboBoxFont == null) { jComboBoxFont = new JComboBox(); List<Literal>[] fontFamilies = asv.getAvailableFonts(); jComboBoxFont.setRenderer(new DefaultListCellRenderer() { @Override public Component getListCellRendererCompone...
TextSymbolizerEditGUI extends AbstractStyleEditGUI { public JComboBox getJComboBoxFont() { if (jComboBoxFont == null) { jComboBoxFont = new JComboBox(); List<Literal>[] fontFamilies = asv.getAvailableFonts(); jComboBoxFont.setRenderer(new DefaultListCellRenderer() { @Override public Component getListCellRendererCompone...
TextSymbolizerEditGUI extends AbstractStyleEditGUI { public JComboBox getJComboBoxFont() { if (jComboBoxFont == null) { jComboBoxFont = new JComboBox(); List<Literal>[] fontFamilies = asv.getAvailableFonts(); jComboBoxFont.setRenderer(new DefaultListCellRenderer() { @Override public Component getListCellRendererCompone...
TextSymbolizerEditGUI extends AbstractStyleEditGUI { public JComboBox getJComboBoxFont() { if (jComboBoxFont == null) { jComboBoxFont = new JComboBox(); List<Literal>[] fontFamilies = asv.getAvailableFonts(); jComboBoxFont.setRenderer(new DefaultListCellRenderer() { @Override public Component getListCellRendererCompone...
@Test public void testGraphicEditGUI() throws Throwable { if (!TestingUtil.isInteractive()) return; Graphic g = StylingUtil.STYLE_BUILDER.createGraphic(); GraphicEditGUI graphicEditGUI = new GraphicEditGUI( AsTestingUtil.getAtlasStyler(TestDatasetsVector.countryShp), g, GeometryForm.POINT); TestingUtil.testGui(graphicE...
public GraphicEditGUI(final AtlasStylerVector asv, final Graphic graphic_, GeometryForm geomForm) { super(asv); this.geometryForm = geomForm; if (graphic_ != null) { this.graphic = graphic_; } else { this.graphic = StylingUtil.STYLE_BUILDER.createGraphic(); firePropertyChange(PROPERTY_UPDATED, null, null); } final int ...
GraphicEditGUI extends AbstractStyleEditGUI { public GraphicEditGUI(final AtlasStylerVector asv, final Graphic graphic_, GeometryForm geomForm) { super(asv); this.geometryForm = geomForm; if (graphic_ != null) { this.graphic = graphic_; } else { this.graphic = StylingUtil.STYLE_BUILDER.createGraphic(); firePropertyChan...
GraphicEditGUI extends AbstractStyleEditGUI { public GraphicEditGUI(final AtlasStylerVector asv, final Graphic graphic_, GeometryForm geomForm) { super(asv); this.geometryForm = geomForm; if (graphic_ != null) { this.graphic = graphic_; } else { this.graphic = StylingUtil.STYLE_BUILDER.createGraphic(); firePropertyChan...
GraphicEditGUI extends AbstractStyleEditGUI { public GraphicEditGUI(final AtlasStylerVector asv, final Graphic graphic_, GeometryForm geomForm) { super(asv); this.geometryForm = geomForm; if (graphic_ != null) { this.graphic = graphic_; } else { this.graphic = StylingUtil.STYLE_BUILDER.createGraphic(); firePropertyChan...
GraphicEditGUI extends AbstractStyleEditGUI { public GraphicEditGUI(final AtlasStylerVector asv, final Graphic graphic_, GeometryForm geomForm) { super(asv); this.geometryForm = geomForm; if (graphic_ != null) { this.graphic = graphic_; } else { this.graphic = StylingUtil.STYLE_BUILDER.createGraphic(); firePropertyChan...
@Test public void testSvgSelectorGui() throws Throwable { if (!TestingUtil.hasGui()) return; SVGSelector svgSelector = new SVGSelector(null, GeometryForm.POLYGON, null); svgSelector.changeURL(new URL(FreeMapSymbols.SVG_URL + "/" + "osm")); TestingUtil.testGui(svgSelector,600); }
public void changeURL(URL newUrl) { url = newUrl; LOGGER.debug("Changing " + this.getClass().getSimpleName() + " URL to " + url.getFile()); jList = null; rescan(false); jScrollPane1.setViewportView(getJList()); jTextFieldURL.setText(url.getFile()); jButtonUp.setEnabled(!url.toString().equals( FreeMapSymbols.SVG_URL + "...
SVGSelector extends CancellableDialogAdapter { public void changeURL(URL newUrl) { url = newUrl; LOGGER.debug("Changing " + this.getClass().getSimpleName() + " URL to " + url.getFile()); jList = null; rescan(false); jScrollPane1.setViewportView(getJList()); jTextFieldURL.setText(url.getFile()); jButtonUp.setEnabled(!ur...
SVGSelector extends CancellableDialogAdapter { public void changeURL(URL newUrl) { url = newUrl; LOGGER.debug("Changing " + this.getClass().getSimpleName() + " URL to " + url.getFile()); jList = null; rescan(false); jScrollPane1.setViewportView(getJList()); jTextFieldURL.setText(url.getFile()); jButtonUp.setEnabled(!ur...
SVGSelector extends CancellableDialogAdapter { public void changeURL(URL newUrl) { url = newUrl; LOGGER.debug("Changing " + this.getClass().getSimpleName() + " URL to " + url.getFile()); jList = null; rescan(false); jScrollPane1.setViewportView(getJList()); jTextFieldURL.setText(url.getFile()); jButtonUp.setEnabled(!ur...
SVGSelector extends CancellableDialogAdapter { public void changeURL(URL newUrl) { url = newUrl; LOGGER.debug("Changing " + this.getClass().getSimpleName() + " URL to " + url.getFile()); jList = null; rescan(false); jScrollPane1.setViewportView(getJList()); jTextFieldURL.setText(url.getFile()); jButtonUp.setEnabled(!ur...
@Test public void testInit() { GPProps.init(GPProps.PROPERTIES_FILENAME, GPProps.PROPERTIES_FOLDER); }
protected static void init(final String propertiesFilename, final String appDirname) { GpUtil.initGpLogging(); GPProps.propertiesFilename = propertiesFilename; GPProps.appDirname = appDirname; try { final FileInputStream inStream = new FileInputStream( getPropertiesFile()); try { properties.load(inStream); } finally { ...
GPProps { protected static void init(final String propertiesFilename, final String appDirname) { GpUtil.initGpLogging(); GPProps.propertiesFilename = propertiesFilename; GPProps.appDirname = appDirname; try { final FileInputStream inStream = new FileInputStream( getPropertiesFile()); try { properties.load(inStream); } ...
GPProps { protected static void init(final String propertiesFilename, final String appDirname) { GpUtil.initGpLogging(); GPProps.propertiesFilename = propertiesFilename; GPProps.appDirname = appDirname; try { final FileInputStream inStream = new FileInputStream( getPropertiesFile()); try { properties.load(inStream); } ...
GPProps { protected static void init(final String propertiesFilename, final String appDirname) { GpUtil.initGpLogging(); GPProps.propertiesFilename = propertiesFilename; GPProps.appDirname = appDirname; try { final FileInputStream inStream = new FileInputStream( getPropertiesFile()); try { properties.load(inStream); } ...
GPProps { protected static void init(final String propertiesFilename, final String appDirname) { GpUtil.initGpLogging(); GPProps.propertiesFilename = propertiesFilename; GPProps.appDirname = appDirname; try { final FileInputStream inStream = new FileInputStream( getPropertiesFile()); try { properties.load(inStream); } ...
@Test public void testSendGPBugReport_WithAddInfos() { GpUtil.initBugReporting(); assertEquals(3, ExceptionDialog.getAdditionalAppInfo().size()); for (Object o : ExceptionDialog.getAdditionalAppInfo()) { System.out.println(o.toString()); } }
public static void initBugReporting() { ExceptionDialog.setMailDestinationAddress("tzeggai@wikisquare.de"); ExceptionDialog.setSmtpMailer(bugReportMailer); ExceptionDialog.addAdditionalAppInfo(ReleaseUtil .getVersionInfo(GpUtil.class)); }
GpUtil { public static void initBugReporting() { ExceptionDialog.setMailDestinationAddress("tzeggai@wikisquare.de"); ExceptionDialog.setSmtpMailer(bugReportMailer); ExceptionDialog.addAdditionalAppInfo(ReleaseUtil .getVersionInfo(GpUtil.class)); } }
GpUtil { public static void initBugReporting() { ExceptionDialog.setMailDestinationAddress("tzeggai@wikisquare.de"); ExceptionDialog.setSmtpMailer(bugReportMailer); ExceptionDialog.addAdditionalAppInfo(ReleaseUtil .getVersionInfo(GpUtil.class)); } }
GpUtil { public static void initBugReporting() { ExceptionDialog.setMailDestinationAddress("tzeggai@wikisquare.de"); ExceptionDialog.setSmtpMailer(bugReportMailer); ExceptionDialog.addAdditionalAppInfo(ReleaseUtil .getVersionInfo(GpUtil.class)); } static void initGpLogging(); static void initBugReporting(); static Set...
GpUtil { public static void initBugReporting() { ExceptionDialog.setMailDestinationAddress("tzeggai@wikisquare.de"); ExceptionDialog.setSmtpMailer(bugReportMailer); ExceptionDialog.addAdditionalAppInfo(ReleaseUtil .getVersionInfo(GpUtil.class)); } static void initGpLogging(); static void initBugReporting(); static Set...
@Test @Ignore public void testInitGpLogging() { GpUtil.initGpLogging(); assertEquals(2, countRootLoggers()); GpUtil.initGpLogging(); assertEquals(2, countRootLoggers()); }
public static void initGpLogging() throws FactoryConfigurationError { if (Logger.getRootLogger().getAllAppenders().hasMoreElements()) return; DOMConfigurator.configure(GPProps.class .getResource("/geopublishing_log4j.xml")); Logger.getRootLogger().addAppender( Logger.getLogger("dummy").getAppender("gpFileLogger")); Str...
GpUtil { public static void initGpLogging() throws FactoryConfigurationError { if (Logger.getRootLogger().getAllAppenders().hasMoreElements()) return; DOMConfigurator.configure(GPProps.class .getResource("/geopublishing_log4j.xml")); Logger.getRootLogger().addAppender( Logger.getLogger("dummy").getAppender("gpFileLogge...
GpUtil { public static void initGpLogging() throws FactoryConfigurationError { if (Logger.getRootLogger().getAllAppenders().hasMoreElements()) return; DOMConfigurator.configure(GPProps.class .getResource("/geopublishing_log4j.xml")); Logger.getRootLogger().addAppender( Logger.getLogger("dummy").getAppender("gpFileLogge...
GpUtil { public static void initGpLogging() throws FactoryConfigurationError { if (Logger.getRootLogger().getAllAppenders().hasMoreElements()) return; DOMConfigurator.configure(GPProps.class .getResource("/geopublishing_log4j.xml")); Logger.getRootLogger().addAppender( Logger.getLogger("dummy").getAppender("gpFileLogge...
GpUtil { public static void initGpLogging() throws FactoryConfigurationError { if (Logger.getRootLogger().getAllAppenders().hasMoreElements()) return; DOMConfigurator.configure(GPProps.class .getResource("/geopublishing_log4j.xml")); Logger.getRootLogger().addAppender( Logger.getLogger("dummy").getAppender("gpFileLogge...
@Test public void testFonts() throws AtlasException, FactoryException, TransformException, SAXException, IOException, ParserConfigurationException, TransformerException { final DocumentBuilderFactory factory = DocumentBuilderFactory .newInstance(); Document document = null; document = factory.newDocumentBuilder().newDo...
protected Node exportFonts(Document document) { final Element fontsElement = document.createElementNS(AMLUtil.AMLURI, AMLUtil.TAG_FONTS); File fontsDir = getAce().getFontsDir(); Collection<File> listFiles = FileUtils.listFiles(fontsDir, GpUtil.FontsFilesFilter, FilterUtil.BlacklistedFoldersFilter); for (File f : listFi...
AMLExporter { protected Node exportFonts(Document document) { final Element fontsElement = document.createElementNS(AMLUtil.AMLURI, AMLUtil.TAG_FONTS); File fontsDir = getAce().getFontsDir(); Collection<File> listFiles = FileUtils.listFiles(fontsDir, GpUtil.FontsFilesFilter, FilterUtil.BlacklistedFoldersFilter); for (F...
AMLExporter { protected Node exportFonts(Document document) { final Element fontsElement = document.createElementNS(AMLUtil.AMLURI, AMLUtil.TAG_FONTS); File fontsDir = getAce().getFontsDir(); Collection<File> listFiles = FileUtils.listFiles(fontsDir, GpUtil.FontsFilesFilter, FilterUtil.BlacklistedFoldersFilter); for (F...
AMLExporter { protected Node exportFonts(Document document) { final Element fontsElement = document.createElementNS(AMLUtil.AMLURI, AMLUtil.TAG_FONTS); File fontsDir = getAce().getFontsDir(); Collection<File> listFiles = FileUtils.listFiles(fontsDir, GpUtil.FontsFilesFilter, FilterUtil.BlacklistedFoldersFilter); for (F...
AMLExporter { protected Node exportFonts(Document document) { final Element fontsElement = document.createElementNS(AMLUtil.AMLURI, AMLUtil.TAG_FONTS); File fontsDir = getAce().getFontsDir(); Collection<File> listFiles = FileUtils.listFiles(fontsDir, GpUtil.FontsFilesFilter, FilterUtil.BlacklistedFoldersFilter); for (F...
@Test public void testWriteBuildxml() throws AtlasException, FactoryException, TransformException, SAXException, IOException, ParserConfigurationException, TransformerException { File newTempDir = TestingUtil.getNewTempDir(); getAce().setBaseName(AtlasConfig.DEFAULTBASENAME); File created = writeBuildxml(newTempDir, ge...
public File writeBuildxml(File targetDir, String atlasBaseName) { if (atlasBaseName == null || atlasBaseName.equals(AtlasConfig.DEFAULTBASENAME) || atlasBaseName.equals("null")) { LOGGER.info("Not writing a build.xml for automatic publishing, because the basename is " + atlasBaseName + ". Please change it."); return nu...
AMLExporter { public File writeBuildxml(File targetDir, String atlasBaseName) { if (atlasBaseName == null || atlasBaseName.equals(AtlasConfig.DEFAULTBASENAME) || atlasBaseName.equals("null")) { LOGGER.info("Not writing a build.xml for automatic publishing, because the basename is " + atlasBaseName + ". Please change it...
AMLExporter { public File writeBuildxml(File targetDir, String atlasBaseName) { if (atlasBaseName == null || atlasBaseName.equals(AtlasConfig.DEFAULTBASENAME) || atlasBaseName.equals("null")) { LOGGER.info("Not writing a build.xml for automatic publishing, because the basename is " + atlasBaseName + ". Please change it...
AMLExporter { public File writeBuildxml(File targetDir, String atlasBaseName) { if (atlasBaseName == null || atlasBaseName.equals(AtlasConfig.DEFAULTBASENAME) || atlasBaseName.equals("null")) { LOGGER.info("Not writing a build.xml for automatic publishing, because the basename is " + atlasBaseName + ". Please change it...
AMLExporter { public File writeBuildxml(File targetDir, String atlasBaseName) { if (atlasBaseName == null || atlasBaseName.equals(AtlasConfig.DEFAULTBASENAME) || atlasBaseName.equals("null")) { LOGGER.info("Not writing a build.xml for automatic publishing, because the basename is " + atlasBaseName + ". Please change it...
@Test public void testInit() { ASProps.init(ASProps.PROPERTIES_FILENAME, ASProps.PROPERTIES_FOLDER); }
protected static void init(String propertiesFilename, String appDirname) { ASProps.propertiesFilename = propertiesFilename; ASProps.appDirname = appDirname; try { properties.load(new FileInputStream(getPropertiesFile())); } catch (FileNotFoundException e) { } catch (IOException e) { LOGGER.error(e); } }
ASProps { protected static void init(String propertiesFilename, String appDirname) { ASProps.propertiesFilename = propertiesFilename; ASProps.appDirname = appDirname; try { properties.load(new FileInputStream(getPropertiesFile())); } catch (FileNotFoundException e) { } catch (IOException e) { LOGGER.error(e); } } }
ASProps { protected static void init(String propertiesFilename, String appDirname) { ASProps.propertiesFilename = propertiesFilename; ASProps.appDirname = appDirname; try { properties.load(new FileInputStream(getPropertiesFile())); } catch (FileNotFoundException e) { } catch (IOException e) { LOGGER.error(e); } } }
ASProps { protected static void init(String propertiesFilename, String appDirname) { ASProps.propertiesFilename = propertiesFilename; ASProps.appDirname = appDirname; try { properties.load(new FileInputStream(getPropertiesFile())); } catch (FileNotFoundException e) { } catch (IOException e) { LOGGER.error(e); } } stat...
ASProps { protected static void init(String propertiesFilename, String appDirname) { ASProps.propertiesFilename = propertiesFilename; ASProps.appDirname = appDirname; try { properties.load(new FileInputStream(getPropertiesFile())); } catch (FileNotFoundException e) { } catch (IOException e) { LOGGER.error(e); } } stat...
@Test public void testsLoadWithGUIandSaveAndExit() throws Throwable { Webserver webserver = new Webserver(); if (TestingUtil.HASGUI) { int performArgs = CliOptions.performArgs(new String[] { "-a", testAtlas.toString(), "-s" }); assertEquals(0, performArgs); assertTrue(!GeopublisherGUI.isInstanciated()); } }
public static int performArgs(final String[] args) { boolean exitAfterInterpret = false; CliOptions.Errors errorDuringInterpret = null; boolean startGui = false; File awcFile = null; File exportFile = null; CliOptions cliOptions = new CliOptions(); try { final CommandLine commandLine = cliOptions.parse(args); if (comma...
CliOptions extends Options { public static int performArgs(final String[] args) { boolean exitAfterInterpret = false; CliOptions.Errors errorDuringInterpret = null; boolean startGui = false; File awcFile = null; File exportFile = null; CliOptions cliOptions = new CliOptions(); try { final CommandLine commandLine = cliO...
CliOptions extends Options { public static int performArgs(final String[] args) { boolean exitAfterInterpret = false; CliOptions.Errors errorDuringInterpret = null; boolean startGui = false; File awcFile = null; File exportFile = null; CliOptions cliOptions = new CliOptions(); try { final CommandLine commandLine = cliO...
CliOptions extends Options { public static int performArgs(final String[] args) { boolean exitAfterInterpret = false; CliOptions.Errors errorDuringInterpret = null; boolean startGui = false; File awcFile = null; File exportFile = null; CliOptions cliOptions = new CliOptions(); try { final CommandLine commandLine = cliO...
CliOptions extends Options { public static int performArgs(final String[] args) { boolean exitAfterInterpret = false; CliOptions.Errors errorDuringInterpret = null; boolean startGui = false; File awcFile = null; File exportFile = null; CliOptions cliOptions = new CliOptions(); try { final CommandLine commandLine = cliO...
@Test public void testNoDataValueviaAMD() throws IOException, InterruptedException { FeatureClassification clfcn = new FeatureClassification(new StyledFS( featureSource_polygon), "SQKM_CNTRY"); clfcn.getStyledFeatures().getAttributeMetaDataMap().get("SQKM_CNTRY") .addNodataValue(0.0); clfcn.setRecalcAutomatically(false...
public StyledFeaturesInterface<?> getStyledFeatures() { return styledFeatures; }
FeatureClassification extends Classification { public StyledFeaturesInterface<?> getStyledFeatures() { return styledFeatures; } }
FeatureClassification extends Classification { public StyledFeaturesInterface<?> getStyledFeatures() { return styledFeatures; } FeatureClassification(final StyledFeaturesInterface<?> styledFeatures); FeatureClassification( final StyledFeaturesInterface<?> styledFeatures, final String value_field_name); FeatureC...
FeatureClassification extends Classification { public StyledFeaturesInterface<?> getStyledFeatures() { return styledFeatures; } FeatureClassification(final StyledFeaturesInterface<?> styledFeatures); FeatureClassification( final StyledFeaturesInterface<?> styledFeatures, final String value_field_name); FeatureC...
FeatureClassification extends Classification { public StyledFeaturesInterface<?> getStyledFeatures() { return styledFeatures; } FeatureClassification(final StyledFeaturesInterface<?> styledFeatures); FeatureClassification( final StyledFeaturesInterface<?> styledFeatures, final String value_field_name); FeatureC...
@Test public void testParseAndRemoveEnabledDisabledFilters() throws IOException, CQLException { TextRuleList trl = new TextRuleList( TestDatasetsVector.arabicInHeader.getStyledFS(), false); System.out.println("\n now testing with only the default filter"); trl.addDefaultClass(); for (boolean allEnable : new boolean[] {...
protected Filter parseAndRemoveEnabledDisabledFilters(Filter filter, int idx) { final Filter fullFilter = filter; filter = parseAbstractRlSettings(filter); try { if (filter.equals(Filter.EXCLUDE)) { setClassEnabled(idx, false); } else if (filter.equals(Filter.INCLUDE)) { setClassEnabled(idx, true); } else if (filter.eq...
TextRuleList extends AbstractRulesList { protected Filter parseAndRemoveEnabledDisabledFilters(Filter filter, int idx) { final Filter fullFilter = filter; filter = parseAbstractRlSettings(filter); try { if (filter.equals(Filter.EXCLUDE)) { setClassEnabled(idx, false); } else if (filter.equals(Filter.INCLUDE)) { setClas...
TextRuleList extends AbstractRulesList { protected Filter parseAndRemoveEnabledDisabledFilters(Filter filter, int idx) { final Filter fullFilter = filter; filter = parseAbstractRlSettings(filter); try { if (filter.equals(Filter.EXCLUDE)) { setClassEnabled(idx, false); } else if (filter.equals(Filter.INCLUDE)) { setClas...
TextRuleList extends AbstractRulesList { protected Filter parseAndRemoveEnabledDisabledFilters(Filter filter, int idx) { final Filter fullFilter = filter; filter = parseAbstractRlSettings(filter); try { if (filter.equals(Filter.EXCLUDE)) { setClassEnabled(idx, false); } else if (filter.equals(Filter.INCLUDE)) { setClas...
TextRuleList extends AbstractRulesList { protected Filter parseAndRemoveEnabledDisabledFilters(Filter filter, int idx) { final Filter fullFilter = filter; filter = parseAbstractRlSettings(filter); try { if (filter.equals(Filter.EXCLUDE)) { setClassEnabled(idx, false); } else if (filter.equals(Filter.INCLUDE)) { setClas...
@Test public void testLanguageFilterEnvFunction() throws IOException { Filter filter = TextRuleList.classLanguageFilter("de"); System.out.println(filter); assertEquals("[ de = env([LANG], [XX]) ]", filter.toString()); FeatureCollection<SimpleFeatureType, SimpleFeature> testFeatures = TestDatasetsVector.arabicInHeader ....
public static Filter classLanguageFilter(String lang) { if (lang == null) lang = XMapPane.ENV_LANG_DEFAULT; Expression exEnv = ff.function("env", ff.literal(XMapPane.ENV_LANG), ff.literal(XMapPane.ENV_LANG_DEFAULT)); Filter filter = ff.equals(ff.literal(lang), exEnv); return filter; }
TextRuleList extends AbstractRulesList { public static Filter classLanguageFilter(String lang) { if (lang == null) lang = XMapPane.ENV_LANG_DEFAULT; Expression exEnv = ff.function("env", ff.literal(XMapPane.ENV_LANG), ff.literal(XMapPane.ENV_LANG_DEFAULT)); Filter filter = ff.equals(ff.literal(lang), exEnv); return fil...
TextRuleList extends AbstractRulesList { public static Filter classLanguageFilter(String lang) { if (lang == null) lang = XMapPane.ENV_LANG_DEFAULT; Expression exEnv = ff.function("env", ff.literal(XMapPane.ENV_LANG), ff.literal(XMapPane.ENV_LANG_DEFAULT)); Filter filter = ff.equals(ff.literal(lang), exEnv); return fil...
TextRuleList extends AbstractRulesList { public static Filter classLanguageFilter(String lang) { if (lang == null) lang = XMapPane.ENV_LANG_DEFAULT; Expression exEnv = ff.function("env", ff.literal(XMapPane.ENV_LANG), ff.literal(XMapPane.ENV_LANG_DEFAULT)); Filter filter = ff.equals(ff.literal(lang), exEnv); return fil...
TextRuleList extends AbstractRulesList { public static Filter classLanguageFilter(String lang) { if (lang == null) lang = XMapPane.ENV_LANG_DEFAULT; Expression exEnv = ff.function("env", ff.literal(XMapPane.ENV_LANG), ff.literal(XMapPane.ENV_LANG_DEFAULT)); Filter filter = ff.equals(ff.literal(lang), exEnv); return fil...