├── .gitignore ├── 3rdparty ├── org-netbeans-api-visual │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── Dummy.java ├── org-netbeans-swing-outline │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── Dummy.java ├── org-openide-util │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── Dummy.java └── pom.xml ├── LICENSE.txt ├── README.md ├── apt ├── pom.xml └── src │ └── main │ └── java │ └── jlibs │ └── core │ ├── annotation │ └── processing │ │ ├── AnnotationError.java │ │ ├── AnnotationProcessor.java │ │ ├── Environment.java │ │ └── Printer.java │ └── lang │ └── model │ └── ModelUtil.java ├── core ├── bin │ └── launcher │ │ ├── jlaunch.bat │ │ └── jlaunch.sh ├── pom.xml └── src │ ├── main │ ├── java │ │ └── jlibs │ │ │ └── core │ │ │ ├── graph │ │ │ ├── Convertor.java │ │ │ ├── Filter.java │ │ │ ├── Ladder.java │ │ │ ├── Navigator.java │ │ │ ├── Navigator2.java │ │ │ ├── Path.java │ │ │ ├── PredicateConvertor.java │ │ │ ├── Processor.java │ │ │ ├── Sequence.java │ │ │ ├── SequenceUtil.java │ │ │ ├── Walker.java │ │ │ ├── WalkerUtil.java │ │ │ ├── filters │ │ │ │ ├── AndFilter.java │ │ │ │ ├── InstanceFilter.java │ │ │ │ ├── NotFilter.java │ │ │ │ ├── OrFilter.java │ │ │ │ ├── PathFilter.java │ │ │ │ └── TrueFilter.java │ │ │ ├── navigators │ │ │ │ ├── FilteredNavigator.java │ │ │ │ ├── FilteredTreeNavigator.java │ │ │ │ └── PathNavigator.java │ │ │ ├── sequences │ │ │ │ ├── AbstractSequence.java │ │ │ │ ├── ArraySequence.java │ │ │ │ ├── ConcatSequence.java │ │ │ │ ├── DuplicateSequence.java │ │ │ │ ├── Element.java │ │ │ │ ├── EmptySequence.java │ │ │ │ ├── EnumeratedSequence.java │ │ │ │ ├── FilteredSequence.java │ │ │ │ ├── FilteredTreeSequence.java │ │ │ │ ├── IterableSequence.java │ │ │ │ ├── PathSequence.java │ │ │ │ └── RepeatSequence.java │ │ │ ├── visitors │ │ │ │ ├── ClassSorter.java │ │ │ │ ├── ClassVisitor.java │ │ │ │ ├── ObjectVisitor.java │ │ │ │ ├── PathReflectionVisitor.java │ │ │ │ ├── ReflectionVisitor.java │ │ │ │ └── StaticVisitor.java │ │ │ └── walkers │ │ │ │ └── PreorderWalker.java │ │ │ ├── io │ │ │ ├── BOM.java │ │ │ ├── ByteArrayOutputStream2.java │ │ │ ├── CharArrayWriter2.java │ │ │ ├── EncodingDetector.java │ │ │ ├── FileNameComparator.java │ │ │ ├── FileNavigator.java │ │ │ ├── FileTypeComparator.java │ │ │ ├── FileUtil.java │ │ │ ├── IOPump.java │ │ │ ├── IOUtil.java │ │ │ ├── NullOutputStream.java │ │ │ ├── PathPattern.java │ │ │ ├── PumpedInputStream.java │ │ │ ├── PumpedReader.java │ │ │ ├── TeeInputStream.java │ │ │ └── UnicodeInputStream.java │ │ │ ├── lang │ │ │ ├── Ansi.java │ │ │ ├── ArrayUtil.java │ │ │ ├── BeanUtil.java │ │ │ ├── ByteSequence.java │ │ │ ├── CharArray.java │ │ │ ├── ClassUtil.java │ │ │ ├── Count.java │ │ │ ├── DurationUnit.java │ │ │ ├── Flag.java │ │ │ ├── ImpossibleException.java │ │ │ ├── JavaProcessBuilder.java │ │ │ ├── JavaUtil.java │ │ │ ├── NotImplementedException.java │ │ │ ├── Noun.java │ │ │ ├── OS.java │ │ │ ├── RuntimeUtil.java │ │ │ ├── SizeUnit.java │ │ │ ├── StringUtil.java │ │ │ ├── Task.java │ │ │ ├── ThreadTasker.java │ │ │ ├── ThrowableTask.java │ │ │ ├── Util.java │ │ │ ├── Waiter.java │ │ │ ├── ref │ │ │ │ └── Finalizer.java │ │ │ └── reflect │ │ │ │ └── TeeProxy.java │ │ │ ├── net │ │ │ ├── Protocol.java │ │ │ ├── SSLUtil.java │ │ │ └── URLUtil.java │ │ │ ├── nio │ │ │ └── InputStreamChannel.java │ │ │ └── util │ │ │ ├── AbstractIterator.java │ │ │ ├── ChainedComparator.java │ │ │ ├── CollectionUtil.java │ │ │ ├── ContextMap.java │ │ │ ├── DefaultComparator.java │ │ │ ├── EmptyIterator.java │ │ │ ├── Enumerator.java │ │ │ ├── Heap.java │ │ │ ├── LongTreeMap.java │ │ │ ├── NonNullIterator.java │ │ │ ├── RandomUtil.java │ │ │ ├── Range.java │ │ │ ├── ResettableIterator.java │ │ │ ├── ReverseComparator.java │ │ │ ├── StackedIterator.java │ │ │ ├── VisitingComparator.java │ │ │ ├── logging │ │ │ ├── AnsiFormatter.java │ │ │ └── PreciseFormatter.java │ │ │ └── regex │ │ │ ├── RegexUtil.java │ │ │ └── TemplateMatcher.java │ └── resources │ │ └── jlibs │ │ └── core │ │ ├── lang │ │ └── getpids.exe │ │ └── util │ │ └── logging │ │ └── ansiformatter.properties │ └── test │ ├── java │ └── jlibs │ │ └── core │ │ └── graph │ │ └── sequences │ │ ├── SequenceTest.java │ │ ├── SequenceTestFactory.java │ │ └── TOCSequence.java │ └── resources │ └── testng.xml ├── dependencies.xml ├── distribution ├── pom.xml └── src │ └── assembly │ └── default.xml ├── examples ├── bin │ ├── crawl-xml.bat │ ├── crawl-xml.sh │ ├── examples.conf │ ├── wamp-invoke.bat │ ├── wamp-invoke.sh │ ├── wamp-publish.bat │ ├── wamp-publish.sh │ ├── wamp-register.bat │ ├── wamp-register.sh │ ├── wamp-router.bat │ ├── wamp-router.sh │ ├── wamp-subscribe.bat │ ├── wamp-subscribe.sh │ ├── xmldog-conformance.bat │ ├── xmldog-conformance.sh │ ├── xmldog-performance.bat │ ├── xmldog-performance.sh │ ├── xmldog.bat │ ├── xmldog.sh │ ├── xsd-inline.bat │ ├── xsd-inline.sh │ ├── xsd-instance.bat │ ├── xsd-instance.properties │ ├── xsd-instance.sh │ ├── xsd-viewer.bat │ └── xsd-viewer.sh ├── db │ ├── demo.properties │ └── demo.script ├── pom.xml ├── resources │ ├── xmlFiles │ │ ├── axis.xml │ │ ├── bookstore.xml │ │ ├── contents.xml │ │ ├── defaultNamespace.xml │ │ ├── evaluate.xml │ │ ├── fibo.xml │ │ ├── id.xml │ │ ├── jaxen24.xml │ │ ├── jaxen3.xml │ │ ├── lang.xml │ │ ├── library.xml │ │ ├── message.xml │ │ ├── moreover.xml │ │ ├── much_ado.xml │ │ ├── namespaces.xml │ │ ├── nitf.xml │ │ ├── note.xml │ │ ├── numbers.xml │ │ ├── organization.xml │ │ ├── pi.xml │ │ ├── pi2.xml │ │ ├── positions.xml │ │ ├── purchase_order.xml │ │ ├── roof.xml │ │ ├── sample.xml │ │ ├── sample1.xml │ │ ├── sample2.xml │ │ ├── sample3.xml │ │ ├── simple.xml │ │ ├── sum.xml │ │ ├── t.xml │ │ ├── test.xml │ │ ├── testNamespaces.xml │ │ ├── text.xml │ │ ├── underscore.xml │ │ └── web.xml │ ├── xpaths-big.xml │ ├── xpaths-debug.xml │ └── xpaths.xml └── src │ └── main │ └── java │ └── jlibs │ └── examples │ ├── core │ ├── graph │ │ └── navigators │ │ │ ├── NavigatorTest.java │ │ │ └── OutlineNavigatorTest.java │ └── util │ │ └── i18n │ │ ├── DBBundle.java │ │ ├── Test.java │ │ ├── UIBundle.java │ │ └── UncheckedException.java │ ├── jdbc │ ├── DB.java │ ├── Employee.java │ ├── EmployeeDAO.java │ ├── Grade.java │ └── GradeTypeMapper.java │ ├── wamp4j │ ├── Router.java │ ├── SessionAdapter.java │ ├── WAMPInvoke.java │ ├── WAMPPublish.java │ ├── WAMPRegister.java │ └── WAMPSubscribe.java │ └── xml │ ├── sax │ └── dog │ │ ├── InstantXPathResults.java │ │ ├── Profiler.java │ │ ├── TestCase.java │ │ ├── TestFunctionResolver.java │ │ ├── TestSuite.java │ │ ├── XMLDogTest.java │ │ ├── XPathEngine.java │ │ ├── XPathInfo.java │ │ ├── XPathTest.java │ │ ├── engines │ │ ├── JDKEngine.java │ │ ├── JaxenEngine.java │ │ └── SaxonEngine.java │ │ └── tests │ │ ├── XPathConformanceTest.java │ │ └── XPathPerformanceTest.java │ └── xsd │ └── XSDOutlinePanelTest.java ├── greplog ├── pom.xml ├── resources │ └── schemas │ │ ├── filter.xsd │ │ └── header.xsd └── src │ └── main │ └── java │ └── jlibs │ └── util │ └── logging │ ├── AndCondition.java │ ├── Condition.java │ ├── ConditionParser.java │ ├── FieldCondition.java │ ├── FollowingCondition.java │ ├── IndexCondition.java │ ├── LogHandler.java │ ├── LogHeaderDefinition.java │ ├── LogParser.java │ ├── LogPrinter.java │ ├── LogRecord.java │ ├── MessageCondition.java │ ├── NotCondition.java │ ├── OrCondition.java │ └── PrecedingCondition.java ├── i18n-apt ├── pom.xml └── src │ ├── main │ └── java │ │ └── jlibs │ │ └── core │ │ └── util │ │ └── i18n │ │ ├── Bundle.java │ │ ├── BundleAnnotationProcessor.java │ │ ├── Entry.java │ │ ├── Message.java │ │ ├── PropertiesUtil.java │ │ └── ResourceBundle.java │ └── test │ ├── java │ └── jlibs │ │ └── core │ │ └── i18n │ │ ├── Bundle1.java │ │ ├── Bundle2.java │ │ └── ResourceBundleTest.java │ └── resources │ └── i18n │ ├── ArgumentCountMismatchBundle.java │ ├── ClassBundle.java │ ├── DuplicateKey1Bundle.java │ ├── DuplicateKey2Bundle.java │ ├── DuplicateKeyBundle.java │ ├── InvalidMessageFormatBundle.java │ ├── InvalidMethodReturnBundle.java │ ├── MethodSignatureClash1Bundle.java │ ├── MethodSignatureClash2Bundle.java │ ├── MissingArgumentBundle.java │ └── MissingMessageAnnotationBundle.java ├── i18n ├── pom.xml └── src │ └── main │ └── java │ └── jlibs │ └── core │ └── util │ └── i18n │ ├── Hint.java │ ├── I18N.java │ └── LocaleContext.java ├── jdbc-apt ├── pom.xml └── src │ └── main │ └── java │ └── jlibs │ └── jdbc │ └── annotations │ ├── Column.java │ ├── Database.java │ ├── Delete.java │ ├── Insert.java │ ├── OrderBy.java │ ├── References.java │ ├── Select.java │ ├── Table.java │ ├── TypeMapper.java │ ├── Update.java │ ├── Upsert.java │ └── processor │ ├── ColumnProperty.java │ ├── Columns.java │ ├── ConnectionInfo.java │ ├── DMLMethod.java │ ├── DeleteMethod.java │ ├── FieldColumnProperty.java │ ├── InsertMethod.java │ ├── MethodColumnProperty.java │ ├── SelectColumnMethod.java │ ├── SelectMethod.java │ ├── TableAnnotationProcessor.java │ ├── UpdateMethod.java │ ├── UpsertMethod.java │ └── WhereMethod.java ├── jdbc ├── pom.xml └── src │ └── main │ └── java │ └── jlibs │ └── jdbc │ ├── Batch.java │ ├── ColumnMetaData.java │ ├── DAO.java │ ├── DAOException.java │ ├── IncorrectResultSizeException.java │ ├── JDBC.java │ ├── JDBCTask.java │ ├── JDBCTypeMapper.java │ ├── JavaType.java │ ├── Order.java │ ├── RowMapper.java │ ├── SQLType.java │ ├── TableMetaData.java │ ├── Transaction.java │ └── paging │ ├── Page.java │ ├── Paging.java │ └── PagingColumn.java ├── json ├── json.properties └── json.syntax ├── keystore.ks ├── nblr ├── bin │ ├── nblr.bat │ ├── nblr.conf │ └── nblr.sh ├── pom.xml └── src │ └── main │ ├── java │ └── jlibs │ │ └── nblr │ │ ├── BufferingDepths.java │ │ ├── Syntax.java │ │ ├── actions │ │ ├── Action.java │ │ ├── BufferAction.java │ │ ├── ErrorAction.java │ │ ├── EventAction.java │ │ └── PublishAction.java │ │ ├── codegen │ │ ├── CodeGenerator.java │ │ ├── Decision.java │ │ ├── FinishAllMethod.java │ │ ├── IfBlock.java │ │ ├── RootIf.java │ │ ├── RuleMethod.java │ │ ├── State.java │ │ └── java │ │ │ ├── JavaCodeGenerator.java │ │ │ └── SyntaxClass.java │ │ ├── editor │ │ ├── MatcherChooser.java │ │ ├── NBLREditor.java │ │ ├── RuleChooser.java │ │ ├── RuleScene.java │ │ ├── TreeSelectionDialog.java │ │ ├── UsagesDialog.java │ │ ├── Util.java │ │ ├── actions │ │ │ ├── AssignAction.java │ │ │ ├── ChoiceAction.java │ │ │ ├── EdgePopupProvider.java │ │ │ ├── GenerateHandlerAction.java │ │ │ ├── GenerateJavaFileAction.java │ │ │ ├── GenerateParserAction.java │ │ │ ├── GenerateXMLAction.java │ │ │ ├── Highlighter.java │ │ │ ├── InsertNodeAction.java │ │ │ ├── NodeConnectProvider.java │ │ │ ├── NodePopupProvider.java │ │ │ └── ScenePopupProvider.java │ │ ├── debug │ │ │ ├── DebuggableNBParser.java │ │ │ ├── Debugger.java │ │ │ └── NewLineHighlightPainter.java │ │ ├── layout │ │ │ ├── RuleLayout.java │ │ │ └── RuleRouter.java │ │ ├── serialize │ │ │ ├── SyntaxBinding.java │ │ │ └── SyntaxDocument.java │ │ └── widgets │ │ │ ├── EdgeWidget.java │ │ │ ├── NBLRWidget.java │ │ │ └── NodeWidget.java │ │ ├── matchers │ │ ├── And.java │ │ ├── Any.java │ │ ├── Matcher.java │ │ ├── Not.java │ │ ├── Or.java │ │ └── Range.java │ │ └── rules │ │ ├── Answer.java │ │ ├── Edge.java │ │ ├── Node.java │ │ ├── Path.java │ │ ├── Paths.java │ │ ├── Routes.java │ │ ├── Rule.java │ │ └── RuleTarget.java │ └── resources │ └── jlibs │ └── nblr │ └── editor │ ├── debug │ ├── debug.png │ ├── resume.png │ ├── run.png │ ├── runToCursor.png │ ├── step.png │ └── suspend.png │ ├── deleteRule.png │ ├── newRule.png │ ├── renameRule.png │ └── up.png ├── nbp ├── pom.xml └── src │ └── main │ └── java │ └── jlibs │ └── nbp │ ├── BOM.java │ ├── Chars.java │ ├── Feeder.java │ ├── Location.java │ ├── NBChannel.java │ ├── NBHandler.java │ ├── NBParser.java │ ├── NBReaderChannel.java │ ├── ReadableCharChannel.java │ └── Stream.java ├── nio ├── bin │ ├── echo-client.bat │ ├── echo-client.sh │ ├── echo-server.bat │ ├── echo-server.sh │ ├── proxy.bat │ └── proxy.sh ├── pom.xml └── src │ └── main │ └── java │ └── jlibs │ └── nio │ ├── Connection.java │ ├── ConnectionPool.java │ ├── Debugger.java │ ├── Input.java │ ├── InputFilter.java │ ├── Management.java │ ├── NBChannel.java │ ├── NBStream.java │ ├── Output.java │ ├── OutputFilter.java │ ├── PipedConnection.java │ ├── Proxy.java │ ├── Reactor.java │ ├── Reactors.java │ ├── ReadPipe.java │ ├── Readable.java │ ├── Result.java │ ├── SSLSocket.java │ ├── Socket.java │ ├── SocksProxy.java │ ├── TCPConnection.java │ ├── TCPConnector.java │ ├── TCPEndpoint.java │ ├── TCPServer.java │ ├── Trace.java │ ├── Tracer.java │ ├── Transport.java │ ├── UDPConnection.java │ ├── Writable.java │ ├── WritePipe.java │ ├── filters │ ├── BufferInput.java │ ├── ChunkException.java │ ├── ChunkedInput.java │ ├── ChunkedOutput.java │ ├── CloseTrackingInput.java │ ├── CountingInput.java │ ├── DeflaterOutput.java │ ├── FixedLengthInput.java │ ├── GZIPInput.java │ ├── GZIPOutput.java │ ├── InflaterInput.java │ ├── InputLimitExceeded.java │ ├── LimitInput.java │ ├── ReadTrackingInput.java │ └── TrackingInput.java │ ├── http │ ├── AccessLog.java │ ├── ClientCallback.java │ ├── ClientExchange.java │ ├── ClientFilter.java │ ├── ConnectionStatus.java │ ├── Curl.java │ ├── Exchange.java │ ├── FilterType.java │ ├── HTTPCallback.java │ ├── HTTPClient.java │ ├── HTTPProxy.java │ ├── HTTPProxyServer.java │ ├── HTTPServer.java │ ├── Key.java │ ├── ReadMessage.java │ ├── RequestListener.java │ ├── ResponseListener.java │ ├── ServerCallback.java │ ├── ServerExchange.java │ ├── ServerFilter.java │ ├── SocketPayload.java │ ├── WriteFilePayload.java │ ├── WriteMessage.java │ ├── WritePayload.java │ ├── WriteSocketPayload.java │ ├── expr │ │ ├── Bean.java │ │ ├── Expression.java │ │ ├── ExpressionParser.java │ │ ├── GetField.java │ │ ├── Literal.java │ │ ├── Lookup.java │ │ ├── TypeConversion.java │ │ ├── UnresolvedException.java │ │ ├── ValueMap.java │ │ └── Variable.java │ ├── filters │ │ ├── AddAuthentication.java │ │ ├── AddBasicAuthentication.java │ │ ├── Authenticator.java │ │ ├── CheckAuthentication.java │ │ ├── CheckBasicAuthentication.java │ │ ├── CheckDigestAuthentication.java │ │ ├── FollowRedirects.java │ │ ├── IPAddressAccessController.java │ │ ├── ParseDOM.java │ │ ├── ParseForm.java │ │ ├── ParseJAXB.java │ │ ├── ParseMultipart.java │ │ ├── ParseSocketPayload.java │ │ ├── ParseXML.java │ │ ├── ReadSocketPayload.java │ │ └── SendTrace.java │ ├── msg │ │ ├── AsciiString.java │ │ ├── DOMPayload.java │ │ ├── DefaultPart.java │ │ ├── EmptyPayload.java │ │ ├── EncodablePayload.java │ │ ├── ErrorPayload.java │ │ ├── FilePart.java │ │ ├── FilePayload.java │ │ ├── FormPayload.java │ │ ├── Header.java │ │ ├── Headers.java │ │ ├── JAXBPayload.java │ │ ├── Message.java │ │ ├── Method.java │ │ ├── MultipartPayload.java │ │ ├── Part.java │ │ ├── Payload.java │ │ ├── Request.java │ │ ├── Response.java │ │ ├── SOAP11FaultPayload.java │ │ ├── Status.java │ │ ├── StringPayload.java │ │ ├── Version.java │ │ └── parser │ │ │ ├── FormParser.java │ │ │ ├── HeadersParser.java │ │ │ ├── MessageParser.java │ │ │ ├── MultipartParser.java │ │ │ ├── RequestParser.java │ │ │ └── ResponseParser.java │ └── util │ │ ├── BasicChallenge.java │ │ ├── BasicCredentials.java │ │ ├── Challenge.java │ │ ├── ContentDisposition.java │ │ ├── Cookie.java │ │ ├── Credentials.java │ │ ├── DigestChallenge.java │ │ ├── DigestCredentials.java │ │ ├── Encoding.java │ │ ├── Expect.java │ │ ├── HTTPDate.java │ │ ├── HTTPURL.java │ │ ├── HostPort.java │ │ ├── IOFunction.java │ │ ├── MediaType.java │ │ ├── NewCookie.java │ │ ├── Origins.java │ │ ├── Parser.java │ │ ├── QualityItem.java │ │ ├── USAscii.java │ │ ├── UnknownChallenge.java │ │ └── UnknownCredentials.java │ ├── listeners │ ├── CloseInput.java │ ├── CloseOutput.java │ ├── IOListener.java │ ├── InputException.java │ ├── InputExceptionListener.java │ ├── OutputException.java │ ├── OutputExceptionListener.java │ ├── Pump.java │ ├── ReadBuffers.java │ ├── ReadFixedLength.java │ ├── ShutdownChannel.java │ ├── Socks4Tunnel.java │ ├── Socks5Tunnel.java │ ├── Task.java │ └── WriteToOutputStream.java │ ├── log │ ├── ConsoleLogHandler.java │ ├── FileLogHandler.java │ ├── LogHandler.java │ └── LogRecord.java │ ├── servers │ ├── EchoServer.java │ └── TCPProxyServer.java │ └── util │ ├── BufferAllocator.java │ ├── Buffers.java │ ├── BytePattern.java │ ├── BytesDecoder.java │ ├── IPAddresses.java │ ├── IPPattern.java │ ├── IPV4Pattern.java │ ├── IPV6Pattern.java │ ├── NIOUtil.java │ ├── Parser.java │ ├── PooledBufferAllocator.java │ ├── RepeatingDuration.java │ └── UnpooledBufferAllocator.java ├── pom.xml ├── src ├── etc │ └── header.txt └── main │ └── javadoc │ └── resources │ ├── prettify.css │ └── prettify.js ├── swing ├── pom.xml └── src │ └── main │ └── java │ └── jlibs │ └── swing │ ├── EDT.java │ ├── EmptyIcon.java │ ├── SwingUtil.java │ ├── VerticalTextIcon.java │ ├── datatransfer │ └── ClipboardUtil.java │ ├── event │ └── UIListener.java │ ├── outline │ ├── ClassColumn.java │ ├── Column.java │ ├── DefaultColumn.java │ ├── DefaultRenderDataProvider.java │ └── DefaultRowModel.java │ ├── tree │ ├── AbstractTreeModel.java │ ├── MyTreeCellRenderer.java │ └── NavigatorTreeModel.java │ └── xml │ └── xsd │ └── XSDOutlinePanel.java ├── visitor-apt ├── pom.xml └── src │ └── main │ └── java │ └── jlibs │ └── core │ └── graph │ └── VisitorAnnotationProcessor.java ├── visitor ├── pom.xml └── src │ └── main │ └── java │ └── jlibs │ └── core │ └── graph │ ├── Visitor.java │ └── VisitorUtil.java ├── wadl ├── bin │ ├── wadl-client.bat │ └── wadl-client.sh ├── pom.xml └── src │ └── main │ └── java │ └── jlibs │ └── wadl │ ├── cli │ ├── Util.java │ ├── WADLTerminal.java │ ├── commands │ │ ├── Authenticate.java │ │ ├── Cd.java │ │ ├── Command.java │ │ ├── Import.java │ │ ├── Method.java │ │ ├── Runner.java │ │ ├── Server.java │ │ ├── Set.java │ │ ├── Target.java │ │ └── auth │ │ │ ├── Authenticator.java │ │ │ └── BasicAuthenticator.java │ ├── completors │ │ ├── AuthenticateCompletion.java │ │ ├── Buffer.java │ │ ├── CdCompletion.java │ │ ├── CommandCompletion.java │ │ ├── Completion.java │ │ ├── ImportCompletion.java │ │ ├── MethodCompletion.java │ │ ├── PathCompletion.java │ │ ├── ServerCompletion.java │ │ ├── SetCompletion.java │ │ └── WADLCompletor.java │ ├── model │ │ ├── Path.java │ │ └── WADLReader.java │ └── ui │ │ └── Editor.java │ └── model │ ├── Application.java │ ├── Doc.java │ ├── Grammars.java │ ├── HTTPMethods.java │ ├── Include.java │ ├── Link.java │ ├── Method.java │ ├── ObjectFactory.java │ ├── Option.java │ ├── Param.java │ ├── ParamStyle.java │ ├── Representation.java │ ├── Request.java │ ├── Resource.java │ ├── ResourceType.java │ ├── Resources.java │ ├── Response.java │ └── package-info.java ├── wamp4j-core ├── pom.xml └── src │ ├── main │ └── java │ │ └── jlibs │ │ └── wamp4j │ │ ├── ClientAuthentication.java │ │ ├── Debugger.java │ │ ├── Feature.java │ │ ├── Peer.java │ │ ├── Role.java │ │ ├── SSLSettings.java │ │ ├── Util.java │ │ ├── WAMPSerialization.java │ │ ├── client │ │ ├── BlockingCallListener.java │ │ ├── CallListener.java │ │ ├── Procedure.java │ │ ├── Procedures.java │ │ ├── PublishListener.java │ │ ├── SessionListener.java │ │ ├── Subscription.java │ │ ├── Topic.java │ │ ├── Topics.java │ │ ├── UnregisterListener.java │ │ ├── WAMPClient.java │ │ └── WAMPListener.java │ │ ├── error │ │ ├── AuthorizationFailedException.java │ │ ├── ErrorCode.java │ │ ├── InvalidArgumentException.java │ │ ├── InvalidMessageException.java │ │ ├── InvalidURIException.java │ │ ├── NoSuchProcedureException.java │ │ ├── NoSuchRealmException.java │ │ ├── NoSuchRegistrationException.java │ │ ├── NoSuchRoleException.java │ │ ├── NoSuchSubscriptionException.java │ │ ├── NotAuthorizedException.java │ │ ├── NotConnectedException.java │ │ ├── ProcedureAlreadyExistsException.java │ │ ├── SerializationFailedException.java │ │ ├── SystemShutdownException.java │ │ ├── UnexpectedException.java │ │ ├── UnsupportedSerializationException.java │ │ ├── WAMPException.java │ │ └── WrongThreadException.java │ │ ├── msg │ │ ├── AbortMessage.java │ │ ├── CallMessage.java │ │ ├── Decoder.java │ │ ├── ErrorMessage.java │ │ ├── EventMessage.java │ │ ├── GoodbyeMessage.java │ │ ├── HelloMessage.java │ │ ├── InvocationMessage.java │ │ ├── PublishMessage.java │ │ ├── PublishedMessage.java │ │ ├── RegisterMessage.java │ │ ├── RegisteredMessage.java │ │ ├── RequestMessage.java │ │ ├── ResultMessage.java │ │ ├── SubscribeMessage.java │ │ ├── SubscribedMessage.java │ │ ├── UnregisterMessage.java │ │ ├── UnregisteredMessage.java │ │ ├── UnsubscribeMessage.java │ │ ├── UnsubscribedMessage.java │ │ ├── WAMPMessage.java │ │ ├── WAMPMessageDecoder.java │ │ ├── WelcomeMessage.java │ │ └── YieldMessage.java │ │ ├── router │ │ ├── CallRequest.java │ │ ├── MetaProcedure.java │ │ ├── MetaProcedures.java │ │ ├── Procedure.java │ │ ├── Realm.java │ │ ├── Realms.java │ │ ├── RouterListener.java │ │ ├── Session.java │ │ ├── Topic.java │ │ ├── Topics.java │ │ └── WAMPRouter.java │ │ └── spi │ │ ├── AcceptListener.java │ │ ├── ConnectListener.java │ │ ├── Listener.java │ │ ├── MessageType.java │ │ ├── NamedThreadFactory.java │ │ ├── WAMPClientEndpoint.java │ │ ├── WAMPEndpoint.java │ │ ├── WAMPOutputStream.java │ │ ├── WAMPServerEndPoint.java │ │ └── WAMPSocket.java │ └── test │ └── java │ └── jlibs │ └── wamp4j │ ├── Await.java │ ├── client │ ├── ClientOperator.java │ ├── ProcedureOperator.java │ └── SubscriptionOperator.java │ └── router │ └── RouterOperator.java ├── wamp4j-netty ├── pom.xml └── src │ ├── main │ └── java │ │ └── jlibs │ │ └── wamp4j │ │ └── netty │ │ ├── NettyClientEndpoint.java │ │ ├── NettyEndpoint.java │ │ ├── NettyInputStream.java │ │ ├── NettyOutputStream.java │ │ ├── NettyServerEndpoint.java │ │ └── NettyWebSocket.java │ └── test │ ├── java │ └── jlibs │ │ └── wamp4j │ │ ├── ConnectionTest.java │ │ ├── PubSubTest.java │ │ └── RPCTest.java │ └── resources │ └── log4j.properties ├── wiki ├── Ansi1.png ├── Ansi2.png ├── new.gif ├── new.png └── updated.gif ├── xml-binding-apt ├── pom.xml └── src │ └── main │ └── java │ └── jlibs │ └── xml │ └── sax │ └── binding │ └── impl │ └── processor │ ├── Binding.java │ ├── BindingAnnotation.java │ ├── BindingAnnotationProcessor.java │ ├── BindingError.java │ └── Namespaces.java ├── xml-binding ├── pom.xml └── src │ └── main │ └── java │ └── jlibs │ └── xml │ └── sax │ └── binding │ ├── Attr.java │ ├── Binding.java │ ├── BindingHandler.java │ ├── BindingListener.java │ ├── BindingRegistry.java │ ├── Current.java │ ├── Entry.java │ ├── NamespaceContext.java │ ├── Parent.java │ ├── Relation.java │ ├── SAXContext.java │ ├── Temp.java │ └── impl │ ├── Binding.java │ ├── BindingCumRelation.java │ ├── BindingRelation.java │ ├── Delegate.java │ ├── Handler.java │ ├── Registry.java │ ├── Relation.java │ ├── TempRelation.java │ └── TextBinding.java ├── xml-crawler ├── pom.xml └── src │ └── main │ └── java │ └── jlibs │ └── xml │ └── sax │ └── crawl │ ├── CrawlerListener.java │ ├── CrawlingRules.java │ ├── DefaultCrawlerListener.java │ └── XMLCrawler.java ├── xml-nbp ├── conformance │ ├── build.xml │ ├── exclude.txt │ ├── include1.0.xsl │ └── report.xsl ├── pom.xml ├── src │ └── main │ │ └── java │ │ └── jlibs │ │ └── xml │ │ └── sax │ │ └── async │ │ ├── AsyncXMLReader.java │ │ ├── AttributeType.java │ │ ├── AttributeValueType.java │ │ ├── ChannelInputSource.java │ │ ├── DTD.java │ │ ├── DTDAttribute.java │ │ ├── Element.java │ │ ├── QName.java │ │ ├── QNamePool.java │ │ ├── SpaceWrappedReader.java │ │ ├── XMLFeeder.java │ │ └── XMLScanner.java ├── xml.properties └── xml.syntax ├── xml ├── pom.xml └── src │ ├── main │ └── java │ │ └── jlibs │ │ └── xml │ │ ├── ClarkName.java │ │ ├── DefaultNamespaceContext.java │ │ ├── NamespaceMap.java │ │ ├── Namespaces.java │ │ ├── QNameFake.java │ │ ├── XMLUtil.java │ │ ├── dom │ │ ├── DOMLocator.java │ │ ├── DOMNamespaceContext.java │ │ ├── DOMNavigator.java │ │ ├── DOMUtil.java │ │ ├── DOMXPathNameConvertor.java │ │ ├── NamedNodeMapSequence.java │ │ └── NodeListSequence.java │ │ ├── sax │ │ ├── AbstractXMLReader.java │ │ ├── AnsiHandler.java │ │ ├── BaseXMLReader.java │ │ ├── MyXMLFilter.java │ │ ├── NamespaceReplacer.java │ │ ├── ObjectInputSource.java │ │ ├── SAXDebugHandler.java │ │ ├── SAXDelegate.java │ │ ├── SAXFeatures.java │ │ ├── SAXInputSource.java │ │ ├── SAXProducer.java │ │ ├── SAXProperties.java │ │ ├── SAXUtil.java │ │ ├── XMLDocument.java │ │ ├── XMLWriter.java │ │ └── helpers │ │ │ ├── MyNamespaceSupport.java │ │ │ ├── NamespaceSupportReader.java │ │ │ └── SAXHandler.java │ │ ├── stream │ │ ├── STAXAttributes.java │ │ ├── STAXLocator.java │ │ └── STAXXMLReader.java │ │ ├── xpath │ │ └── DefaultXPathVariableResolver.java │ │ └── xsl │ │ └── TransformerUtil.java │ └── test │ ├── java │ └── jlibs │ │ └── xml │ │ └── sax │ │ └── NamespaceReplacerTest.java │ └── resources │ ├── soap11-default.xml │ ├── soap11.xml │ └── soap12.xml ├── xmldog ├── pom.xml └── src │ └── main │ └── java │ └── jlibs │ └── xml │ └── sax │ └── dog │ ├── DataType.java │ ├── NodeItem.java │ ├── NodeType.java │ ├── Scope.java │ ├── XMLDog.java │ ├── XPathResults.java │ ├── expr │ ├── Evaluation.java │ ├── EvaluationListener.java │ ├── EvaluationScope.java │ ├── Expression.java │ ├── InstantEvaluationListener.java │ ├── LinkableEvaluation.java │ ├── Literal.java │ ├── StaticEvaluation.java │ ├── Variable.java │ ├── func │ │ ├── Function.java │ │ ├── FunctionCall.java │ │ ├── Functions.java │ │ └── PeekingFunction.java │ └── nodset │ │ ├── Bool.java │ │ ├── Count.java │ │ ├── ExactPosition.java │ │ ├── FirstEventData.java │ │ ├── Language.java │ │ ├── Last.java │ │ ├── LocalName.java │ │ ├── LocationEvaluation.java │ │ ├── LocationExpression.java │ │ ├── NamespaceURI.java │ │ ├── NodeSet.java │ │ ├── NodeSetListener.java │ │ ├── PathExpression.java │ │ ├── Position.java │ │ ├── PositionMatches.java │ │ ├── PositionTracker.java │ │ ├── Positional.java │ │ ├── PredicateEvaluation.java │ │ ├── QualifiedName.java │ │ ├── StringEvaluation.java │ │ └── Strings.java │ ├── path │ ├── Axis.java │ ├── AxisListener.java │ ├── Constraint.java │ ├── EventID.java │ ├── LocationPath.java │ ├── LocationPathAnalyzer.java │ ├── PositionalPredicate.java │ ├── PredicateSet.java │ ├── Predicated.java │ ├── Step.java │ └── tests │ │ ├── Comment.java │ │ ├── Element.java │ │ ├── LocalName.java │ │ ├── NamespaceURI.java │ │ ├── Node.java │ │ ├── PI.java │ │ ├── PITarget.java │ │ ├── ParentNode.java │ │ ├── QName.java │ │ ├── Star.java │ │ └── Text.java │ └── sniff │ ├── DOMBuilder.java │ ├── Event.java │ ├── SAXHandler.java │ ├── XMLBuilder.java │ └── XPathParser.java └── xsd ├── pom.xml ├── src └── main │ └── java │ └── jlibs │ └── xml │ └── xsd │ ├── DOMLSInputList.java │ ├── EmptySampleValueGenerator.java │ ├── XMLSampleValueGenerator.java │ ├── XSContentModel.java │ ├── XSDocument.java │ ├── XSInliner.java │ ├── XSInstance.java │ ├── XSNavigator.java │ ├── XSParser.java │ ├── XSUtil.java │ ├── display │ ├── XSColorVisitor.java │ ├── XSDisplayFilter.java │ ├── XSDisplayNameVisitor.java │ ├── XSDisplayValueVisitor.java │ ├── XSFontStyleVisitor.java │ └── XSPathDiplayFilter.java │ └── sequences │ ├── XSNamedMapSequence.java │ ├── XSNamespaceItemListSequence.java │ └── XSObjectListSequence.java └── xsds ├── a.xsd ├── cust.xsd ├── imports ├── b.xsd └── c.xsd ├── note.xsd ├── ord1.xsd ├── ord2.xsd ├── prod.xsd └── purchaseOrder.xsd /.gitignore: -------------------------------------------------------------------------------- 1 | target 2 | .idea 3 | *.iml 4 | mvn-repo 5 | -------------------------------------------------------------------------------- /3rdparty/org-netbeans-api-visual/pom.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | in.jlibs 6 | jlibs-3rdparty 7 | 3.0.0 8 | 9 | 10 | 4.0.0 11 | org-netbeans-api-visual 12 | jar 13 | RELEASE65 14 | 15 | org-netbeans-api-visual 16 | 17 | 18 | 19 | in.jlibs 20 | org-openide-util 21 | ${project.version} 22 | 23 | 24 | 25 | 26 | 27 | 28 | maven-antrun-plugin 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /3rdparty/org-netbeans-api-visual/src/main/java/Dummy.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2015 Santhosh Kumar Tekuri 3 | * 4 | * The JLibs authors license this file to you under the Apache License, 5 | * version 2.0 (the "License"); you may not use this file except in compliance 6 | * with the License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | public class Dummy{} 18 | -------------------------------------------------------------------------------- /3rdparty/org-netbeans-swing-outline/pom.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | in.jlibs 6 | jlibs-3rdparty 7 | 3.0.0 8 | 9 | 10 | 4.0.0 11 | org-netbeans-swing-outline 12 | jar 13 | RELEASE65 14 | 15 | org-netbeans-swing-outline 16 | 17 | 18 | 19 | 20 | maven-antrun-plugin 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /3rdparty/org-netbeans-swing-outline/src/main/java/Dummy.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2015 Santhosh Kumar Tekuri 3 | * 4 | * The JLibs authors license this file to you under the Apache License, 5 | * version 2.0 (the "License"); you may not use this file except in compliance 6 | * with the License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | public class Dummy{} 18 | -------------------------------------------------------------------------------- /3rdparty/org-openide-util/pom.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | in.jlibs 6 | jlibs-3rdparty 7 | 3.0.0 8 | 9 | 10 | 4.0.0 11 | org-openide-util 12 | jar 13 | RELEASE65 14 | 15 | org-openide-util 16 | 17 | 18 | 19 | 20 | maven-antrun-plugin 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /3rdparty/org-openide-util/src/main/java/Dummy.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2015 Santhosh Kumar Tekuri 3 | * 4 | * The JLibs authors license this file to you under the Apache License, 5 | * version 2.0 (the "License"); you may not use this file except in compliance 6 | * with the License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | public class Dummy{} 18 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | JLibs 2 | ======= 3 | 4 | *Common Utilities for Java* 5 | 6 | For more information, please see [the documentation](https://santhosh-tekuri.github.io/jlibs). 7 | -------------------------------------------------------------------------------- /apt/pom.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | in.jlibs 7 | jlibs-parent 8 | 3.0.1 9 | 10 | 11 | 4.0.0 12 | jlibs-apt 13 | jar 14 | 15 | apt 16 | Utilities to create Annotation Processor 17 | 18 | 19 | -------------------------------------------------------------------------------- /core/src/main/java/jlibs/core/graph/Convertor.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2015 Santhosh Kumar Tekuri 3 | * 4 | * The JLibs authors license this file to you under the Apache License, 5 | * version 2.0 (the "License"); you may not use this file except in compliance 6 | * with the License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package jlibs.core.graph; 18 | 19 | /** 20 | * @author Santhosh Kumar T 21 | */ 22 | public interface Convertor{ 23 | public R convert(S source); 24 | } 25 | -------------------------------------------------------------------------------- /core/src/main/java/jlibs/core/graph/Filter.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2015 Santhosh Kumar Tekuri 3 | * 4 | * The JLibs authors license this file to you under the Apache License, 5 | * version 2.0 (the "License"); you may not use this file except in compliance 6 | * with the License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package jlibs.core.graph; 18 | 19 | /** 20 | * @author Santhosh Kumar T 21 | */ 22 | public interface Filter{ 23 | public boolean select(E elem); 24 | } 25 | -------------------------------------------------------------------------------- /core/src/main/java/jlibs/core/graph/Navigator.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2015 Santhosh Kumar Tekuri 3 | * 4 | * The JLibs authors license this file to you under the Apache License, 5 | * version 2.0 (the "License"); you may not use this file except in compliance 6 | * with the License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package jlibs.core.graph; 18 | 19 | /** 20 | * @author Santhosh Kumar T 21 | */ 22 | public interface Navigator{ 23 | public Sequence children(E elem); 24 | } 25 | -------------------------------------------------------------------------------- /core/src/main/java/jlibs/core/graph/Processor.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2015 Santhosh Kumar Tekuri 3 | * 4 | * The JLibs authors license this file to you under the Apache License, 5 | * version 2.0 (the "License"); you may not use this file except in compliance 6 | * with the License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package jlibs.core.graph; 18 | 19 | /** 20 | * @author Santhosh Kumar T 21 | */ 22 | public interface Processor{ 23 | public boolean preProcess(E elem, Path path); 24 | public void postProcess(E elem, Path path); 25 | } 26 | -------------------------------------------------------------------------------- /core/src/main/java/jlibs/core/graph/Walker.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2015 Santhosh Kumar Tekuri 3 | * 4 | * The JLibs authors license this file to you under the Apache License, 5 | * version 2.0 (the "License"); you may not use this file except in compliance 6 | * with the License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package jlibs.core.graph; 18 | 19 | /** 20 | * @author Santhosh Kumar T 21 | */ 22 | public interface Walker extends Sequence{ 23 | public Path getCurrentPath(); 24 | public void skip(); 25 | public void addBreakpoint(); 26 | public boolean isPaused(); 27 | public void resume(); 28 | } 29 | -------------------------------------------------------------------------------- /core/src/main/java/jlibs/core/graph/filters/InstanceFilter.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2015 Santhosh Kumar Tekuri 3 | * 4 | * The JLibs authors license this file to you under the Apache License, 5 | * version 2.0 (the "License"); you may not use this file except in compliance 6 | * with the License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package jlibs.core.graph.filters; 18 | 19 | import jlibs.core.graph.Filter; 20 | 21 | /** 22 | * @author Santhosh Kumar T 23 | */ 24 | public class InstanceFilter implements Filter{ 25 | private Class clazz; 26 | 27 | public InstanceFilter(Class clazz){ 28 | this.clazz = clazz; 29 | } 30 | 31 | @Override 32 | public boolean select(E elem){ 33 | return clazz.isInstance(elem); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /core/src/main/java/jlibs/core/graph/filters/NotFilter.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2015 Santhosh Kumar Tekuri 3 | * 4 | * The JLibs authors license this file to you under the Apache License, 5 | * version 2.0 (the "License"); you may not use this file except in compliance 6 | * with the License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package jlibs.core.graph.filters; 18 | 19 | import jlibs.core.graph.Filter; 20 | 21 | /** 22 | * @author Santhosh Kumar T 23 | */ 24 | public class NotFilter implements Filter{ 25 | private Filter delegate; 26 | 27 | public NotFilter(Filter delegate){ 28 | this.delegate = delegate; 29 | } 30 | 31 | @Override 32 | public boolean select(E elem){ 33 | return !delegate.select(elem); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /core/src/main/java/jlibs/core/graph/filters/TrueFilter.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2015 Santhosh Kumar Tekuri 3 | * 4 | * The JLibs authors license this file to you under the Apache License, 5 | * version 2.0 (the "License"); you may not use this file except in compliance 6 | * with the License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package jlibs.core.graph.filters; 18 | 19 | import jlibs.core.graph.Filter; 20 | 21 | /** 22 | * @author Santhosh Kumar T 23 | */ 24 | public class TrueFilter implements Filter{ 25 | public static final TrueFilter INSTANCE = new TrueFilter(); 26 | 27 | private TrueFilter(){} 28 | 29 | @Override 30 | public boolean select(E elem){ 31 | return true; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /core/src/main/java/jlibs/core/graph/visitors/StaticVisitor.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2015 Santhosh Kumar Tekuri 3 | * 4 | * The JLibs authors license this file to you under the Apache License, 5 | * version 2.0 (the "License"); you may not use this file except in compliance 6 | * with the License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package jlibs.core.graph.visitors; 18 | 19 | import jlibs.core.graph.Visitor; 20 | 21 | /** 22 | * @author Santhosh Kumar T 23 | */ 24 | public class StaticVisitor implements Visitor{ 25 | private R result; 26 | 27 | public StaticVisitor(R result){ 28 | this.result = result; 29 | } 30 | 31 | @Override 32 | public R visit(E elem){ 33 | return result; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /core/src/main/java/jlibs/core/io/FileNameComparator.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2015 Santhosh Kumar Tekuri 3 | * 4 | * The JLibs authors license this file to you under the Apache License, 5 | * version 2.0 (the "License"); you may not use this file except in compliance 6 | * with the License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package jlibs.core.io; 18 | 19 | import jlibs.core.util.DefaultComparator; 20 | 21 | import java.io.File; 22 | 23 | /** 24 | * @author Santhosh Kumar T 25 | */ 26 | public class FileNameComparator extends DefaultComparator{ 27 | @Override 28 | protected int _compare(File file1, File file2){ 29 | return file1.getName().compareToIgnoreCase(file2.getName()); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /core/src/main/java/jlibs/core/io/NullOutputStream.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2015 Santhosh Kumar Tekuri 3 | * 4 | * The JLibs authors license this file to you under the Apache License, 5 | * version 2.0 (the "License"); you may not use this file except in compliance 6 | * with the License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package jlibs.core.io; 18 | 19 | import java.io.OutputStream; 20 | 21 | /** 22 | * @author Santhosh Kumar Tekuri 23 | */ 24 | public class NullOutputStream extends OutputStream{ 25 | public static final NullOutputStream INSTANCE = new NullOutputStream(); 26 | 27 | @Override 28 | public void write(int i){} 29 | 30 | @Override 31 | public void write(byte[] bytes, int i, int i2){} 32 | } 33 | -------------------------------------------------------------------------------- /core/src/main/java/jlibs/core/lang/DurationUnit.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2015 Santhosh Kumar Tekuri 3 | * 4 | * The JLibs authors license this file to you under the Apache License, 5 | * version 2.0 (the "License"); you may not use this file except in compliance 6 | * with the License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package jlibs.core.lang; 18 | 19 | /** 20 | * @author Santhosh Kumar T 21 | */ 22 | public enum DurationUnit implements Count.Unit{ 23 | NANO_SECONDS(1000000), MILLI_SECONDS(1000), SECONDS(60), MINUTES(60), HOURS(24), DAYS(30), MONTHS(12), YEARS(0); 24 | 25 | private int count; 26 | 27 | private DurationUnit(int count){ 28 | this.count = count; 29 | } 30 | 31 | @Override 32 | public int count(){ 33 | return count; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /core/src/main/java/jlibs/core/lang/NotImplementedException.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2015 Santhosh Kumar Tekuri 3 | * 4 | * The JLibs authors license this file to you under the Apache License, 5 | * version 2.0 (the "License"); you may not use this file except in compliance 6 | * with the License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package jlibs.core.lang; 18 | 19 | /** 20 | * @author Santhosh Kumar T 21 | */ 22 | public class NotImplementedException extends RuntimeException{ 23 | public NotImplementedException(){ 24 | } 25 | 26 | public NotImplementedException(String message){ 27 | super(message); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /core/src/main/java/jlibs/core/lang/SizeUnit.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2015 Santhosh Kumar Tekuri 3 | * 4 | * The JLibs authors license this file to you under the Apache License, 5 | * version 2.0 (the "License"); you may not use this file except in compliance 6 | * with the License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package jlibs.core.lang; 18 | 19 | /** 20 | * @author Santhosh Kumar T 21 | */ 22 | public enum SizeUnit implements Count.Unit{ 23 | BYTES(1024), KB(1024), MB(1024), GB(0); 24 | 25 | private int count; 26 | 27 | private SizeUnit(int count){ 28 | this.count = count; 29 | } 30 | 31 | @Override 32 | public int count(){ 33 | return count; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /core/src/main/java/jlibs/core/lang/Task.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2015 Santhosh Kumar Tekuri 3 | * 4 | * The JLibs authors license this file to you under the Apache License, 5 | * version 2.0 (the "License"); you may not use this file except in compliance 6 | * with the License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package jlibs.core.lang; 18 | 19 | /** 20 | * @author Santhosh Kumar T 21 | */ 22 | public abstract class Task extends ThrowableTask{ 23 | public Task(){ 24 | super(RuntimeException.class); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /core/src/main/java/jlibs/core/util/NonNullIterator.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2015 Santhosh Kumar Tekuri 3 | * 4 | * The JLibs authors license this file to you under the Apache License, 5 | * version 2.0 (the "License"); you may not use this file except in compliance 6 | * with the License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package jlibs.core.util; 18 | 19 | /** 20 | * @author Santhosh Kumar T 21 | */ 22 | public abstract class NonNullIterator extends AbstractIterator{ 23 | @Override 24 | protected final Object computeNext(){ 25 | T next = findNext(); 26 | return next==null ? NO_MORE_ELEMENTS : next; 27 | } 28 | 29 | protected abstract T findNext(); 30 | } 31 | -------------------------------------------------------------------------------- /core/src/main/java/jlibs/core/util/regex/RegexUtil.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2015 Santhosh Kumar Tekuri 3 | * 4 | * The JLibs authors license this file to you under the Apache License, 5 | * version 2.0 (the "License"); you may not use this file except in compliance 6 | * with the License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package jlibs.core.util.regex; 18 | 19 | import java.util.regex.Pattern; 20 | 21 | /** 22 | * @author Santhosh Kumar T 23 | */ 24 | public class RegexUtil{ 25 | public static Pattern compilePathPattern(String pathPattern){ 26 | return Pattern.compile(pathPattern.replace("**", ".+?").replace("*", "[^/]+?")); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /core/src/main/resources/jlibs/core/lang/getpids.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/santhosh-tekuri/jlibs/3fc29d2616be6b232aa82fa3c36b02779ef83389/core/src/main/resources/jlibs/core/lang/getpids.exe -------------------------------------------------------------------------------- /core/src/main/resources/jlibs/core/util/logging/ansiformatter.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2015 Santhosh Kumar Tekuri 3 | # 4 | # The JLibs authors license this file to you under the Apache License, 5 | # version 2.0 (the "License"); you may not use this file except in compliance 6 | # with the License. You may obtain a copy of the License at: 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | # License for the specific language governing permissions and limitations 14 | # under the License. 15 | # 16 | 17 | SEVERE=DIM;RED 18 | WARNING=BRIGHT;RED 19 | INFO=DIM;CYAN 20 | CONFIG=DIM;MAGENTA 21 | FINE=DIM;GREEN 22 | FINER=DIM;YELLOW 23 | FINEST=BRIGHT;YELLOW 24 | -------------------------------------------------------------------------------- /core/src/test/resources/testng.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /examples/bin/crawl-xml.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | CALL %~p0launcher\jlaunch.bat %~p0examples.conf jlibs.xml.sax.crawl.XMLCrawler %* 3 | -------------------------------------------------------------------------------- /examples/bin/crawl-xml.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | `dirname $0`/launcher/jlaunch.sh `dirname $0`/examples.conf jlibs.xml.sax.crawl.XMLCrawler $* 4 | -------------------------------------------------------------------------------- /examples/bin/wamp-invoke.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | CALL %~p0launcher\jlaunch.bat %~p0examples.conf jlibs.examples.wamp4j.WAMPInvoke %* 3 | PAUSE 4 | -------------------------------------------------------------------------------- /examples/bin/wamp-invoke.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | `dirname $0`/launcher/jlaunch.sh `dirname $0`/examples.conf jlibs.examples.wamp4j.WAMPInvoke $* 4 | -------------------------------------------------------------------------------- /examples/bin/wamp-publish.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | CALL %~p0launcher\jlaunch.bat %~p0examples.conf jlibs.examples.wamp4j.WAMPPublish %* 3 | PAUSE 4 | -------------------------------------------------------------------------------- /examples/bin/wamp-publish.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | `dirname $0`/launcher/jlaunch.sh `dirname $0`/examples.conf jlibs.examples.wamp4j.WAMPPublish $* 4 | -------------------------------------------------------------------------------- /examples/bin/wamp-register.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | CALL %~p0launcher\jlaunch.bat %~p0examples.conf jlibs.examples.wamp4j.WAMPRegister %* 3 | PAUSE 4 | -------------------------------------------------------------------------------- /examples/bin/wamp-register.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | `dirname $0`/launcher/jlaunch.sh `dirname $0`/examples.conf jlibs.examples.wamp4j.WAMPRegister $* 4 | -------------------------------------------------------------------------------- /examples/bin/wamp-router.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | CALL %~p0launcher\jlaunch.bat %~p0examples.conf jlibs.examples.wamp4j.Router %* 3 | PAUSE 4 | -------------------------------------------------------------------------------- /examples/bin/wamp-router.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | `dirname $0`/launcher/jlaunch.sh `dirname $0`/examples.conf jlibs.examples.wamp4j.Router $* 4 | -------------------------------------------------------------------------------- /examples/bin/wamp-subscribe.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | CALL %~p0launcher\jlaunch.bat %~p0examples.conf jlibs.examples.wamp4j.WAMPSubscribe %* 3 | PAUSE 4 | -------------------------------------------------------------------------------- /examples/bin/wamp-subscribe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | `dirname $0`/launcher/jlaunch.sh `dirname $0`/examples.conf jlibs.examples.wamp4j.WAMPSubscribe $* 4 | -------------------------------------------------------------------------------- /examples/bin/xmldog-conformance.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | CALL %~p0launcher\jlaunch.bat %~p0examples.conf jlibs.examples.xml.sax.dog.tests.XPathConformanceTest %* 3 | -------------------------------------------------------------------------------- /examples/bin/xmldog-conformance.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | `dirname $0`/launcher/jlaunch.sh `dirname $0`/examples.conf jlibs.examples.xml.sax.dog.tests.XPathConformanceTest $* 4 | -------------------------------------------------------------------------------- /examples/bin/xmldog-performance.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | CALL %~p0launcher\jlaunch.bat %~p0examples.conf jlibs.examples.xml.sax.dog.tests.XPathPerformanceTest 3 | -------------------------------------------------------------------------------- /examples/bin/xmldog-performance.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | `dirname $0`/launcher/jlaunch.sh `dirname $0`/examples.conf jlibs.examples.xml.sax.dog.tests.XPathPerformanceTest 4 | -------------------------------------------------------------------------------- /examples/bin/xmldog.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | CALL %~p0launcher\jlaunch.bat %~p0examples.conf jlibs.examples.xml.sax.dog.XMLDogTest %* 3 | -------------------------------------------------------------------------------- /examples/bin/xmldog.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | `dirname $0`/launcher/jlaunch.sh `dirname $0`/examples.conf jlibs.examples.xml.sax.dog.XMLDogTest $* 4 | -------------------------------------------------------------------------------- /examples/bin/xsd-inline.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | CALL %~p0launcher\jlaunch.bat %~p0examples.conf jlibs.xml.xsd.XSInliner %* 3 | -------------------------------------------------------------------------------- /examples/bin/xsd-inline.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | `dirname $0`/launcher/jlaunch.sh `dirname $0`/examples.conf jlibs.xml.xsd.XSInliner $* 4 | -------------------------------------------------------------------------------- /examples/bin/xsd-instance.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | CALL %~p0launcher\jlaunch.bat %~p0examples.conf jlibs.xml.xsd.XSInstance %* 3 | -------------------------------------------------------------------------------- /examples/bin/xsd-instance.properties: -------------------------------------------------------------------------------- 1 | minimumElementsGenerated=2 2 | maximumElementsGenerated=2 3 | minimumListItemsGenerated=2 4 | maximumListItemsGenerated=2 5 | maximumRecursionDepth=1 6 | 7 | # for following properties value can be always/never/random 8 | generateOptionalElements=always 9 | generateOptionalAttributes=always 10 | generateFixedAttributes=always 11 | generateDefaultAttributes=always 12 | generateDefaultElementValues=always 13 | 14 | # for following properties value can be true/false 15 | generateAllChoices=false 16 | 17 | # for following properties value can be always/never/appropriate 18 | showContentModel=appropriate 19 | -------------------------------------------------------------------------------- /examples/bin/xsd-instance.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | `dirname $0`/launcher/jlaunch.sh `dirname $0`/examples.conf jlibs.xml.xsd.XSInstance $* 4 | -------------------------------------------------------------------------------- /examples/bin/xsd-viewer.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | CALL %~p0launcher\jlaunch.bat %~p0examples.conf jlibs.examples.xml.xsd.XSDOutlinePanelTest %* 3 | PAUSE 4 | -------------------------------------------------------------------------------- /examples/bin/xsd-viewer.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | `dirname $0`/launcher/jlaunch.sh `dirname $0`/examples.conf jlibs.examples.xml.xsd.XSDOutlinePanelTest $* 4 | -------------------------------------------------------------------------------- /examples/db/demo.properties: -------------------------------------------------------------------------------- 1 | #HSQL Database Engine 2.0.0 2 | #Sun Mar 06 08:26:30 GMT+05:30 2011 3 | version=2.0.0 4 | modified=no 5 | -------------------------------------------------------------------------------- /examples/resources/xmlFiles/axis.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /examples/resources/xmlFiles/bookstore.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Everyday Italian 5 | Giada De Laurentiis 6 | 2005 7 | 30.00 8 | 9 | 10 | -------------------------------------------------------------------------------- /examples/resources/xmlFiles/defaultNamespace.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Hello 5 | 6 | 7 | -------------------------------------------------------------------------------- /examples/resources/xmlFiles/evaluate.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 22 | 23 | brown 24 | 25 | 26 | moderate 27 | 28 | 29 | -------------------------------------------------------------------------------- /examples/resources/xmlFiles/id.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | baz 5 | gouda 6 | baz 7 | cheddar 8 | baz 9 | 10 | 11 | -------------------------------------------------------------------------------- /examples/resources/xmlFiles/jaxen24.xml: -------------------------------------------------------------------------------- 1 | 2 |

3 | -------------------------------------------------------------------------------- /examples/resources/xmlFiles/jaxen3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 2 5 | 6 | CE-A 7 | 8 | 9 | 10 | 1 11 | 12 | CE-B 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /examples/resources/xmlFiles/lang.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /examples/resources/xmlFiles/message.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | lookupformservice 5 | 9 6 | stammdaten 7 | new 8 |
9 | 10 | 11 | 12 | 13 | iteminfo 14 | ELE 15 | 16 | 17 | parentinfo 18 | Pruefgebiete 19 | 20 | 21 | id 22 | 1 23 | 24 | 25 | 26 | 27 |
28 | -------------------------------------------------------------------------------- /examples/resources/xmlFiles/namespaces.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Hello 5 | 6 | 7 | 8 | Hey 9 | 10 | 11 | 12 | Hey2 13 | 14 | 15 | 16 | Hey3 17 | 18 | 19 | -------------------------------------------------------------------------------- /examples/resources/xmlFiles/numbers.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 3 6 | 24 7 | 55 8 | 11 9 | 2 10 | -3 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /examples/resources/xmlFiles/pi.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /examples/resources/xmlFiles/pi2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | foo 4 | 5 | bar 6 | 7 | -------------------------------------------------------------------------------- /examples/resources/xmlFiles/positions.xml: -------------------------------------------------------------------------------- 1 | x 2 | 3 | y 4 | 5 | z 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /examples/resources/xmlFiles/purchase_order.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Alice Smith 5 | 123 Maple Street 6 | Mill Valley 7 | CA 8 | 90952 9 | 10 | 11 | Robert Smith 12 | 8 Oak Avenue 13 | Old Town 14 | PA 15 | 95819 16 | 17 | Hurry, my lawn is going wild 18 | 19 | 20 | Lawnmower 21 | 1 22 | 148.95 23 | Confirm this is electric 24 | 25 | 26 | Baby Monitor 27 | 1 28 | 39.98 29 | 1999-05-21 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /examples/resources/xmlFiles/roof.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Salitieri 5 | thatch 6 | 7 | 8 | Nash 9 | shingles 10 | 11 | 12 | DeBrutus 13 | fiberglass 14 | 15 | 16 | Short 17 | shingles 18 | 19 | -------------------------------------------------------------------------------- /examples/resources/xmlFiles/sample1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 10.00 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /examples/resources/xmlFiles/sample2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | NameA2 14 | 15 | 16 | NameA1 17 | AuthorA1 18 | 19 | 20 | NameA2B2 21 | AuthorA2 22 | 23 | 24 | NameZ 25 | AuthorZ 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /examples/resources/xmlFiles/sample3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | x 13 | y 14 | NameZ 15 | AuthorZ 16 | 17 | 1999 18 | 19 | 2002 20 | 21 | 22 | -------------------------------------------------------------------------------- /examples/resources/xmlFiles/simple.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | a 4 | b 5 | d 6 | 7 | -------------------------------------------------------------------------------- /examples/resources/xmlFiles/sum.xml: -------------------------------------------------------------------------------- 1 | 2 | 12 3 | 14 4 | 15 5 | 6 | 12100 7 | 14 8 | 15 9 | 10 | true 11 | -------------------------------------------------------------------------------- /examples/resources/xmlFiles/t.xml: -------------------------------------------------------------------------------- 1 | 2 | 15.00NameA2 3 | -------------------------------------------------------------------------------- /examples/resources/xmlFiles/test.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | test 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /examples/resources/xmlFiles/testNamespaces.xml: -------------------------------------------------------------------------------- 1 | 23 | -------------------------------------------------------------------------------- /examples/resources/xmlFiles/text.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | baz 5 | 6 | baz 7 | 8 | baz 9 | 10 | 11 | -------------------------------------------------------------------------------- /examples/resources/xmlFiles/underscore.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 1 4 | <_b>2 5 | 6 | -------------------------------------------------------------------------------- /examples/resources/xmlFiles/web.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | snoop 6 | SnoopServlet 7 | 8 | 9 | file 10 | ViewFile 11 | 12 | initial 13 | 14 | 1000 15 | 16 | 17 | The initial value for the counter 18 | 19 | 20 | 21 | 22 | 23 | mv 24 | 25 | 26 | *.wm 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | manager 35 | 36 | 37 | director 38 | 39 | 40 | president 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /examples/resources/xpaths-big.xml: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | xmlFiles/big/bioinfo_big.xml 13 | 14 | /bix/command/@id 15 | 16 | 17 | 18 | xmlFiles/big/po.xml 19 | 20 | /purchaseOrder/shipTo/@country 21 | 22 | 23 | -------------------------------------------------------------------------------- /examples/resources/xpaths-debug.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | xmlFiles/note.xml 5 | 6 | /xs:schema//@name 7 | 8 | 9 | -------------------------------------------------------------------------------- /examples/src/main/java/jlibs/examples/jdbc/Grade.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2015 Santhosh Kumar Tekuri 3 | * 4 | * The JLibs authors license this file to you under the Apache License, 5 | * version 2.0 (the "License"); you may not use this file except in compliance 6 | * with the License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package jlibs.examples.jdbc; 18 | 19 | /** 20 | * @author Santhosh Kumar T 21 | */ 22 | public enum Grade{ 23 | JUNIOR, SENIOR, LEAD, MANAGER 24 | } 25 | -------------------------------------------------------------------------------- /examples/src/main/java/jlibs/examples/xml/sax/dog/Profiler.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2015 Santhosh Kumar Tekuri 3 | * 4 | * The JLibs authors license this file to you under the Apache License, 5 | * version 2.0 (the "License"); you may not use this file except in compliance 6 | * with the License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package jlibs.examples.xml.sax.dog; 18 | 19 | /** 20 | * @author Santhosh Kumar T 21 | */ 22 | public class Profiler{ 23 | public static void main(String[] args) throws Exception{ 24 | new TestSuite("xpaths.xml").usingXMLDog(); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /examples/src/main/java/jlibs/examples/xml/sax/dog/XPathTest.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2015 Santhosh Kumar Tekuri 3 | * 4 | * The JLibs authors license this file to you under the Apache License, 5 | * version 2.0 (the "License"); you may not use this file except in compliance 6 | * with the License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package jlibs.examples.xml.sax.dog; 18 | 19 | import jlibs.examples.xml.sax.dog.tests.XPathConformanceTest; 20 | import jlibs.examples.xml.sax.dog.tests.XPathPerformanceTest; 21 | 22 | /** 23 | * @author Santhosh Kumar T 24 | */ 25 | public class XPathTest{ 26 | public static void main(String[] args) throws Exception{ 27 | XPathConformanceTest.main(args); 28 | XPathPerformanceTest.main(args); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /greplog/resources/schemas/header.xsd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /greplog/src/main/java/jlibs/util/logging/Condition.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2015 Santhosh Kumar Tekuri 3 | * 4 | * The JLibs authors license this file to you under the Apache License, 5 | * version 2.0 (the "License"); you may not use this file except in compliance 6 | * with the License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package jlibs.util.logging; 18 | 19 | /** 20 | * @author Santhosh Kumar T 21 | */ 22 | public interface Condition{ 23 | public boolean matches(LogRecord record); 24 | } 25 | -------------------------------------------------------------------------------- /greplog/src/main/java/jlibs/util/logging/IndexCondition.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2015 Santhosh Kumar Tekuri 3 | * 4 | * The JLibs authors license this file to you under the Apache License, 5 | * version 2.0 (the "License"); you may not use this file except in compliance 6 | * with the License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package jlibs.util.logging; 18 | 19 | /** 20 | * @author Santhosh Kumar T 21 | */ 22 | public class IndexCondition implements Condition{ 23 | public final long index; 24 | 25 | public IndexCondition(long index){ 26 | this.index = index; 27 | } 28 | 29 | @Override 30 | public boolean matches(LogRecord record){ 31 | return record.index==index; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /greplog/src/main/java/jlibs/util/logging/LogHandler.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2015 Santhosh Kumar Tekuri 3 | * 4 | * The JLibs authors license this file to you under the Apache License, 5 | * version 2.0 (the "License"); you may not use this file except in compliance 6 | * with the License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package jlibs.util.logging; 18 | 19 | /** 20 | * @author Santhosh Kumar T 21 | */ 22 | public interface LogHandler{ 23 | public void consume(LogRecord record); 24 | } 25 | -------------------------------------------------------------------------------- /greplog/src/main/java/jlibs/util/logging/LogRecord.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2015 Santhosh Kumar Tekuri 3 | * 4 | * The JLibs authors license this file to you under the Apache License, 5 | * version 2.0 (the "License"); you may not use this file except in compliance 6 | * with the License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package jlibs.util.logging; 18 | 19 | /** 20 | * @author Santhosh Kumar T 21 | */ 22 | public class LogRecord{ 23 | public long index; 24 | public String fields[]; 25 | public String message; 26 | 27 | @Override 28 | public String toString(){ 29 | return fields[0]+message; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /greplog/src/main/java/jlibs/util/logging/NotCondition.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2015 Santhosh Kumar Tekuri 3 | * 4 | * The JLibs authors license this file to you under the Apache License, 5 | * version 2.0 (the "License"); you may not use this file except in compliance 6 | * with the License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package jlibs.util.logging; 18 | 19 | /** 20 | * @author Santhosh Kumar T 21 | */ 22 | public class NotCondition implements Condition{ 23 | public final Condition condition; 24 | 25 | public NotCondition(Condition condition){ 26 | this.condition = condition; 27 | } 28 | 29 | @Override 30 | public boolean matches(LogRecord record){ 31 | return !condition.matches(record); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /i18n-apt/src/main/java/jlibs/core/util/i18n/Bundle.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2015 Santhosh Kumar Tekuri 3 | * 4 | * The JLibs authors license this file to you under the Apache License, 5 | * version 2.0 (the "License"); you may not use this file except in compliance 6 | * with the License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package jlibs.core.util.i18n; 18 | 19 | import java.lang.annotation.ElementType; 20 | import java.lang.annotation.Retention; 21 | import java.lang.annotation.RetentionPolicy; 22 | import java.lang.annotation.Target; 23 | 24 | /** 25 | * @author Santhosh Kumar T 26 | */ 27 | @Target({ElementType.TYPE, ElementType.FIELD, ElementType.METHOD}) 28 | @Retention(RetentionPolicy.RUNTIME) 29 | public @interface Bundle{ 30 | Entry[] value(); 31 | } 32 | -------------------------------------------------------------------------------- /i18n-apt/src/main/java/jlibs/core/util/i18n/Message.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2015 Santhosh Kumar Tekuri 3 | * 4 | * The JLibs authors license this file to you under the Apache License, 5 | * version 2.0 (the "License"); you may not use this file except in compliance 6 | * with the License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package jlibs.core.util.i18n; 18 | 19 | import java.lang.annotation.ElementType; 20 | import java.lang.annotation.Retention; 21 | import java.lang.annotation.RetentionPolicy; 22 | import java.lang.annotation.Target; 23 | 24 | /** 25 | * @author Santhosh Kumar T 26 | */ 27 | @Target(ElementType.METHOD) 28 | @Retention(RetentionPolicy.SOURCE) 29 | public @interface Message{ 30 | String key() default ""; 31 | String value(); 32 | } 33 | -------------------------------------------------------------------------------- /i18n-apt/src/main/java/jlibs/core/util/i18n/ResourceBundle.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2015 Santhosh Kumar Tekuri 3 | * 4 | * The JLibs authors license this file to you under the Apache License, 5 | * version 2.0 (the "License"); you may not use this file except in compliance 6 | * with the License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package jlibs.core.util.i18n; 18 | 19 | import java.lang.annotation.ElementType; 20 | import java.lang.annotation.Retention; 21 | import java.lang.annotation.RetentionPolicy; 22 | import java.lang.annotation.Target; 23 | 24 | /** 25 | * @author Santhosh Kumar T 26 | */ 27 | @Target(ElementType.TYPE) 28 | @Retention(RetentionPolicy.SOURCE) 29 | public @interface ResourceBundle{ 30 | } 31 | -------------------------------------------------------------------------------- /i18n-apt/src/test/java/jlibs/core/i18n/Bundle2.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2015 Santhosh Kumar Tekuri 3 | * 4 | * The JLibs authors license this file to you under the Apache License, 5 | * version 2.0 (the "License"); you may not use this file except in compliance 6 | * with the License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package jlibs.core.i18n; 18 | 19 | import jlibs.core.util.i18n.I18N; 20 | import jlibs.core.util.i18n.Message; 21 | import jlibs.core.util.i18n.ResourceBundle; 22 | 23 | /** 24 | * @author Santhosh Kumar T 25 | */ 26 | @ResourceBundle 27 | public interface Bundle2{ 28 | public static final Bundle2 BUNDLE2 = I18N.getImplementation(Bundle2.class); 29 | 30 | @Message("executed {0}") 31 | public String executed(String query); 32 | } 33 | -------------------------------------------------------------------------------- /i18n-apt/src/test/resources/i18n/ArgumentCountMismatchBundle.java: -------------------------------------------------------------------------------- 1 | package i18n; 2 | 3 | import jlibs.core.util.i18n.Message; 4 | import jlibs.core.util.i18n.ResourceBundle; 5 | 6 | /** 7 | * @author Santhosh Kumar T 8 | */ 9 | @ResourceBundle 10 | public interface ArgumentCountMismatchBundle{ 11 | @Message("SQL Execution completed in {0} seconds with {1} errors") 12 | public String executionFinished(long seconds); 13 | } 14 | -------------------------------------------------------------------------------- /i18n-apt/src/test/resources/i18n/ClassBundle.java: -------------------------------------------------------------------------------- 1 | package i18n; 2 | 3 | import jlibs.core.util.i18n.Message; 4 | import jlibs.core.util.i18n.ResourceBundle; 5 | 6 | import java.util.Date; 7 | 8 | /** 9 | * @author Santhosh Kumar T 10 | */ 11 | @ResourceBundle 12 | public abstract class ClassBundle{ 13 | @Message("your lass successfull login is on {0, timee}") 14 | public abstract String lastSucussfullLogin(Date date); 15 | } 16 | -------------------------------------------------------------------------------- /i18n-apt/src/test/resources/i18n/DuplicateKey1Bundle.java: -------------------------------------------------------------------------------- 1 | package i18n; 2 | 3 | import jlibs.core.util.i18n.Message; 4 | import jlibs.core.util.i18n.ResourceBundle; 5 | 6 | /** 7 | * @author Santhosh Kumar T 8 | */ 9 | @ResourceBundle 10 | public interface DuplicateKey1Bundle{ 11 | @Message(key="JLIBS015", value="SQL Execution completed in {0} seconds with {1} errors and {2} warnings") 12 | public String executionFinished(long seconds, int errorCount, int warningCount); 13 | } 14 | -------------------------------------------------------------------------------- /i18n-apt/src/test/resources/i18n/DuplicateKey2Bundle.java: -------------------------------------------------------------------------------- 1 | package i18n; 2 | 3 | import jlibs.core.util.i18n.Message; 4 | import jlibs.core.util.i18n.ResourceBundle; 5 | 6 | /** 7 | * @author Santhosh Kumar T 8 | */ 9 | @ResourceBundle 10 | public interface DuplicateKey2Bundle{ 11 | @Message(key="JLIBS015", value="Encountered an exception while executing the following statement:\n{0}") 12 | public String executionException(String query); 13 | } 14 | -------------------------------------------------------------------------------- /i18n-apt/src/test/resources/i18n/DuplicateKeyBundle.java: -------------------------------------------------------------------------------- 1 | package i18n; 2 | 3 | import jlibs.core.util.i18n.Message; 4 | import jlibs.core.util.i18n.ResourceBundle; 5 | 6 | /** 7 | * @author Santhosh Kumar T 8 | */ 9 | @ResourceBundle 10 | public interface DuplicateKeyBundle{ 11 | @Message(key="JLIBS015", value="SQL Execution completed in {0} seconds with {1} errors and {2} warnings") 12 | public String executionFinished(long seconds, int errorCount, int warningCount); 13 | 14 | @Message(key="JLIBS015", value="Encountered an exception while executing the following statement:\n{0}") 15 | public String executionException(String query); 16 | } 17 | -------------------------------------------------------------------------------- /i18n-apt/src/test/resources/i18n/InvalidMessageFormatBundle.java: -------------------------------------------------------------------------------- 1 | package i18n; 2 | 3 | import jlibs.core.util.i18n.Message; 4 | import jlibs.core.util.i18n.ResourceBundle; 5 | 6 | import java.util.Date; 7 | 8 | /** 9 | * @author Santhosh Kumar T 10 | */ 11 | @ResourceBundle 12 | public interface InvalidMessageFormatBundle{ 13 | @Message("your lass successfull login is on {0, timee}") 14 | public String lastSucussfullLogin(Date date); 15 | } 16 | -------------------------------------------------------------------------------- /i18n-apt/src/test/resources/i18n/InvalidMethodReturnBundle.java: -------------------------------------------------------------------------------- 1 | package i18n; 2 | 3 | import jlibs.core.util.i18n.Message; 4 | import jlibs.core.util.i18n.ResourceBundle; 5 | 6 | import java.util.Date; 7 | 8 | /** 9 | * @author Santhosh Kumar T 10 | */ 11 | @ResourceBundle 12 | public interface InvalidMethodReturnBundle{ 13 | @Message("your lass successfull login is on {0, timee}") 14 | public Date lastSucussfullLogin(Date date); 15 | } 16 | -------------------------------------------------------------------------------- /i18n-apt/src/test/resources/i18n/MethodSignatureClash1Bundle.java: -------------------------------------------------------------------------------- 1 | package i18n; 2 | 3 | import jlibs.core.util.i18n.Message; 4 | import jlibs.core.util.i18n.ResourceBundle; 5 | 6 | /** 7 | * @author Santhosh Kumar T 8 | */ 9 | @ResourceBundle 10 | public interface MethodSignatureClash1Bundle{ 11 | @Message(key="EXECUTING", value="executing {0}") 12 | public String executing(String query); 13 | } 14 | -------------------------------------------------------------------------------- /i18n-apt/src/test/resources/i18n/MethodSignatureClash2Bundle.java: -------------------------------------------------------------------------------- 1 | package i18n; 2 | 3 | import jlibs.core.util.i18n.Message; 4 | import jlibs.core.util.i18n.ResourceBundle; 5 | 6 | /** 7 | * @author Santhosh Kumar T 8 | */ 9 | @ResourceBundle 10 | public interface MethodSignatureClash2Bundle{ 11 | @Message(key="EXECUTING_QUERY", value="executing {0}") 12 | public String executing(String query); 13 | } 14 | -------------------------------------------------------------------------------- /i18n-apt/src/test/resources/i18n/MissingArgumentBundle.java: -------------------------------------------------------------------------------- 1 | package i18n; 2 | 3 | import jlibs.core.util.i18n.Message; 4 | import jlibs.core.util.i18n.ResourceBundle; 5 | 6 | /** 7 | * @author Santhosh Kumar T 8 | */ 9 | @ResourceBundle 10 | public interface MissingArgumentBundle{ 11 | @Message("SQL Execution completed in {0} seconds with {2} errors and {2} warnings") 12 | public String executionFinished(long seconds, int errorCount, int warningCount); 13 | } 14 | -------------------------------------------------------------------------------- /i18n-apt/src/test/resources/i18n/MissingMessageAnnotationBundle.java: -------------------------------------------------------------------------------- 1 | package i18n; 2 | 3 | import jlibs.core.util.i18n.ResourceBundle; 4 | 5 | import java.util.Date; 6 | 7 | /** 8 | * @author Santhosh Kumar T 9 | */ 10 | @ResourceBundle 11 | public interface MissingMessageAnnotationBundle{ 12 | public String lastSucussfullLogin(Date date); 13 | } 14 | -------------------------------------------------------------------------------- /i18n/pom.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | in.jlibs 7 | jlibs-parent 8 | 3.0.1 9 | 10 | 11 | 4.0.0 12 | jlibs-i18n 13 | jar 14 | 15 | i18n 16 | Internationalization made easier 17 | 18 | 19 | in.jlibs.i18n 20 | 21 | 22 | -------------------------------------------------------------------------------- /jdbc-apt/pom.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | in.jlibs 6 | jlibs-parent 7 | 3.0.1 8 | 9 | 10 | 4.0.0 11 | jlibs-jdbc-apt 12 | jar 13 | 14 | jdbc-apt 15 | JDBC annotation processor 16 | 17 | 18 | in.jlibs.jdbc.apt 19 | 20 | 21 | 22 | 23 | in.jlibs 24 | jlibs-apt 25 | ${project.version} 26 | 27 | 28 | in.jlibs 29 | jlibs-jdbc 30 | ${project.version} 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /jdbc-apt/src/main/java/jlibs/jdbc/annotations/Insert.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2015 Santhosh Kumar Tekuri 3 | * 4 | * The JLibs authors license this file to you under the Apache License, 5 | * version 2.0 (the "License"); you may not use this file except in compliance 6 | * with the License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package jlibs.jdbc.annotations; 18 | 19 | import java.lang.annotation.ElementType; 20 | import java.lang.annotation.Retention; 21 | import java.lang.annotation.RetentionPolicy; 22 | import java.lang.annotation.Target; 23 | 24 | /** 25 | * @author Santhosh Kumar T 26 | */ 27 | @Target(ElementType.METHOD) 28 | @Retention(RetentionPolicy.SOURCE) 29 | public @interface Insert{ 30 | } -------------------------------------------------------------------------------- /jdbc-apt/src/main/java/jlibs/jdbc/annotations/References.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2015 Santhosh Kumar Tekuri 3 | * 4 | * The JLibs authors license this file to you under the Apache License, 5 | * version 2.0 (the "License"); you may not use this file except in compliance 6 | * with the License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package jlibs.jdbc.annotations; 18 | 19 | import java.lang.annotation.ElementType; 20 | import java.lang.annotation.Retention; 21 | import java.lang.annotation.RetentionPolicy; 22 | import java.lang.annotation.Target; 23 | 24 | /** 25 | * @author Santhosh Kumar T 26 | */ 27 | @Target({ ElementType.METHOD, ElementType.FIELD }) 28 | @Retention(RetentionPolicy.SOURCE) 29 | public @interface References{ 30 | Class table(); 31 | String column(); 32 | } 33 | -------------------------------------------------------------------------------- /jdbc-apt/src/main/java/jlibs/jdbc/annotations/Update.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2015 Santhosh Kumar Tekuri 3 | * 4 | * The JLibs authors license this file to you under the Apache License, 5 | * version 2.0 (the "License"); you may not use this file except in compliance 6 | * with the License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package jlibs.jdbc.annotations; 18 | 19 | import java.lang.annotation.ElementType; 20 | import java.lang.annotation.Retention; 21 | import java.lang.annotation.RetentionPolicy; 22 | import java.lang.annotation.Target; 23 | 24 | /** 25 | * @author Santhosh Kumar T 26 | */ 27 | @Target(ElementType.METHOD) 28 | @Retention(RetentionPolicy.SOURCE) 29 | public @interface Update{ 30 | String sql() default ""; 31 | boolean ignoreNullConditions() default false; 32 | } -------------------------------------------------------------------------------- /jdbc-apt/src/main/java/jlibs/jdbc/annotations/Upsert.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2015 Santhosh Kumar Tekuri 3 | * 4 | * The JLibs authors license this file to you under the Apache License, 5 | * version 2.0 (the "License"); you may not use this file except in compliance 6 | * with the License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package jlibs.jdbc.annotations; 18 | 19 | import java.lang.annotation.ElementType; 20 | import java.lang.annotation.Retention; 21 | import java.lang.annotation.RetentionPolicy; 22 | import java.lang.annotation.Target; 23 | 24 | /** 25 | * @author Santhosh Kumar T 26 | */ 27 | @Target(ElementType.METHOD) 28 | @Retention(RetentionPolicy.SOURCE) 29 | public @interface Upsert{ 30 | } -------------------------------------------------------------------------------- /jdbc/pom.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | in.jlibs 6 | jlibs-parent 7 | 3.0.1 8 | 9 | 10 | 4.0.0 11 | jlibs-jdbc 12 | jar 13 | 14 | jdbc 15 | J2EE DAO Pattern made easier 16 | 17 | 18 | in.jlibs.jdbc 19 | 20 | 21 | 22 | 23 | in.jlibs 24 | jlibs-core 25 | ${project.version} 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /jdbc/src/main/java/jlibs/jdbc/DAOException.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2015 Santhosh Kumar Tekuri 3 | * 4 | * The JLibs authors license this file to you under the Apache License, 5 | * version 2.0 (the "License"); you may not use this file except in compliance 6 | * with the License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package jlibs.jdbc; 18 | 19 | /** 20 | * @author Santhosh Kumar T 21 | */ 22 | public class DAOException extends RuntimeException{ 23 | public DAOException(){} 24 | 25 | public DAOException(String message){ 26 | super(message); 27 | } 28 | 29 | public DAOException(String message, Throwable cause){ 30 | super(message, cause); 31 | } 32 | 33 | public DAOException(Throwable cause){ 34 | super(cause); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /jdbc/src/main/java/jlibs/jdbc/JDBCTask.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2015 Santhosh Kumar Tekuri 3 | * 4 | * The JLibs authors license this file to you under the Apache License, 5 | * version 2.0 (the "License"); you may not use this file except in compliance 6 | * with the License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package jlibs.jdbc; 18 | 19 | import java.sql.Connection; 20 | import java.sql.SQLException; 21 | 22 | /** 23 | * @author Santhosh Kumar T 24 | */ 25 | public interface JDBCTask{ 26 | public R run(Connection con) throws SQLException; 27 | } 28 | -------------------------------------------------------------------------------- /jdbc/src/main/java/jlibs/jdbc/JDBCTypeMapper.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2015 Santhosh Kumar Tekuri 3 | * 4 | * The JLibs authors license this file to you under the Apache License, 5 | * version 2.0 (the "License"); you may not use this file except in compliance 6 | * with the License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package jlibs.jdbc; 18 | 19 | /** 20 | * This class defines conversion user type to native type 21 | * and vice versa. 22 | * 23 | * @param User Type 24 | * @param Native Type (Java type which is supported by JDBC) 25 | * 26 | * @author Santhosh Kumar T 27 | */ 28 | public interface JDBCTypeMapper{ 29 | public U nativeToUser(N nativeValue); 30 | public N userToNative(U userValue); 31 | } -------------------------------------------------------------------------------- /jdbc/src/main/java/jlibs/jdbc/RowMapper.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2015 Santhosh Kumar Tekuri 3 | * 4 | * The JLibs authors license this file to you under the Apache License, 5 | * version 2.0 (the "License"); you may not use this file except in compliance 6 | * with the License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package jlibs.jdbc; 18 | 19 | import java.sql.ResultSet; 20 | import java.sql.SQLException; 21 | 22 | /** 23 | * @author Santhosh Kumar T 24 | */ 25 | public interface RowMapper{ 26 | public T newRecord(ResultSet rs) throws SQLException; 27 | } 28 | -------------------------------------------------------------------------------- /jdbc/src/main/java/jlibs/jdbc/Transaction.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2015 Santhosh Kumar Tekuri 3 | * 4 | * The JLibs authors license this file to you under the Apache License, 5 | * version 2.0 (the "License"); you may not use this file except in compliance 6 | * with the License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package jlibs.jdbc; 18 | 19 | /** 20 | * @author Santhosh Kumar T 21 | */ 22 | public interface Transaction extends JDBCTask{ 23 | } 24 | -------------------------------------------------------------------------------- /jdbc/src/main/java/jlibs/jdbc/paging/PagingColumn.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2015 Santhosh Kumar Tekuri 3 | * 4 | * The JLibs authors license this file to you under the Apache License, 5 | * version 2.0 (the "License"); you may not use this file except in compliance 6 | * with the License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package jlibs.jdbc.paging; 18 | 19 | import jlibs.jdbc.Order; 20 | 21 | /** 22 | * @author Santhosh Kumar T 23 | */ 24 | public class PagingColumn{ 25 | public final int index; 26 | public final Order order; 27 | public PagingColumn(int index, Order order){ 28 | this.index = index; 29 | this.order = order; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /json/json.properties: -------------------------------------------------------------------------------- 1 | #Properties for json.syntax 2 | #Wed Aug 31 15:07:21 GMT+05:30 2011 3 | 4 | SOURCE_DIR=src/main/java 5 | PARSER_CLASS_NAME=jlibs.json.parser.JSONScanner 6 | HANDLER_CLASS_NAME=jlibs.json.parser.JSONParser 7 | -------------------------------------------------------------------------------- /keystore.ks: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/santhosh-tekuri/jlibs/3fc29d2616be6b232aa82fa3c36b02779ef83389/keystore.ks -------------------------------------------------------------------------------- /nblr/bin/nblr.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | CALL launcher\jlaunch.bat nblr.conf jlibs.nblr.editor.NBLREditor %* 3 | PAUSE 4 | -------------------------------------------------------------------------------- /nblr/bin/nblr.conf: -------------------------------------------------------------------------------- 1 | 2 | ../lib/jlibs-apt.jar 3 | ../lib/jlibs-core.jar 4 | 5 | ../lib/external/xercesImpl-2.11.0.jar 6 | ../lib/jlibs-xml.jar 7 | ../lib/jlibs-xml-nbp.jar 8 | ../lib/jlibs-xml-binding.jar 9 | 10 | ../lib/jlibs-swing.jar 11 | 12 | ../lib/jlibs-nbp.jar 13 | 14 | ../lib/external/org-openide-util-RELEASE65.jar 15 | ../lib/external/org-netbeans-api-visual-RELEASE65.jar 16 | ../lib/jlibs-nblr.jar 17 | 18 | 19 | -ea 20 | -------------------------------------------------------------------------------- /nblr/bin/nblr.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | `dirname $0`/launcher/jlaunch.sh `dirname $0`/nblr.conf jlibs.nblr.editor.NBLREditor $* 4 | -------------------------------------------------------------------------------- /nblr/src/main/java/jlibs/nblr/actions/Action.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2015 Santhosh Kumar Tekuri 3 | * 4 | * The JLibs authors license this file to you under the Apache License, 5 | * version 2.0 (the "License"); you may not use this file except in compliance 6 | * with the License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package jlibs.nblr.actions; 18 | 19 | /** 20 | * @author Santhosh Kumar T 21 | */ 22 | public interface Action{ 23 | public String javaCode(); 24 | } 25 | -------------------------------------------------------------------------------- /nblr/src/main/java/jlibs/nblr/actions/BufferAction.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2015 Santhosh Kumar Tekuri 3 | * 4 | * The JLibs authors license this file to you under the Apache License, 5 | * version 2.0 (the "License"); you may not use this file except in compliance 6 | * with the License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package jlibs.nblr.actions; 18 | 19 | /** 20 | * @author Santhosh Kumar T 21 | */ 22 | public class BufferAction implements Action{ 23 | public static BufferAction INSTANCE = new BufferAction(); 24 | 25 | private BufferAction(){} 26 | 27 | @Override 28 | public String javaCode(){ 29 | return "buffer.push()"; 30 | } 31 | 32 | @Override 33 | public String toString(){ 34 | return "BUFFER"; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /nblr/src/main/java/jlibs/nblr/editor/widgets/NBLRWidget.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2015 Santhosh Kumar Tekuri 3 | * 4 | * The JLibs authors license this file to you under the Apache License, 5 | * version 2.0 (the "License"); you may not use this file except in compliance 6 | * with the License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package jlibs.nblr.editor.widgets; 18 | 19 | import java.awt.*; 20 | 21 | /** 22 | * @author Santhosh Kumar T 23 | */ 24 | public interface NBLRWidget{ 25 | public static Color COLOR_HILIGHT = new Color(0, 128, 0); 26 | public static Color COLOR_DEBUGGER = Color.RED; 27 | 28 | public void highLight(boolean doHighLight); 29 | public void executing(boolean executing); 30 | } 31 | -------------------------------------------------------------------------------- /nblr/src/main/java/jlibs/nblr/rules/Answer.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2015 Santhosh Kumar Tekuri 3 | * 4 | * The JLibs authors license this file to you under the Apache License, 5 | * version 2.0 (the "License"); you may not use this file except in compliance 6 | * with the License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package jlibs.nblr.rules; 18 | 19 | /** 20 | * @author Santhosh Kumar T 21 | */ 22 | public enum Answer{ 23 | YES, NO, MAY_BE 24 | } 25 | -------------------------------------------------------------------------------- /nblr/src/main/java/jlibs/nblr/rules/RuleTarget.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2015 Santhosh Kumar Tekuri 3 | * 4 | * The JLibs authors license this file to you under the Apache License, 5 | * version 2.0 (the "License"); you may not use this file except in compliance 6 | * with the License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package jlibs.nblr.rules; 18 | 19 | /** 20 | * @author Santhosh Kumar t 21 | */ 22 | public class RuleTarget{ 23 | public Rule rule; 24 | public String name; 25 | 26 | public Node node(){ 27 | return name==null ? rule.node : rule.nodeWithName(name); 28 | } 29 | 30 | public String toString(){ 31 | return name==null ? rule.toString() : rule.name+':'+name; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /nblr/src/main/resources/jlibs/nblr/editor/debug/debug.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/santhosh-tekuri/jlibs/3fc29d2616be6b232aa82fa3c36b02779ef83389/nblr/src/main/resources/jlibs/nblr/editor/debug/debug.png -------------------------------------------------------------------------------- /nblr/src/main/resources/jlibs/nblr/editor/debug/resume.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/santhosh-tekuri/jlibs/3fc29d2616be6b232aa82fa3c36b02779ef83389/nblr/src/main/resources/jlibs/nblr/editor/debug/resume.png -------------------------------------------------------------------------------- /nblr/src/main/resources/jlibs/nblr/editor/debug/run.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/santhosh-tekuri/jlibs/3fc29d2616be6b232aa82fa3c36b02779ef83389/nblr/src/main/resources/jlibs/nblr/editor/debug/run.png -------------------------------------------------------------------------------- /nblr/src/main/resources/jlibs/nblr/editor/debug/runToCursor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/santhosh-tekuri/jlibs/3fc29d2616be6b232aa82fa3c36b02779ef83389/nblr/src/main/resources/jlibs/nblr/editor/debug/runToCursor.png -------------------------------------------------------------------------------- /nblr/src/main/resources/jlibs/nblr/editor/debug/step.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/santhosh-tekuri/jlibs/3fc29d2616be6b232aa82fa3c36b02779ef83389/nblr/src/main/resources/jlibs/nblr/editor/debug/step.png -------------------------------------------------------------------------------- /nblr/src/main/resources/jlibs/nblr/editor/debug/suspend.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/santhosh-tekuri/jlibs/3fc29d2616be6b232aa82fa3c36b02779ef83389/nblr/src/main/resources/jlibs/nblr/editor/debug/suspend.png -------------------------------------------------------------------------------- /nblr/src/main/resources/jlibs/nblr/editor/deleteRule.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/santhosh-tekuri/jlibs/3fc29d2616be6b232aa82fa3c36b02779ef83389/nblr/src/main/resources/jlibs/nblr/editor/deleteRule.png -------------------------------------------------------------------------------- /nblr/src/main/resources/jlibs/nblr/editor/newRule.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/santhosh-tekuri/jlibs/3fc29d2616be6b232aa82fa3c36b02779ef83389/nblr/src/main/resources/jlibs/nblr/editor/newRule.png -------------------------------------------------------------------------------- /nblr/src/main/resources/jlibs/nblr/editor/renameRule.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/santhosh-tekuri/jlibs/3fc29d2616be6b232aa82fa3c36b02779ef83389/nblr/src/main/resources/jlibs/nblr/editor/renameRule.png -------------------------------------------------------------------------------- /nblr/src/main/resources/jlibs/nblr/editor/up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/santhosh-tekuri/jlibs/3fc29d2616be6b232aa82fa3c36b02779ef83389/nblr/src/main/resources/jlibs/nblr/editor/up.png -------------------------------------------------------------------------------- /nbp/pom.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | in.jlibs 6 | jlibs-parent 7 | 3.0.1 8 | 9 | 10 | 4.0.0 11 | jlibs-nbp 12 | jar 13 | 14 | nbp 15 | Non-Blocking Parser Framework 16 | 17 | 18 | in.jlibs.nbp 19 | 20 | 21 | -------------------------------------------------------------------------------- /nbp/src/main/java/jlibs/nbp/NBHandler.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2015 Santhosh Kumar Tekuri 3 | * 4 | * The JLibs authors license this file to you under the Apache License, 5 | * version 2.0 (the "License"); you may not use this file except in compliance 6 | * with the License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package jlibs.nbp; 18 | 19 | /** 20 | * @author Santhosh Kumar T 21 | */ 22 | public interface NBHandler{ 23 | public void onSuccessful() throws E; 24 | public E fatalError(String message); 25 | } 26 | -------------------------------------------------------------------------------- /nbp/src/main/java/jlibs/nbp/ReadableCharChannel.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2015 Santhosh Kumar Tekuri 3 | * 4 | * The JLibs authors license this file to you under the Apache License, 5 | * version 2.0 (the "License"); you may not use this file except in compliance 6 | * with the License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package jlibs.nbp; 18 | 19 | import java.io.IOException; 20 | import java.nio.CharBuffer; 21 | import java.nio.channels.Channel; 22 | 23 | /** 24 | * @author Santhosh Kumar T 25 | */ 26 | public interface ReadableCharChannel extends Channel{ 27 | public int read(CharBuffer dst) throws IOException; 28 | } 29 | -------------------------------------------------------------------------------- /nio/bin/echo-client.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | CALL %~p0launcher\jlaunch.bat %~p0examples.conf jlibs.examples.core.nio.EchoClient %* 3 | -------------------------------------------------------------------------------- /nio/bin/echo-client.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | `dirname $0`/launcher/jlaunch.sh `dirname $0`/examples.conf jlibs.examples.core.nio.EchoClient $* 4 | -------------------------------------------------------------------------------- /nio/bin/echo-server.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | CALL %~p0launcher\jlaunch.bat %~p0examples.conf jlibs.examples.core.nio.EchoServer %* 3 | -------------------------------------------------------------------------------- /nio/bin/echo-server.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | `dirname $0`/launcher/jlaunch.sh `dirname $0`/examples.conf jlibs.examples.core.nio.EchoServer $* 4 | -------------------------------------------------------------------------------- /nio/bin/proxy.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | CALL %~p0launcher\jlaunch.bat %~p0examples.conf jlibs.examples.core.nio.Proxy %* 3 | -------------------------------------------------------------------------------- /nio/bin/proxy.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | `dirname $0`/launcher/jlaunch.sh `dirname $0`/examples.conf jlibs.examples.core.nio.Proxy $* 4 | -------------------------------------------------------------------------------- /nio/src/main/java/jlibs/nio/ReadPipe.java: -------------------------------------------------------------------------------- 1 | /* 2 | * JLibs: Common Utilities for Java 3 | * Copyright (C) 2009 Santhosh Kumar T 4 | * 5 | * This library is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 2.1 of the License, or (at your option) any later version. 9 | * 10 | * This library is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | */ 15 | 16 | package jlibs.nio; 17 | 18 | import java.io.IOException; 19 | import java.nio.channels.Pipe; 20 | 21 | /** 22 | * @author Santhosh Kumar Tekuri 23 | */ 24 | public class ReadPipe extends NBStream implements Readable{ 25 | public ReadPipe(Pipe.SourceChannel selectable) throws IOException{ 26 | super(selectable, null); 27 | } 28 | 29 | @Override 30 | public Input in(){ 31 | return transport.peekIn; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /nio/src/main/java/jlibs/nio/Readable.java: -------------------------------------------------------------------------------- 1 | /* 2 | * JLibs: Common Utilities for Java 3 | * Copyright (C) 2009 Santhosh Kumar T 4 | * 5 | * This library is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 2.1 of the License, or (at your option) any later version. 9 | * 10 | * This library is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | */ 15 | 16 | package jlibs.nio; 17 | 18 | /** 19 | * @author Santhosh Kumar Tekuri 20 | */ 21 | public interface Readable{ 22 | public Input in(); 23 | } 24 | -------------------------------------------------------------------------------- /nio/src/main/java/jlibs/nio/Trace.java: -------------------------------------------------------------------------------- 1 | /* 2 | * JLibs: Common Utilities for Java 3 | * Copyright (C) 2009 Santhosh Kumar T 4 | * 5 | * This library is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 2.1 of the License, or (at your option) any later version. 9 | * 10 | * This library is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | */ 15 | 16 | package jlibs.nio; 17 | 18 | import java.lang.annotation.ElementType; 19 | import java.lang.annotation.Target; 20 | 21 | /** 22 | * @author Santhosh Kumar Tekuri 23 | */ 24 | @Target(ElementType.METHOD) 25 | public @interface Trace{ 26 | public boolean condition() default true; 27 | public String args() default "\"\""; 28 | } 29 | -------------------------------------------------------------------------------- /nio/src/main/java/jlibs/nio/Transport.java: -------------------------------------------------------------------------------- 1 | /* 2 | * JLibs: Common Utilities for Java 3 | * Copyright (C) 2009 Santhosh Kumar T 4 | * 5 | * This library is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 2.1 of the License, or (at your option) any later version. 9 | * 10 | * This library is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | */ 15 | 16 | package jlibs.nio; 17 | 18 | /** 19 | * @author Santhosh Kumar Tekuri 20 | */ 21 | public interface Transport extends Input, Output{ 22 | } 23 | -------------------------------------------------------------------------------- /nio/src/main/java/jlibs/nio/Writable.java: -------------------------------------------------------------------------------- 1 | /* 2 | * JLibs: Common Utilities for Java 3 | * Copyright (C) 2009 Santhosh Kumar T 4 | * 5 | * This library is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 2.1 of the License, or (at your option) any later version. 9 | * 10 | * This library is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | */ 15 | 16 | package jlibs.nio; 17 | 18 | /** 19 | * @author Santhosh Kumar Tekuri 20 | */ 21 | public interface Writable{ 22 | public Output out(); 23 | } 24 | -------------------------------------------------------------------------------- /nio/src/main/java/jlibs/nio/WritePipe.java: -------------------------------------------------------------------------------- 1 | /* 2 | * JLibs: Common Utilities for Java 3 | * Copyright (C) 2009 Santhosh Kumar T 4 | * 5 | * This library is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 2.1 of the License, or (at your option) any later version. 9 | * 10 | * This library is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | */ 15 | 16 | package jlibs.nio; 17 | 18 | import java.io.IOException; 19 | import java.nio.channels.Pipe; 20 | 21 | /** 22 | * @author Santhosh Kumar Tekuri 23 | */ 24 | public class WritePipe extends NBStream implements Writable{ 25 | public WritePipe(Pipe.SinkChannel selectable) throws IOException{ 26 | super(selectable, null); 27 | } 28 | 29 | @Override 30 | public Output out(){ 31 | return transport.peekOut; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /nio/src/main/java/jlibs/nio/filters/ChunkException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * JLibs: Common Utilities for Java 3 | * Copyright (C) 2009 Santhosh Kumar T 4 | * 5 | * This library is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 2.1 of the License, or (at your option) any later version. 9 | * 10 | * This library is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | */ 15 | 16 | package jlibs.nio.filters; 17 | 18 | import java.io.IOException; 19 | 20 | /** 21 | * @author Santhosh Kumar Tekuri 22 | */ 23 | public class ChunkException extends IOException{ 24 | public ChunkException(String message){ 25 | super(message); 26 | } 27 | 28 | public ChunkException(String message, Throwable throwable){ 29 | super(message, throwable); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /nio/src/main/java/jlibs/nio/filters/InputLimitExceeded.java: -------------------------------------------------------------------------------- 1 | /* 2 | * JLibs: Common Utilities for Java 3 | * Copyright (C) 2009 Santhosh Kumar T 4 | * 5 | * This library is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 2.1 of the License, or (at your option) any later version. 9 | * 10 | * This library is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | */ 15 | 16 | package jlibs.nio.filters; 17 | 18 | import java.io.IOException; 19 | 20 | /** 21 | * @author Santhosh Kumar Tekuri 22 | */ 23 | public class InputLimitExceeded extends IOException{ 24 | public static final InputLimitExceeded INSTANCE = new InputLimitExceeded(); 25 | 26 | private InputLimitExceeded(){} 27 | 28 | @Override 29 | public Throwable fillInStackTrace(){ 30 | return this; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /nio/src/main/java/jlibs/nio/http/ClientCallback.java: -------------------------------------------------------------------------------- 1 | /* 2 | * JLibs: Common Utilities for Java 3 | * Copyright (C) 2009 Santhosh Kumar T 4 | * 5 | * This library is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 2.1 of the License, or (at your option) any later version. 9 | * 10 | * This library is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | */ 15 | 16 | package jlibs.nio.http; 17 | 18 | /** 19 | * @author Santhosh Kumar Tekuri 20 | */ 21 | public interface ClientCallback{ 22 | public void completed(ClientExchange exchange, Throwable thr); 23 | } 24 | -------------------------------------------------------------------------------- /nio/src/main/java/jlibs/nio/http/ClientFilter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * JLibs: Common Utilities for Java 3 | * Copyright (C) 2009 Santhosh Kumar T 4 | * 5 | * This library is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 2.1 of the License, or (at your option) any later version. 9 | * 10 | * This library is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | */ 15 | 16 | package jlibs.nio.http; 17 | 18 | import jlibs.nio.Trace; 19 | 20 | import static jlibs.nio.Debugger.HTTP; 21 | 22 | /** 23 | * @author Santhosh Kumar Tekuri 24 | */ 25 | public interface ClientFilter{ 26 | @Trace(condition=HTTP, args="$2") 27 | public boolean filter(ClientExchange exchange, FilterType type) throws Exception; 28 | } 29 | -------------------------------------------------------------------------------- /nio/src/main/java/jlibs/nio/http/FilterType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * JLibs: Common Utilities for Java 3 | * Copyright (C) 2009 Santhosh Kumar T 4 | * 5 | * This library is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 2.1 of the License, or (at your option) any later version. 9 | * 10 | * This library is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | */ 15 | 16 | package jlibs.nio.http; 17 | 18 | /** 19 | * @author Santhosh Kumar Tekuri 20 | */ 21 | public enum FilterType{ 22 | REQUEST, RESPONSE, ERROR 23 | } 24 | -------------------------------------------------------------------------------- /nio/src/main/java/jlibs/nio/http/HTTPCallback.java: -------------------------------------------------------------------------------- 1 | /* 2 | * JLibs: Common Utilities for Java 3 | * Copyright (C) 2009 Santhosh Kumar T 4 | * 5 | * This library is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 2.1 of the License, or (at your option) any later version. 9 | * 10 | * This library is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | */ 15 | 16 | package jlibs.nio.http; 17 | 18 | /** 19 | * @author Santhosh Kumar Tekuri 20 | */ 21 | public interface HTTPCallback{ 22 | public void completed(T exchange, Throwable thr); 23 | } 24 | -------------------------------------------------------------------------------- /nio/src/main/java/jlibs/nio/http/RequestListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * JLibs: Common Utilities for Java 3 | * Copyright (C) 2009 Santhosh Kumar T 4 | * 5 | * This library is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 2.1 of the License, or (at your option) any later version. 9 | * 10 | * This library is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | */ 15 | 16 | package jlibs.nio.http; 17 | 18 | /** 19 | * @author Santhosh Kumar Tekuri 20 | */ 21 | public interface RequestListener{ 22 | public boolean process(ServerExchange exchange) throws Exception; 23 | } 24 | -------------------------------------------------------------------------------- /nio/src/main/java/jlibs/nio/http/ResponseListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * JLibs: Common Utilities for Java 3 | * Copyright (C) 2009 Santhosh Kumar T 4 | * 5 | * This library is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 2.1 of the License, or (at your option) any later version. 9 | * 10 | * This library is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | */ 15 | 16 | package jlibs.nio.http; 17 | 18 | /** 19 | * @author Santhosh Kumar Tekuri 20 | */ 21 | public interface ResponseListener{ 22 | public void process(ClientExchange exchange, Throwable thr) throws Exception; 23 | } 24 | -------------------------------------------------------------------------------- /nio/src/main/java/jlibs/nio/http/ServerCallback.java: -------------------------------------------------------------------------------- 1 | /* 2 | * JLibs: Common Utilities for Java 3 | * Copyright (C) 2009 Santhosh Kumar T 4 | * 5 | * This library is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 2.1 of the License, or (at your option) any later version. 9 | * 10 | * This library is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | */ 15 | 16 | package jlibs.nio.http; 17 | 18 | /** 19 | * @author Santhosh Kumar Tekuri 20 | */ 21 | public interface ServerCallback{ 22 | public void completed(ServerExchange exchange, Throwable thr); 23 | } 24 | -------------------------------------------------------------------------------- /nio/src/main/java/jlibs/nio/http/ServerFilter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * JLibs: Common Utilities for Java 3 | * Copyright (C) 2009 Santhosh Kumar T 4 | * 5 | * This library is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 2.1 of the License, or (at your option) any later version. 9 | * 10 | * This library is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | */ 15 | 16 | package jlibs.nio.http; 17 | 18 | import jlibs.nio.Trace; 19 | 20 | import static jlibs.nio.Debugger.HTTP; 21 | 22 | /** 23 | * @author Santhosh Kumar Tekuri 24 | */ 25 | public interface ServerFilter{ 26 | @Trace(condition=HTTP, args="$2") 27 | public boolean filter(ServerExchange exchange, FilterType type) throws Exception; 28 | } 29 | -------------------------------------------------------------------------------- /nio/src/main/java/jlibs/nio/http/expr/Bean.java: -------------------------------------------------------------------------------- 1 | /* 2 | * JLibs: Common Utilities for Java 3 | * Copyright (C) 2009 Santhosh Kumar T 4 | * 5 | * This library is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 2.1 of the License, or (at your option) any later version. 9 | * 10 | * This library is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | */ 15 | 16 | package jlibs.nio.http.expr; 17 | 18 | /** 19 | * @author Santhosh Kumar Tekuri 20 | */ 21 | public interface Bean{ 22 | public Object getField(String name) throws UnresolvedException; 23 | } 24 | -------------------------------------------------------------------------------- /nio/src/main/java/jlibs/nio/http/expr/TypeConversion.java: -------------------------------------------------------------------------------- 1 | /* 2 | * JLibs: Common Utilities for Java 3 | * Copyright (C) 2009 Santhosh Kumar T 4 | * 5 | * This library is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 2.1 of the License, or (at your option) any later version. 9 | * 10 | * This library is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | */ 15 | 16 | package jlibs.nio.http.expr; 17 | 18 | /** 19 | * @author Santhosh Kumar Tekuri 20 | */ 21 | public class TypeConversion{ 22 | public static String toString(Object result){ 23 | return result==null ? null : result.toString(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /nio/src/main/java/jlibs/nio/http/expr/UnresolvedException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * JLibs: Common Utilities for Java 3 | * Copyright (C) 2009 Santhosh Kumar T 4 | * 5 | * This library is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 2.1 of the License, or (at your option) any later version. 9 | * 10 | * This library is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | */ 15 | 16 | package jlibs.nio.http.expr; 17 | 18 | /** 19 | * @author Santhosh Kumar Tekuri 20 | */ 21 | public class UnresolvedException extends RuntimeException{ 22 | public UnresolvedException(String name){ 23 | super(name); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /nio/src/main/java/jlibs/nio/http/expr/ValueMap.java: -------------------------------------------------------------------------------- 1 | /* 2 | * JLibs: Common Utilities for Java 3 | * Copyright (C) 2009 Santhosh Kumar T 4 | * 5 | * This library is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 2.1 of the License, or (at your option) any later version. 9 | * 10 | * This library is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | */ 15 | 16 | package jlibs.nio.http.expr; 17 | 18 | /** 19 | * @author Santhosh Kumar Tekuri 20 | */ 21 | public interface ValueMap{ 22 | public Object getValue(String name); 23 | } 24 | -------------------------------------------------------------------------------- /nio/src/main/java/jlibs/nio/http/filters/Authenticator.java: -------------------------------------------------------------------------------- 1 | /* 2 | * JLibs: Common Utilities for Java 3 | * Copyright (C) 2009 Santhosh Kumar T 4 | * 5 | * This library is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 2.1 of the License, or (at your option) any later version. 9 | * 10 | * This library is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | */ 15 | 16 | package jlibs.nio.http.filters; 17 | 18 | import jlibs.nio.http.ServerExchange; 19 | 20 | /** 21 | * @author Santhosh Kumar Tekuri 22 | */ 23 | public interface Authenticator{ 24 | public String getPassword(String user); 25 | public default void authorized(ServerExchange exchange, String user){} 26 | } 27 | -------------------------------------------------------------------------------- /nio/src/main/java/jlibs/nio/http/msg/DefaultPart.java: -------------------------------------------------------------------------------- 1 | /* 2 | * JLibs: Common Utilities for Java 3 | * Copyright (C) 2009 Santhosh Kumar T 4 | * 5 | * This library is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 2.1 of the License, or (at your option) any later version. 9 | * 10 | * This library is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | */ 15 | 16 | package jlibs.nio.http.msg; 17 | 18 | import jlibs.nio.util.Buffers; 19 | 20 | /** 21 | * @author Santhosh Kumar Tekuri 22 | */ 23 | public class DefaultPart extends Part{ 24 | public final Buffers buffers = new Buffers(); 25 | 26 | public DefaultPart(Headers headers){ 27 | super(headers); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /nio/src/main/java/jlibs/nio/http/msg/EmptyPayload.java: -------------------------------------------------------------------------------- 1 | /* 2 | * JLibs: Common Utilities for Java 3 | * Copyright (C) 2009 Santhosh Kumar T 4 | * 5 | * This library is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 2.1 of the License, or (at your option) any later version. 9 | * 10 | * This library is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | */ 15 | 16 | package jlibs.nio.http.msg; 17 | 18 | /** 19 | * @author Santhosh Kumar Tekuri 20 | */ 21 | public final class EmptyPayload extends Payload{ 22 | public static final EmptyPayload INSTANCE = new EmptyPayload(); 23 | 24 | private EmptyPayload(){ 25 | super((String)null); 26 | } 27 | 28 | @Override 29 | public long getContentLength(){ 30 | return 0L; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /nio/src/main/java/jlibs/nio/http/msg/EncodablePayload.java: -------------------------------------------------------------------------------- 1 | /* 2 | * JLibs: Common Utilities for Java 3 | * Copyright (C) 2009 Santhosh Kumar T 4 | * 5 | * This library is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 2.1 of the License, or (at your option) any later version. 9 | * 10 | * This library is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | */ 15 | 16 | package jlibs.nio.http.msg; 17 | 18 | import java.io.IOException; 19 | import java.io.OutputStream; 20 | 21 | /** 22 | * @author Santhosh Kumar Tekuri 23 | */ 24 | public abstract class EncodablePayload extends Payload{ 25 | protected EncodablePayload(String contentType){ 26 | super(contentType); 27 | } 28 | 29 | public abstract void writeTo(OutputStream out) throws IOException; 30 | } 31 | -------------------------------------------------------------------------------- /nio/src/main/java/jlibs/nio/http/msg/FilePart.java: -------------------------------------------------------------------------------- 1 | /* 2 | * JLibs: Common Utilities for Java 3 | * Copyright (C) 2009 Santhosh Kumar T 4 | * 5 | * This library is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 2.1 of the License, or (at your option) any later version. 9 | * 10 | * This library is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | */ 15 | 16 | package jlibs.nio.http.msg; 17 | 18 | import java.io.File; 19 | 20 | /** 21 | * @author Santhosh Kumar Tekuri 22 | */ 23 | public class FilePart extends Part{ 24 | public final File file; 25 | public FilePart(File file, Headers headers){ 26 | super(headers); 27 | this.file = file; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /nio/src/main/java/jlibs/nio/http/msg/FilePayload.java: -------------------------------------------------------------------------------- 1 | /* 2 | * JLibs: Common Utilities for Java 3 | * Copyright (C) 2009 Santhosh Kumar T 4 | * 5 | * This library is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 2.1 of the License, or (at your option) any later version. 9 | * 10 | * This library is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | */ 15 | 16 | package jlibs.nio.http.msg; 17 | 18 | import java.io.File; 19 | 20 | /** 21 | * @author Santhosh Kumar Tekuri 22 | */ 23 | public class FilePayload extends Payload{ 24 | public final File file; 25 | public FilePayload(String contentType, File file){ 26 | super(contentType); 27 | this.file = file; 28 | } 29 | 30 | @Override 31 | public long getContentLength(){ 32 | return file.length(); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /nio/src/main/java/jlibs/nio/http/util/IOFunction.java: -------------------------------------------------------------------------------- 1 | /* 2 | * JLibs: Common Utilities for Java 3 | * Copyright (C) 2009 Santhosh Kumar T 4 | * 5 | * This library is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 2.1 of the License, or (at your option) any later version. 9 | * 10 | * This library is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | */ 15 | 16 | package jlibs.nio.http.util; 17 | 18 | import java.io.IOException; 19 | 20 | /** 21 | * @author Santhosh Kumar Tekuri 22 | */ 23 | public interface IOFunction{ 24 | R apply(T t) throws IOException; 25 | } 26 | -------------------------------------------------------------------------------- /nio/src/main/java/jlibs/nio/listeners/InputException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * JLibs: Common Utilities for Java 3 | * Copyright (C) 2009 Santhosh Kumar T 4 | * 5 | * This library is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 2.1 of the License, or (at your option) any later version. 9 | * 10 | * This library is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | */ 15 | 16 | package jlibs.nio.listeners; 17 | 18 | import java.io.IOException; 19 | 20 | /** 21 | * @author Santhosh Kumar Tekuri 22 | */ 23 | public class InputException extends IOException{ 24 | public InputException(Throwable cause){ 25 | super(cause); 26 | } 27 | @Override public Throwable fillInStackTrace(){ return this; } 28 | } 29 | -------------------------------------------------------------------------------- /nio/src/main/java/jlibs/nio/listeners/OutputException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * JLibs: Common Utilities for Java 3 | * Copyright (C) 2009 Santhosh Kumar T 4 | * 5 | * This library is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 2.1 of the License, or (at your option) any later version. 9 | * 10 | * This library is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | */ 15 | 16 | package jlibs.nio.listeners; 17 | 18 | import java.io.IOException; 19 | 20 | /** 21 | * @author Santhosh Kumar Tekuri 22 | */ 23 | public class OutputException extends IOException{ 24 | public OutputException(Throwable cause){ 25 | super(cause); 26 | } 27 | @Override public Throwable fillInStackTrace(){ return this; } 28 | } 29 | -------------------------------------------------------------------------------- /nio/src/main/java/jlibs/nio/log/LogHandler.java: -------------------------------------------------------------------------------- 1 | /* 2 | * JLibs: Common Utilities for Java 3 | * Copyright (C) 2009 Santhosh Kumar T 4 | * 5 | * This library is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 2.1 of the License, or (at your option) any later version. 9 | * 10 | * This library is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | */ 15 | 16 | package jlibs.nio.log; 17 | 18 | /** 19 | * @author Santhosh Kumar Tekuri 20 | */ 21 | public interface LogHandler{ 22 | public void publish(LogRecord record); 23 | } 24 | -------------------------------------------------------------------------------- /nio/src/main/java/jlibs/nio/log/LogRecord.java: -------------------------------------------------------------------------------- 1 | /* 2 | * JLibs: Common Utilities for Java 3 | * Copyright (C) 2009 Santhosh Kumar T 4 | * 5 | * This library is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 2.1 of the License, or (at your option) any later version. 9 | * 10 | * This library is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | */ 15 | 16 | package jlibs.nio.log; 17 | 18 | import java.io.IOException; 19 | 20 | /** 21 | * @author Santhosh Kumar Tekuri 22 | */ 23 | public interface LogRecord{ 24 | public void publishTo(Appendable appendable) throws IOException; 25 | } 26 | -------------------------------------------------------------------------------- /nio/src/main/java/jlibs/nio/util/Parser.java: -------------------------------------------------------------------------------- 1 | /* 2 | * JLibs: Common Utilities for Java 3 | * Copyright (C) 2009 Santhosh Kumar T 4 | * 5 | * This library is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 2.1 of the License, or (at your option) any later version. 9 | * 10 | * This library is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | */ 15 | 16 | package jlibs.nio.util; 17 | 18 | import java.io.IOException; 19 | import java.nio.ByteBuffer; 20 | 21 | /** 22 | * @author Santhosh Kumar Tekuri 23 | */ 24 | public interface Parser{ 25 | public boolean parse(ByteBuffer buffer, boolean eof) throws IOException; 26 | public default void cleanup(){} 27 | } 28 | -------------------------------------------------------------------------------- /src/etc/header.txt: -------------------------------------------------------------------------------- 1 | Copyright 2015 Santhosh Kumar Tekuri 2 | 3 | The JLibs authors license this file to you under the Apache License, 4 | version 2.0 (the "License"); you may not use this file except in compliance 5 | with the License. You may obtain a copy of the License at: 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 11 | WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 12 | License for the specific language governing permissions and limitations 13 | under the License. 14 | -------------------------------------------------------------------------------- /src/main/javadoc/resources/prettify.css: -------------------------------------------------------------------------------- 1 | pre.prettyprint { 2 | margin-left: 2em; 3 | padding: 0.5em; 4 | border-left: 3px solid #ccc; 5 | } 6 | .prettyprint .str { color: #080; } 7 | .prettyprint .kwd { color: #008; } 8 | .prettyprint .com { color: #800; } 9 | .prettyprint .typ { color: #606; } 10 | .prettyprint .lit { color: #066; } 11 | .prettyprint .pun { color: #660; } 12 | .prettyprint .pln { color: #000; } 13 | .prettyprint .tag { color: #008; } 14 | .prettyprint .atn { color: #606; } 15 | .prettyprint .atv { color: #080; } 16 | .prettyprint .dec { color: #606; } 17 | -------------------------------------------------------------------------------- /swing/pom.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | in.jlibs 6 | jlibs-parent 7 | 3.0.1 8 | 9 | 10 | 4.0.0 11 | jlibs-swing 12 | jar 13 | 14 | swing 15 | Swing related Utilities 16 | 17 | 18 | in.jlibs.swing 19 | 20 | 21 | 22 | 23 | in.jlibs 24 | jlibs-xsd 25 | ${project.version} 26 | 27 | 28 | in.jlibs 29 | org-netbeans-swing-outline 30 | RELEASE65 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /swing/src/main/java/jlibs/swing/outline/Column.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2015 Santhosh Kumar Tekuri 3 | * 4 | * The JLibs authors license this file to you under the Apache License, 5 | * version 2.0 (the "License"); you may not use this file except in compliance 6 | * with the License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package jlibs.swing.outline; 18 | 19 | /** 20 | * @author Santhosh Kumar T 21 | */ 22 | public interface Column{ 23 | public String getColumnName(); 24 | public Class getColumnClass(); 25 | public Object getValueFor(Object obj); 26 | public boolean isCellEditable(Object obj); 27 | public void setValueFor(Object obj, Object value); 28 | } 29 | -------------------------------------------------------------------------------- /visitor/pom.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | in.jlibs 7 | jlibs-parent 8 | 3.0.1 9 | 10 | 11 | 4.0.0 12 | jlibs-visitor 13 | jar 14 | 15 | visitor 16 | Visitor Pattern using Annotations 17 | 18 | 19 | in.jlibs.visitor 20 | 21 | 22 | -------------------------------------------------------------------------------- /visitor/src/main/java/jlibs/core/graph/Visitor.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2015 Santhosh Kumar Tekuri 3 | * 4 | * The JLibs authors license this file to you under the Apache License, 5 | * version 2.0 (the "License"); you may not use this file except in compliance 6 | * with the License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package jlibs.core.graph; 18 | 19 | import java.lang.annotation.ElementType; 20 | import java.lang.annotation.Retention; 21 | import java.lang.annotation.RetentionPolicy; 22 | import java.lang.annotation.Target; 23 | 24 | /** 25 | * @author Santhosh Kumar T 26 | */ 27 | public interface Visitor{ 28 | public R visit(E elem); 29 | 30 | @Target(ElementType.TYPE) 31 | @Retention(RetentionPolicy.SOURCE) 32 | public static @interface Implement{} 33 | } 34 | -------------------------------------------------------------------------------- /wadl/bin/wadl-client.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | CALL %~p0launcher\jlaunch.bat %~p0examples.conf jlibs.wadl.cli.WADLTerminal %* 3 | -------------------------------------------------------------------------------- /wadl/bin/wadl-client.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | `dirname $0`/launcher/jlaunch.sh `dirname $0`/examples.conf jlibs.wadl.cli.WADLTerminal $* 4 | -------------------------------------------------------------------------------- /wadl/src/main/java/jlibs/wadl/cli/commands/Command.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2015 Santhosh Kumar Tekuri 3 | * 4 | * The JLibs authors license this file to you under the Apache License, 5 | * version 2.0 (the "License"); you may not use this file except in compliance 6 | * with the License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package jlibs.wadl.cli.commands; 18 | 19 | import jlibs.wadl.cli.WADLTerminal; 20 | 21 | import java.util.List; 22 | 23 | /** 24 | * @author Santhosh Kumar T 25 | */ 26 | public abstract class Command{ 27 | protected final WADLTerminal terminal; 28 | public Command(WADLTerminal terminal){ 29 | this.terminal = terminal; 30 | } 31 | 32 | public abstract boolean run(String cmd, List args) throws Exception; 33 | } 34 | -------------------------------------------------------------------------------- /wadl/src/main/java/jlibs/wadl/cli/commands/auth/Authenticator.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2015 Santhosh Kumar Tekuri 3 | * 4 | * The JLibs authors license this file to you under the Apache License, 5 | * version 2.0 (the "License"); you may not use this file except in compliance 6 | * with the License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package jlibs.wadl.cli.commands.auth; 18 | 19 | import java.net.HttpURLConnection; 20 | 21 | /** 22 | * @author Santhosh Kumar T 23 | */ 24 | public interface Authenticator{ 25 | String HEADER_AUTHORIZATION = "Authorization"; 26 | 27 | public void authenticate(HttpURLConnection con); 28 | } 29 | -------------------------------------------------------------------------------- /wadl/src/main/java/jlibs/wadl/cli/completors/CdCompletion.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2015 Santhosh Kumar Tekuri 3 | * 4 | * The JLibs authors license this file to you under the Apache License, 5 | * version 2.0 (the "License"); you may not use this file except in compliance 6 | * with the License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package jlibs.wadl.cli.completors; 18 | 19 | import jlibs.wadl.cli.WADLTerminal; 20 | 21 | /** 22 | * @author Santhosh Kumar T 23 | */ 24 | public class CdCompletion extends PathCompletion{ 25 | public CdCompletion(WADLTerminal terminal){ 26 | super(terminal); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /wadl/src/main/java/jlibs/wadl/model/package-info.java: -------------------------------------------------------------------------------- 1 | // 2 | // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6 3 | // See http://java.sun.com/xml/jaxb 4 | // Any modifications to this file will be lost upon recompilation of the source schema. 5 | // Generated on: 2012.02.03 at 05:17:30 PM GMT+05:30 6 | // 7 | 8 | @javax.xml.bind.annotation.XmlSchema(namespace = "http://wadl.dev.java.net/2009/02", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED) 9 | package jlibs.wadl.model; 10 | -------------------------------------------------------------------------------- /wamp4j-core/src/main/java/jlibs/wamp4j/ClientAuthentication.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2015 Santhosh Kumar Tekuri 3 | * 4 | * The JLibs authors license this file to you under the Apache License, 5 | * version 2.0 (the "License"); you may not use this file except in compliance 6 | * with the License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package jlibs.wamp4j; 18 | 19 | /** 20 | * applicable only to server-side 21 | * 22 | * @author Santhosh Kumar Tekuri 23 | */ 24 | public enum ClientAuthentication{ 25 | NONE, OPTIONAL, REQUIRE 26 | } 27 | -------------------------------------------------------------------------------- /wamp4j-core/src/main/java/jlibs/wamp4j/client/CallListener.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2015 Santhosh Kumar Tekuri 3 | * 4 | * The JLibs authors license this file to you under the Apache License, 5 | * version 2.0 (the "License"); you may not use this file except in compliance 6 | * with the License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package jlibs.wamp4j.client; 18 | 19 | import jlibs.wamp4j.msg.ResultMessage; 20 | 21 | /** 22 | * @author Santhosh Kumar Tekuri 23 | */ 24 | public interface CallListener extends WAMPListener{ 25 | public void onResult(WAMPClient client, ResultMessage result); 26 | } 27 | -------------------------------------------------------------------------------- /wamp4j-core/src/main/java/jlibs/wamp4j/client/PublishListener.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2015 Santhosh Kumar Tekuri 3 | * 4 | * The JLibs authors license this file to you under the Apache License, 5 | * version 2.0 (the "License"); you may not use this file except in compliance 6 | * with the License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package jlibs.wamp4j.client; 18 | 19 | /** 20 | * @author Santhosh Kumar Tekuri 21 | */ 22 | public interface PublishListener extends WAMPListener{ 23 | public void onPublish(WAMPClient client); 24 | } 25 | -------------------------------------------------------------------------------- /wamp4j-core/src/main/java/jlibs/wamp4j/client/SessionListener.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2015 Santhosh Kumar Tekuri 3 | * 4 | * The JLibs authors license this file to you under the Apache License, 5 | * version 2.0 (the "License"); you may not use this file except in compliance 6 | * with the License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package jlibs.wamp4j.client; 18 | 19 | /** 20 | * @author Santhosh Kumar Tekuri 21 | */ 22 | public interface SessionListener extends WAMPListener{ 23 | public void onConnecting(WAMPClient client); 24 | public void onOpen(WAMPClient client); 25 | public void onClose(WAMPClient client); 26 | public void onWarning(WAMPClient client, Throwable warning); 27 | } 28 | -------------------------------------------------------------------------------- /wamp4j-core/src/main/java/jlibs/wamp4j/client/UnregisterListener.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2015 Santhosh Kumar Tekuri 3 | * 4 | * The JLibs authors license this file to you under the Apache License, 5 | * version 2.0 (the "License"); you may not use this file except in compliance 6 | * with the License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package jlibs.wamp4j.client; 18 | 19 | /** 20 | * @author Santhosh Kumar Tekuri 21 | */ 22 | public abstract class UnregisterListener implements WAMPListener{ 23 | long registrationID; 24 | 25 | public abstract void onUnregister(WAMPClient client); 26 | } 27 | -------------------------------------------------------------------------------- /wamp4j-core/src/main/java/jlibs/wamp4j/client/WAMPListener.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2015 Santhosh Kumar Tekuri 3 | * 4 | * The JLibs authors license this file to you under the Apache License, 5 | * version 2.0 (the "License"); you may not use this file except in compliance 6 | * with the License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package jlibs.wamp4j.client; 18 | 19 | import jlibs.wamp4j.error.WAMPException; 20 | 21 | /** 22 | * @author Santhosh Kumar Tekuri 23 | */ 24 | public interface WAMPListener{ 25 | public void onError(WAMPClient client, WAMPException error); 26 | } 27 | -------------------------------------------------------------------------------- /wamp4j-core/src/main/java/jlibs/wamp4j/error/AuthorizationFailedException.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2015 Santhosh Kumar Tekuri 3 | * 4 | * The JLibs authors license this file to you under the Apache License, 5 | * version 2.0 (the "License"); you may not use this file except in compliance 6 | * with the License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package jlibs.wamp4j.error; 18 | 19 | /** 20 | * @author Santhosh Kumar Tekuri 21 | */ 22 | public class AuthorizationFailedException extends WAMPException{ 23 | AuthorizationFailedException(ErrorCode errorCode){ 24 | super(errorCode); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /wamp4j-core/src/main/java/jlibs/wamp4j/error/InvalidArgumentException.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2015 Santhosh Kumar Tekuri 3 | * 4 | * The JLibs authors license this file to you under the Apache License, 5 | * version 2.0 (the "License"); you may not use this file except in compliance 6 | * with the License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package jlibs.wamp4j.error; 18 | 19 | /** 20 | * @author Santhosh Kumar Tekuri 21 | */ 22 | public class InvalidArgumentException extends WAMPException{ 23 | InvalidArgumentException(ErrorCode errorCode){ 24 | super(errorCode); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /wamp4j-core/src/main/java/jlibs/wamp4j/error/InvalidMessageException.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2015 Santhosh Kumar Tekuri 3 | * 4 | * The JLibs authors license this file to you under the Apache License, 5 | * version 2.0 (the "License"); you may not use this file except in compliance 6 | * with the License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package jlibs.wamp4j.error; 18 | 19 | /** 20 | * @author Santhosh Kumar Tekuri 21 | */ 22 | public class InvalidMessageException extends WAMPException{ 23 | InvalidMessageException(ErrorCode errorCode){ 24 | super(errorCode); 25 | } 26 | 27 | public InvalidMessageException(){ 28 | this(ErrorCode.invalidMessage()); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /wamp4j-core/src/main/java/jlibs/wamp4j/error/InvalidURIException.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2015 Santhosh Kumar Tekuri 3 | * 4 | * The JLibs authors license this file to you under the Apache License, 5 | * version 2.0 (the "License"); you may not use this file except in compliance 6 | * with the License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package jlibs.wamp4j.error; 18 | 19 | /** 20 | * @author Santhosh Kumar Tekuri 21 | */ 22 | public class InvalidURIException extends WAMPException{ 23 | InvalidURIException(ErrorCode errorCode){ 24 | super(errorCode); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /wamp4j-core/src/main/java/jlibs/wamp4j/error/NoSuchProcedureException.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2015 Santhosh Kumar Tekuri 3 | * 4 | * The JLibs authors license this file to you under the Apache License, 5 | * version 2.0 (the "License"); you may not use this file except in compliance 6 | * with the License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package jlibs.wamp4j.error; 18 | 19 | /** 20 | * @author Santhosh Kumar Tekuri 21 | */ 22 | public class NoSuchProcedureException extends WAMPException{ 23 | NoSuchProcedureException(ErrorCode errorCode){ 24 | super(errorCode); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /wamp4j-core/src/main/java/jlibs/wamp4j/error/NoSuchRealmException.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2015 Santhosh Kumar Tekuri 3 | * 4 | * The JLibs authors license this file to you under the Apache License, 5 | * version 2.0 (the "License"); you may not use this file except in compliance 6 | * with the License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package jlibs.wamp4j.error; 18 | 19 | /** 20 | * @author Santhosh Kumar Tekuri 21 | */ 22 | public class NoSuchRealmException extends WAMPException{ 23 | NoSuchRealmException(ErrorCode errorCode){ 24 | super(errorCode); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /wamp4j-core/src/main/java/jlibs/wamp4j/error/NoSuchRegistrationException.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2015 Santhosh Kumar Tekuri 3 | * 4 | * The JLibs authors license this file to you under the Apache License, 5 | * version 2.0 (the "License"); you may not use this file except in compliance 6 | * with the License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package jlibs.wamp4j.error; 18 | 19 | /** 20 | * @author Santhosh Kumar Tekuri 21 | */ 22 | public class NoSuchRegistrationException extends WAMPException{ 23 | NoSuchRegistrationException(ErrorCode errorCode){ 24 | super(errorCode); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /wamp4j-core/src/main/java/jlibs/wamp4j/error/NoSuchRoleException.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2015 Santhosh Kumar Tekuri 3 | * 4 | * The JLibs authors license this file to you under the Apache License, 5 | * version 2.0 (the "License"); you may not use this file except in compliance 6 | * with the License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package jlibs.wamp4j.error; 18 | 19 | /** 20 | * @author Santhosh Kumar Tekuri 21 | */ 22 | public class NoSuchRoleException extends WAMPException{ 23 | NoSuchRoleException(ErrorCode errorCode){ 24 | super(errorCode); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /wamp4j-core/src/main/java/jlibs/wamp4j/error/NoSuchSubscriptionException.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2015 Santhosh Kumar Tekuri 3 | * 4 | * The JLibs authors license this file to you under the Apache License, 5 | * version 2.0 (the "License"); you may not use this file except in compliance 6 | * with the License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package jlibs.wamp4j.error; 18 | 19 | /** 20 | * @author Santhosh Kumar Tekuri 21 | */ 22 | public class NoSuchSubscriptionException extends WAMPException{ 23 | NoSuchSubscriptionException(ErrorCode errorCode){ 24 | super(errorCode); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /wamp4j-core/src/main/java/jlibs/wamp4j/error/NotAuthorizedException.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2015 Santhosh Kumar Tekuri 3 | * 4 | * The JLibs authors license this file to you under the Apache License, 5 | * version 2.0 (the "License"); you may not use this file except in compliance 6 | * with the License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package jlibs.wamp4j.error; 18 | 19 | /** 20 | * @author Santhosh Kumar Tekuri 21 | */ 22 | public class NotAuthorizedException extends WAMPException{ 23 | NotAuthorizedException(ErrorCode errorCode){ 24 | super(errorCode); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /wamp4j-core/src/main/java/jlibs/wamp4j/error/NotConnectedException.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2015 Santhosh Kumar Tekuri 3 | * 4 | * The JLibs authors license this file to you under the Apache License, 5 | * version 2.0 (the "License"); you may not use this file except in compliance 6 | * with the License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package jlibs.wamp4j.error; 18 | 19 | /** 20 | * @author Santhosh Kumar Tekuri 21 | */ 22 | public class NotConnectedException extends WAMPException{ 23 | NotConnectedException(ErrorCode errorCode){ 24 | super(errorCode); 25 | } 26 | 27 | public NotConnectedException(){ 28 | this(ErrorCode.notConnected()); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /wamp4j-core/src/main/java/jlibs/wamp4j/error/ProcedureAlreadyExistsException.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2015 Santhosh Kumar Tekuri 3 | * 4 | * The JLibs authors license this file to you under the Apache License, 5 | * version 2.0 (the "License"); you may not use this file except in compliance 6 | * with the License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package jlibs.wamp4j.error; 18 | 19 | /** 20 | * @author Santhosh Kumar Tekuri 21 | */ 22 | public class ProcedureAlreadyExistsException extends WAMPException{ 23 | ProcedureAlreadyExistsException(ErrorCode errorCode){ 24 | super(errorCode); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /wamp4j-core/src/main/java/jlibs/wamp4j/error/SerializationFailedException.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2015 Santhosh Kumar Tekuri 3 | * 4 | * The JLibs authors license this file to you under the Apache License, 5 | * version 2.0 (the "License"); you may not use this file except in compliance 6 | * with the License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package jlibs.wamp4j.error; 18 | 19 | /** 20 | * @author Santhosh Kumar Tekuri 21 | */ 22 | public class SerializationFailedException extends WAMPException{ 23 | SerializationFailedException(ErrorCode errorCode){ 24 | super(errorCode); 25 | } 26 | 27 | public SerializationFailedException(Throwable throwable){ 28 | this(ErrorCode.serializationFailed()); 29 | initCause(throwable); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /wamp4j-core/src/main/java/jlibs/wamp4j/error/SystemShutdownException.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2015 Santhosh Kumar Tekuri 3 | * 4 | * The JLibs authors license this file to you under the Apache License, 5 | * version 2.0 (the "License"); you may not use this file except in compliance 6 | * with the License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package jlibs.wamp4j.error; 18 | 19 | /** 20 | * @author Santhosh Kumar Tekuri 21 | */ 22 | public class SystemShutdownException extends WAMPException{ 23 | SystemShutdownException(ErrorCode errorCode){ 24 | super(errorCode); 25 | } 26 | 27 | public SystemShutdownException(){ 28 | this(ErrorCode.systemShutdown()); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /wamp4j-core/src/main/java/jlibs/wamp4j/error/UnexpectedException.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2015 Santhosh Kumar Tekuri 3 | * 4 | * The JLibs authors license this file to you under the Apache License, 5 | * version 2.0 (the "License"); you may not use this file except in compliance 6 | * with the License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package jlibs.wamp4j.error; 18 | 19 | /** 20 | * @author Santhosh Kumar Tekuri 21 | */ 22 | public class UnexpectedException extends WAMPException{ 23 | UnexpectedException(ErrorCode errorCode){ 24 | super(errorCode); 25 | } 26 | 27 | public UnexpectedException(Throwable throwable){ 28 | this(ErrorCode.unexpectedError()); 29 | initCause(throwable); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /wamp4j-core/src/main/java/jlibs/wamp4j/error/UnsupportedSerializationException.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2015 Santhosh Kumar Tekuri 3 | * 4 | * The JLibs authors license this file to you under the Apache License, 5 | * version 2.0 (the "License"); you may not use this file except in compliance 6 | * with the License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package jlibs.wamp4j.error; 18 | 19 | /** 20 | * @author Santhosh Kumar Tekuri 21 | */ 22 | public class UnsupportedSerializationException extends WAMPException{ 23 | UnsupportedSerializationException(ErrorCode errorCode){ 24 | super(errorCode); 25 | } 26 | 27 | public UnsupportedSerializationException(String serialization){ 28 | this(ErrorCode.unsupportedSerialization(serialization)); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /wamp4j-core/src/main/java/jlibs/wamp4j/error/WrongThreadException.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2015 Santhosh Kumar Tekuri 3 | * 4 | * The JLibs authors license this file to you under the Apache License, 5 | * version 2.0 (the "License"); you may not use this file except in compliance 6 | * with the License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package jlibs.wamp4j.error; 18 | 19 | /** 20 | * @author Santhosh Kumar Tekuri 21 | */ 22 | public class WrongThreadException extends WAMPException{ 23 | WrongThreadException(ErrorCode errorCode){ 24 | super(errorCode); 25 | } 26 | 27 | public WrongThreadException(){ 28 | this(ErrorCode.wrongThread()); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /wamp4j-core/src/main/java/jlibs/wamp4j/msg/Decoder.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2015 Santhosh Kumar Tekuri 3 | * 4 | * The JLibs authors license this file to you under the Apache License, 5 | * version 2.0 (the "License"); you may not use this file except in compliance 6 | * with the License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package jlibs.wamp4j.msg; 18 | 19 | import com.fasterxml.jackson.databind.node.ArrayNode; 20 | import jlibs.wamp4j.error.InvalidMessageException; 21 | 22 | /** 23 | * @author Santhosh Kumar Tekuri 24 | */ 25 | interface Decoder{ 26 | public WAMPMessage decode(ArrayNode array) throws InvalidMessageException; 27 | } 28 | -------------------------------------------------------------------------------- /wamp4j-core/src/main/java/jlibs/wamp4j/msg/RequestMessage.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2015 Santhosh Kumar Tekuri 3 | * 4 | * The JLibs authors license this file to you under the Apache License, 5 | * version 2.0 (the "License"); you may not use this file except in compliance 6 | * with the License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package jlibs.wamp4j.msg; 18 | 19 | import jlibs.wamp4j.error.ErrorCode; 20 | 21 | /** 22 | * @author Santhosh Kumar Tekuri 23 | */ 24 | public abstract class RequestMessage extends WAMPMessage{ 25 | public abstract long getRequestID(); 26 | 27 | public ErrorMessage error(ErrorCode errorCode){ 28 | return new ErrorMessage(getID(), getRequestID(), errorCode); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /wamp4j-core/src/main/java/jlibs/wamp4j/router/MetaProcedure.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2015 Santhosh Kumar Tekuri 3 | * 4 | * The JLibs authors license this file to you under the Apache License, 5 | * version 2.0 (the "License"); you may not use this file except in compliance 6 | * with the License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package jlibs.wamp4j.router; 18 | 19 | import jlibs.wamp4j.msg.CallMessage; 20 | 21 | /** 22 | * @author Santhosh Kumar Tekuri 23 | */ 24 | interface MetaProcedure{ 25 | public void reply(Session session, CallMessage call); 26 | } 27 | -------------------------------------------------------------------------------- /wamp4j-core/src/main/java/jlibs/wamp4j/router/RouterListener.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2015 Santhosh Kumar Tekuri 3 | * 4 | * The JLibs authors license this file to you under the Apache License, 5 | * version 2.0 (the "License"); you may not use this file except in compliance 6 | * with the License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package jlibs.wamp4j.router; 18 | 19 | /** 20 | * @author Santhosh Kumar Tekuri 21 | */ 22 | public interface RouterListener{ 23 | public void onBind(WAMPRouter router); 24 | public void onError(WAMPRouter router, Throwable error); 25 | public void onWarning(WAMPRouter router, Throwable error); 26 | public void onClose(WAMPRouter router); 27 | } 28 | -------------------------------------------------------------------------------- /wamp4j-core/src/main/java/jlibs/wamp4j/spi/AcceptListener.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2015 Santhosh Kumar Tekuri 3 | * 4 | * The JLibs authors license this file to you under the Apache License, 5 | * version 2.0 (the "License"); you may not use this file except in compliance 6 | * with the License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package jlibs.wamp4j.spi; 18 | 19 | /** 20 | * @author Santhosh Kumar Tekuri 21 | */ 22 | public interface AcceptListener{ 23 | public void onBind(WAMPServerEndPoint server); 24 | public void onAccept(WAMPSocket socket); 25 | public void onError(Throwable error); 26 | public void onClose(WAMPServerEndPoint server); 27 | } 28 | -------------------------------------------------------------------------------- /wamp4j-core/src/main/java/jlibs/wamp4j/spi/ConnectListener.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2015 Santhosh Kumar Tekuri 3 | * 4 | * The JLibs authors license this file to you under the Apache License, 5 | * version 2.0 (the "License"); you may not use this file except in compliance 6 | * with the License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package jlibs.wamp4j.spi; 18 | 19 | /** 20 | * @author Santhosh Kumar Tekuri 21 | */ 22 | public interface ConnectListener{ 23 | public void onConnect(WAMPSocket socket); 24 | public void onError(Throwable error); 25 | } 26 | -------------------------------------------------------------------------------- /wamp4j-core/src/main/java/jlibs/wamp4j/spi/Listener.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2015 Santhosh Kumar Tekuri 3 | * 4 | * The JLibs authors license this file to you under the Apache License, 5 | * version 2.0 (the "License"); you may not use this file except in compliance 6 | * with the License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package jlibs.wamp4j.spi; 18 | 19 | import java.io.InputStream; 20 | 21 | public interface Listener{ 22 | public void onMessage(WAMPSocket socket, MessageType type, InputStream is); 23 | public void onReadComplete(WAMPSocket socket); 24 | public void readyToWrite(WAMPSocket socket); 25 | public void onError(WAMPSocket socket, Throwable error); 26 | public void onClose(WAMPSocket socket); 27 | } 28 | -------------------------------------------------------------------------------- /wamp4j-core/src/main/java/jlibs/wamp4j/spi/MessageType.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2015 Santhosh Kumar Tekuri 3 | * 4 | * The JLibs authors license this file to you under the Apache License, 5 | * version 2.0 (the "License"); you may not use this file except in compliance 6 | * with the License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package jlibs.wamp4j.spi; 18 | 19 | /** 20 | * @author Santhosh Kumar Tekuri 21 | */ 22 | public enum MessageType{ 23 | text, binary 24 | } 25 | -------------------------------------------------------------------------------- /wamp4j-core/src/main/java/jlibs/wamp4j/spi/WAMPClientEndpoint.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2015 Santhosh Kumar Tekuri 3 | * 4 | * The JLibs authors license this file to you under the Apache License, 5 | * version 2.0 (the "License"); you may not use this file except in compliance 6 | * with the License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package jlibs.wamp4j.spi; 18 | 19 | import java.net.URI; 20 | 21 | /** 22 | * @author Santhosh Kumar Tekuri 23 | */ 24 | public interface WAMPClientEndpoint extends WAMPEndpoint{ 25 | public void connect(URI uri, ConnectListener listener, String... subProtocols); 26 | } 27 | -------------------------------------------------------------------------------- /wamp4j-core/src/main/java/jlibs/wamp4j/spi/WAMPEndpoint.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2015 Santhosh Kumar Tekuri 3 | * 4 | * The JLibs authors license this file to you under the Apache License, 5 | * version 2.0 (the "License"); you may not use this file except in compliance 6 | * with the License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package jlibs.wamp4j.spi; 18 | 19 | import jlibs.wamp4j.SSLSettings; 20 | 21 | /** 22 | * @author Santhosh Kumar Tekuri 23 | */ 24 | public interface WAMPEndpoint{ 25 | public void setSSLSettings(SSLSettings sslSettings); 26 | public boolean isEventLoop(); 27 | public void submit(Runnable r); 28 | public WAMPOutputStream createOutputStream(); 29 | } 30 | -------------------------------------------------------------------------------- /wamp4j-core/src/main/java/jlibs/wamp4j/spi/WAMPOutputStream.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2015 Santhosh Kumar Tekuri 3 | * 4 | * The JLibs authors license this file to you under the Apache License, 5 | * version 2.0 (the "License"); you may not use this file except in compliance 6 | * with the License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package jlibs.wamp4j.spi; 18 | 19 | import java.io.OutputStream; 20 | 21 | /** 22 | * @author Santhosh Kumar Tekuri 23 | */ 24 | public abstract class WAMPOutputStream extends OutputStream{ 25 | public abstract void release(); 26 | public abstract WAMPOutputStream duplicate(); 27 | } 28 | -------------------------------------------------------------------------------- /wamp4j-core/src/main/java/jlibs/wamp4j/spi/WAMPServerEndPoint.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2015 Santhosh Kumar Tekuri 3 | * 4 | * The JLibs authors license this file to you under the Apache License, 5 | * version 2.0 (the "License"); you may not use this file except in compliance 6 | * with the License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package jlibs.wamp4j.spi; 18 | 19 | import java.net.URI; 20 | 21 | /** 22 | * @author Santhosh Kumar Tekuri 23 | */ 24 | public interface WAMPServerEndPoint extends WAMPEndpoint{ 25 | public void bind(URI uri, String subProtocols[], AcceptListener listener); 26 | public void close(); 27 | } 28 | -------------------------------------------------------------------------------- /wamp4j-netty/src/test/resources/log4j.properties: -------------------------------------------------------------------------------- 1 | # Set root logger 2 | log4j.rootLogger=INFO, console 3 | 4 | # Add log messages to console 5 | log4j.appender.console=org.apache.log4j.ConsoleAppender 6 | log4j.appender.console.Target=System.out 7 | log4j.appender.console.layout=org.apache.log4j.PatternLayout 8 | log4j.appender.console.layout.ConversionPattern=%m%n 9 | 10 | #log4j.logger.jlibs.wamp4j=TRACE -------------------------------------------------------------------------------- /wiki/Ansi1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/santhosh-tekuri/jlibs/3fc29d2616be6b232aa82fa3c36b02779ef83389/wiki/Ansi1.png -------------------------------------------------------------------------------- /wiki/Ansi2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/santhosh-tekuri/jlibs/3fc29d2616be6b232aa82fa3c36b02779ef83389/wiki/Ansi2.png -------------------------------------------------------------------------------- /wiki/new.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/santhosh-tekuri/jlibs/3fc29d2616be6b232aa82fa3c36b02779ef83389/wiki/new.gif -------------------------------------------------------------------------------- /wiki/new.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/santhosh-tekuri/jlibs/3fc29d2616be6b232aa82fa3c36b02779ef83389/wiki/new.png -------------------------------------------------------------------------------- /wiki/updated.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/santhosh-tekuri/jlibs/3fc29d2616be6b232aa82fa3c36b02779ef83389/wiki/updated.gif -------------------------------------------------------------------------------- /xml-binding-apt/src/main/java/jlibs/xml/sax/binding/impl/processor/BindingError.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2015 Santhosh Kumar Tekuri 3 | * 4 | * The JLibs authors license this file to you under the Apache License, 5 | * version 2.0 (the "License"); you may not use this file except in compliance 6 | * with the License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package jlibs.xml.sax.binding.impl.processor; 18 | 19 | /** 20 | * @author Santhosh Kumar T 21 | */ 22 | public class BindingError{ 23 | } 24 | -------------------------------------------------------------------------------- /xml-binding/pom.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | in.jlibs 6 | jlibs-parent 7 | 3.0.1 8 | 9 | 10 | 4.0.0 11 | jlibs-xml-binding 12 | jar 13 | 14 | xml-binding 15 | SAX-JAVA Binding Made Easier 16 | 17 | 18 | in.jlibs.xml.binding 19 | 20 | 21 | 22 | 23 | in.jlibs 24 | jlibs-xml 25 | ${project.version} 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /xml-binding/src/main/java/jlibs/xml/sax/binding/Attr.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2015 Santhosh Kumar Tekuri 3 | * 4 | * The JLibs authors license this file to you under the Apache License, 5 | * version 2.0 (the "License"); you may not use this file except in compliance 6 | * with the License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package jlibs.xml.sax.binding; 18 | 19 | import java.lang.annotation.ElementType; 20 | import java.lang.annotation.Retention; 21 | import java.lang.annotation.RetentionPolicy; 22 | import java.lang.annotation.Target; 23 | 24 | /** 25 | * @author Santhosh Kumar T 26 | */ 27 | @Target(ElementType.PARAMETER) 28 | @Retention(RetentionPolicy.SOURCE) 29 | public @interface Attr{ 30 | public String value() default ""; 31 | } 32 | -------------------------------------------------------------------------------- /xml-binding/src/main/java/jlibs/xml/sax/binding/BindingListener.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2015 Santhosh Kumar Tekuri 3 | * 4 | * The JLibs authors license this file to you under the Apache License, 5 | * version 2.0 (the "License"); you may not use this file except in compliance 6 | * with the License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package jlibs.xml.sax.binding; 18 | 19 | import org.xml.sax.SAXException; 20 | 21 | /** 22 | * @author Santhosh Kumar T 23 | */ 24 | public interface BindingListener{ 25 | /** 26 | * called when binding for an element is not found 27 | */ 28 | public void unresolvedElement(SAXContext context) throws SAXException; 29 | } 30 | -------------------------------------------------------------------------------- /xml-binding/src/main/java/jlibs/xml/sax/binding/Current.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2015 Santhosh Kumar Tekuri 3 | * 4 | * The JLibs authors license this file to you under the Apache License, 5 | * version 2.0 (the "License"); you may not use this file except in compliance 6 | * with the License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package jlibs.xml.sax.binding; 18 | 19 | import java.lang.annotation.ElementType; 20 | import java.lang.annotation.Retention; 21 | import java.lang.annotation.RetentionPolicy; 22 | import java.lang.annotation.Target; 23 | 24 | /** 25 | * @author Santhosh Kumar T 26 | */ 27 | @Target(ElementType.PARAMETER) 28 | @Retention(RetentionPolicy.SOURCE) 29 | public @interface Current{ 30 | } -------------------------------------------------------------------------------- /xml-binding/src/main/java/jlibs/xml/sax/binding/Entry.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2015 Santhosh Kumar Tekuri 3 | * 4 | * The JLibs authors license this file to you under the Apache License, 5 | * version 2.0 (the "License"); you may not use this file except in compliance 6 | * with the License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package jlibs.xml.sax.binding; 18 | 19 | import java.lang.annotation.ElementType; 20 | import java.lang.annotation.Retention; 21 | import java.lang.annotation.RetentionPolicy; 22 | import java.lang.annotation.Target; 23 | 24 | /** 25 | * @author Santhosh Kumar T 26 | */ 27 | @Target({}) 28 | @Retention(RetentionPolicy.RUNTIME) 29 | public @interface Entry{ 30 | public String prefix(); 31 | public String uri(); 32 | } 33 | -------------------------------------------------------------------------------- /xml-binding/src/main/java/jlibs/xml/sax/binding/NamespaceContext.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2015 Santhosh Kumar Tekuri 3 | * 4 | * The JLibs authors license this file to you under the Apache License, 5 | * version 2.0 (the "License"); you may not use this file except in compliance 6 | * with the License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package jlibs.xml.sax.binding; 18 | 19 | import java.lang.annotation.ElementType; 20 | import java.lang.annotation.Retention; 21 | import java.lang.annotation.RetentionPolicy; 22 | import java.lang.annotation.Target; 23 | 24 | /** 25 | * @author Santhosh Kumar T 26 | */ 27 | @Target(ElementType.TYPE) 28 | @Retention(RetentionPolicy.RUNTIME) 29 | public @interface NamespaceContext{ 30 | public Entry[] value(); 31 | } 32 | -------------------------------------------------------------------------------- /xml-binding/src/main/java/jlibs/xml/sax/binding/Parent.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2015 Santhosh Kumar Tekuri 3 | * 4 | * The JLibs authors license this file to you under the Apache License, 5 | * version 2.0 (the "License"); you may not use this file except in compliance 6 | * with the License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package jlibs.xml.sax.binding; 18 | 19 | import java.lang.annotation.ElementType; 20 | import java.lang.annotation.Retention; 21 | import java.lang.annotation.RetentionPolicy; 22 | import java.lang.annotation.Target; 23 | 24 | /** 25 | * @author Santhosh Kumar T 26 | */ 27 | @Target(ElementType.PARAMETER) 28 | @Retention(RetentionPolicy.SOURCE) 29 | public @interface Parent{ 30 | } 31 | -------------------------------------------------------------------------------- /xml-binding/src/main/java/jlibs/xml/sax/binding/impl/TextBinding.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2015 Santhosh Kumar Tekuri 3 | * 4 | * The JLibs authors license this file to you under the Apache License, 5 | * version 2.0 (the "License"); you may not use this file except in compliance 6 | * with the License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package jlibs.xml.sax.binding.impl; 18 | 19 | import jlibs.xml.sax.binding.SAXContext; 20 | 21 | /** 22 | * @author Santhosh Kumar T 23 | */ 24 | public final class TextBinding extends Binding{ 25 | public static final TextBinding INSTANCE = new TextBinding(); 26 | private TextBinding(){} 27 | 28 | @Override 29 | public void text(int state, SAXContext current, String text){ 30 | current.object = text; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /xml-crawler/pom.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | in.jlibs 6 | jlibs-parent 7 | 3.0.1 8 | 9 | 10 | 4.0.0 11 | jlibs-xml-crawler 12 | jar 13 | 14 | xml-crawler 15 | Crawl XML(wsdl, xsd, xsl) documents 16 | 17 | 18 | in.jlibs.xml.crawler 19 | 20 | 21 | 22 | 23 | in.jlibs 24 | jlibs-xml 25 | ${project.version} 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /xml-crawler/src/main/java/jlibs/xml/sax/crawl/CrawlerListener.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2015 Santhosh Kumar Tekuri 3 | * 4 | * The JLibs authors license this file to you under the Apache License, 5 | * version 2.0 (the "License"); you may not use this file except in compliance 6 | * with the License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package jlibs.xml.sax.crawl; 18 | 19 | import java.io.File; 20 | import java.net.URL; 21 | 22 | /** 23 | * @author Santhosh Kumar T 24 | */ 25 | public interface CrawlerListener{ 26 | public boolean doCrawl(URL url); 27 | public File toFile(URL url, String extension); 28 | } 29 | -------------------------------------------------------------------------------- /xml-nbp/conformance/exclude.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/santhosh-tekuri/jlibs/3fc29d2616be6b232aa82fa3c36b02779ef83389/xml-nbp/conformance/exclude.txt -------------------------------------------------------------------------------- /xml-nbp/conformance/include1.0.xsl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /xml-nbp/conformance/report.xsl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Total : 6 | Passed : 7 | Failed : 8 | 9 | -------------------------------------------------------------------------------- /xml-nbp/src/main/java/jlibs/xml/sax/async/AttributeValueType.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2015 Santhosh Kumar Tekuri 3 | * 4 | * The JLibs authors license this file to you under the Apache License, 5 | * version 2.0 (the "License"); you may not use this file except in compliance 6 | * with the License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package jlibs.xml.sax.async; 18 | 19 | /** 20 | * @author Santhosh Kumar T 21 | */ 22 | public enum AttributeValueType{ 23 | DEFAULT(null), 24 | REQUIRED("#REQUIRED"), 25 | IMPLIED("#REQUIRED"), 26 | FIXED("#FIXED"); 27 | 28 | public final String mode; 29 | AttributeValueType(String mode){ 30 | this.mode = mode; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /xml-nbp/xml.properties: -------------------------------------------------------------------------------- 1 | #Properties for xml.syntax 2 | #Mon Oct 25 19:30:54 IST 2010 3 | 4 | PARSER_CLASS_NAME=jlibs.xml.sax.async.XMLScanner 5 | HANDLER_CLASS_NAME=jlibs.xml.sax.async.AsyncXMLReader 6 | -------------------------------------------------------------------------------- /xml/pom.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | in.jlibs 6 | jlibs-parent 7 | 3.0.1 8 | 9 | 10 | 4.0.0 11 | jlibs-xml 12 | jar 13 | 14 | xml 15 | XML related Utilities 16 | 17 | 18 | in.jlibs.xml 19 | 20 | 21 | 22 | 23 | in.jlibs 24 | jlibs-core 25 | ${project.version} 26 | 27 | 28 | xmlunit 29 | xmlunit 30 | 1.6 31 | test 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /xml/src/test/resources/soap11-default.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IBM 6 | 7 | 8 | -------------------------------------------------------------------------------- /xml/src/test/resources/soap11.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IBM 6 | 7 | 8 | -------------------------------------------------------------------------------- /xml/src/test/resources/soap12.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | IBM 5 | 6 | 7 | -------------------------------------------------------------------------------- /xmldog/src/main/java/jlibs/xml/sax/dog/expr/EvaluationListener.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2015 Santhosh Kumar Tekuri 3 | * 4 | * The JLibs authors license this file to you under the Apache License, 5 | * version 2.0 (the "License"); you may not use this file except in compliance 6 | * with the License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package jlibs.xml.sax.dog.expr; 18 | 19 | /** 20 | * @author Santhosh Kumar T 21 | */ 22 | public abstract class EvaluationListener{ 23 | public boolean disposed; 24 | public abstract void finished(Evaluation evaluation); 25 | } 26 | -------------------------------------------------------------------------------- /xmldog/src/main/java/jlibs/xml/sax/dog/expr/EvaluationScope.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2015 Santhosh Kumar Tekuri 3 | * 4 | * The JLibs authors license this file to you under the Apache License, 5 | * version 2.0 (the "License"); you may not use this file except in compliance 6 | * with the License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package jlibs.xml.sax.dog.expr; 18 | 19 | /** 20 | * @author Santhosh Kumar T 21 | */ 22 | public interface EvaluationScope{ 23 | public static final int GLOBAL = 0; 24 | public static final int DOCUMENT = 1; 25 | public static final int LOCAL = 2; 26 | } 27 | -------------------------------------------------------------------------------- /xmldog/src/main/java/jlibs/xml/sax/dog/expr/LinkableEvaluation.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2015 Santhosh Kumar Tekuri 3 | * 4 | * The JLibs authors license this file to you under the Apache License, 5 | * version 2.0 (the "License"); you may not use this file except in compliance 6 | * with the License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package jlibs.xml.sax.dog.expr; 18 | 19 | /** 20 | * @author Santhosh Kumar T 21 | */ 22 | public abstract class LinkableEvaluation extends Evaluation{ 23 | public LinkableEvaluation previous, next; 24 | 25 | public LinkableEvaluation(X expression, long order){ 26 | super(expression, order); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /xmldog/src/main/java/jlibs/xml/sax/dog/expr/nodset/Last.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2015 Santhosh Kumar Tekuri 3 | * 4 | * The JLibs authors license this file to you under the Apache License, 5 | * version 2.0 (the "License"); you may not use this file except in compliance 6 | * with the License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package jlibs.xml.sax.dog.expr.nodset; 18 | 19 | /** 20 | * @author Santhosh Kumar T 21 | */ 22 | public final class Last extends Positional{ 23 | public Last(){ 24 | super(false); 25 | } 26 | 27 | @Override 28 | public String toString(){ 29 | return "last()"; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /xmldog/src/main/java/jlibs/xml/sax/dog/expr/nodset/NodeSetListener.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2015 Santhosh Kumar Tekuri 3 | * 4 | * The JLibs authors license this file to you under the Apache License, 5 | * version 2.0 (the "License"); you may not use this file except in compliance 6 | * with the License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package jlibs.xml.sax.dog.expr.nodset; 18 | 19 | /** 20 | * @author Santhosh Kumar T 21 | */ 22 | public interface NodeSetListener{ 23 | public void mayHit(); 24 | public void discard(long order); 25 | public void finished(); 26 | 27 | public interface Support{ 28 | public void setNodeSetListener(NodeSetListener nodeSetListener); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /xsd/pom.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | in.jlibs 6 | jlibs-parent 7 | 3.0.1 8 | 9 | 10 | 4.0.0 11 | jlibs-xsd 12 | jar 13 | 14 | xsd 15 | XSD related Utilities 16 | 17 | 18 | in.jlibs.xsd 19 | 20 | 21 | 22 | 23 | in.jlibs 24 | jlibs-xml 25 | ${project.version} 26 | 27 | 28 | xerces 29 | xercesImpl 30 | 2.12.0 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /xsd/xsds/a.xsd: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /xsd/xsds/cust.xsd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /xsd/xsds/imports/b.xsd: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /xsd/xsds/imports/c.xsd: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /xsd/xsds/ord1.xsd: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /xsd/xsds/ord2.xsd: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /xsd/xsds/prod.xsd: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | --------------------------------------------------------------------------------