Skip to content

Commit 48592ad

Browse files
committed
1 parent c5223ef commit 48592ad

File tree

65 files changed

+241
-841
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+241
-841
lines changed

LICENSE.txt

Lines changed: 24 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,26 @@
1+
phpcr-utils is dual licensed under the MIT license and the Apache License Version 2.0.
2+
3+
The MIT License (MIT)
4+
5+
Copyright (c) 2013 Liip and others
6+
7+
Permission is hereby granted, free of charge, to any person obtaining a copy of
8+
this software and associated documentation files (the "Software"), to deal in
9+
the Software without restriction, including without limitation the rights to
10+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
11+
the Software, and to permit persons to whom the Software is furnished to do so,
12+
subject to the following conditions:
13+
14+
The above copyright notice and this permission notice shall be included in all
15+
copies or substantial portions of the Software.
16+
17+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
19+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
20+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
21+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
22+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23+
124

225
Apache License
326
Version 2.0, January 2004
@@ -187,7 +210,7 @@
187210
same "printed page" as the copyright notice for easier
188211
identification within third-party archives.
189212

190-
Copyright [yyyy] [name of copyright owner]
213+
Copyright 2010-2013 Liip and others
191214

192215
Licensed under the Apache License, Version 2.0 (the "License");
193216
you may not use this file except in compliance with the License.
@@ -200,65 +223,3 @@
200223
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201224
See the License for the specific language governing permissions and
202225
limitations under the License.
203-
204-
205-
APACHE JACKRABBIT SUBCOMPONENTS
206-
207-
Apache Jackrabbit includes parts with separate copyright notices and license
208-
terms. Your use of these subcomponents is subject to the terms and conditions
209-
of the following licenses:
210-
211-
XPath 2.0/XQuery 1.0 Parser:
212-
http://www.w3.org/2002/11/xquery-xpath-applets/xgrammar.zip
213-
214-
Copyright (C) 2002 World Wide Web Consortium, (Massachusetts Institute of
215-
Technology, European Research Consortium for Informatics and Mathematics,
216-
Keio University). All Rights Reserved.
217-
218-
This work is distributed under the W3C(R) Software License in the hope
219-
that it will be useful, but WITHOUT ANY WARRANTY; without even the
220-
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
221-
222-
W3C(R) SOFTWARE NOTICE AND LICENSE
223-
http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
224-
225-
This work (and included software, documentation such as READMEs, or
226-
other related items) is being provided by the copyright holders under
227-
the following license. By obtaining, using and/or copying this work,
228-
you (the licensee) agree that you have read, understood, and will comply
229-
with the following terms and conditions.
230-
231-
Permission to copy, modify, and distribute this software and its
232-
documentation, with or without modification, for any purpose and
233-
without fee or royalty is hereby granted, provided that you include
234-
the following on ALL copies of the software and documentation or
235-
portions thereof, including modifications:
236-
237-
1. The full text of this NOTICE in a location viewable to users
238-
of the redistributed or derivative work.
239-
240-
2. Any pre-existing intellectual property disclaimers, notices,
241-
or terms and conditions. If none exist, the W3C Software Short
242-
Notice should be included (hypertext is preferred, text is
243-
permitted) within the body of any redistributed or derivative code.
244-
245-
3. Notice of any changes or modifications to the files, including
246-
the date changes were made. (We recommend you provide URIs to the
247-
location from which the code is derived.)
248-
249-
THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT
250-
HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED,
251-
INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS
252-
FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE OR
253-
DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS,
254-
TRADEMARKS OR OTHER RIGHTS.
255-
256-
COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL
257-
OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR
258-
DOCUMENTATION.
259-
260-
The name and trademarks of copyright holders may NOT be used in
261-
advertising or publicity pertaining to the software without specific,
262-
written prior permission. Title to copyright in this software and
263-
any associated documentation will at all times remain with
264-
copyright holders.

README.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,12 @@ If you are using or implementing [PHPCR](https://github.com/phpcr/phpcr) you
66
probably want some of the things in here.
77

88
PHPCR Users: Note that your PHPCR implementation probably already bundles the
9-
utils. Jackalope for example depends on them and they are found in its
10-
lib/phpcr-utils folder.
9+
utils.
10+
11+
## License
12+
13+
This code is dual licensed under the MIT license and the Apache License Version
14+
2.0. Please see the file LICENSE in this folder.
1115

1216

1317
# Documentation
@@ -18,7 +22,7 @@ classes for common tasks.
1822

1923
## Commands
2024

21-
There are a couple of useful commands to interact with a phpcr repository.
25+
There are a couple of useful commands to interact with a PHPCR repository.
2226

2327
To use the console, make sure you have initialized the git submodules of
2428
phpcr-utils, then copy cli-config.php.dist to cli-config.php and adjust it
@@ -76,4 +80,3 @@ into QOM . ``QomToSql2QueryConverter`` generates SQL2 out of a QOM.
7680
This ``ItemVisitorInterface`` implementation is a basic implementation of crawling
7781
a PHPCR tree. You can extend it to define what it should do while crawling the
7882
tree.
79-

composer.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@
44
"description": "PHP Content Repository implementation independant utilities",
55
"keywords": ["phpcr", "contentrepository", "cli"],
66
"homepage": "http://phpcr.github.com",
7-
"license": "Apache-2.0",
7+
"license": [
8+
"MIT",
9+
"Apache-2.0"
10+
],
811
"authors": [
912
{
1013
"name": "David Buchmann",

src/PHPCR/Util/CND/Exception/ParserException.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,15 @@
22

33
namespace PHPCR\Util\CND\Exception;
44

5-
use PHPCR\Util\CND\Scanner\TokenQueue,
6-
PHPCR\Util\CND\Scanner\GenericToken;
5+
use PHPCR\Util\CND\Scanner\TokenQueue;
6+
use PHPCR\Util\CND\Scanner\GenericToken;
77

88
/**
99
* @author Daniel Barsotti <daniel.barsotti@liip.ch>
10+
*
11+
* @license http://www.apache.org/licenses Apache License Version 2.0, January 2004
12+
* @license http://opensource.org/licenses/MIT MIT License
13+
*
1014
*/
1115
class ParserException extends \Exception
1216
{

src/PHPCR/Util/CND/Exception/ScannerException.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
use PHPCR\Util\CND\Reader\ReaderInterface;
66

77
/**
8+
* @license http://www.apache.org/licenses Apache License Version 2.0, January 2004
9+
* @license http://opensource.org/licenses/MIT MIT License
10+
*
811
* @author Daniel Barsotti <daniel.barsotti@liip.ch>
912
*/
1013
class ScannerException extends \Exception

src/PHPCR/Util/CND/Parser/AbstractParser.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
* - expectToken - expect the next token to match
1616
* - checkAndExpectToken - check and then expect the next token to match
1717
*
18+
* @license http://www.apache.org/licenses Apache License Version 2.0, January 2004
19+
* @license http://opensource.org/licenses/MIT MIT License
20+
*
1821
* @author Daniel Barsotti <daniel.barsotti@liip.ch>
1922
*/
2023
abstract class AbstractParser

src/PHPCR/Util/CND/Parser/CndParser.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@
2727
* @see http://www.day.com/specs/jcr/2.0/25_Appendix.html#25.2.3 CND Grammar
2828
* @see http://jackrabbit.apache.org/node-type-notation.html
2929
*
30+
* @license http://www.apache.org/licenses Apache License Version 2.0, January 2004
31+
* @license http://opensource.org/licenses/MIT MIT License
32+
*
3033
* @author Daniel Barsotti <daniel.barsotti@liip.ch>
3134
* @author David Buchmann <david@liip.ch>
3235
*/

src/PHPCR/Util/CND/Reader/BufferReader.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
namespace PHPCR\Util\CND\Reader;
44

55
/**
6+
* @license http://www.apache.org/licenses Apache License Version 2.0, January 2004
7+
* @license http://opensource.org/licenses/MIT MIT License
8+
*
69
* @author Daniel Barsotti <daniel.barsotti@liip.ch>
710
* @author Nikola Petkanski <nikola@petkanski.com>
811
*/

src/PHPCR/Util/CND/Reader/FileReader.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
namespace PHPCR\Util\CND\Reader;
44

55
/**
6+
* @license http://www.apache.org/licenses Apache License Version 2.0, January 2004
7+
* @license http://opensource.org/licenses/MIT MIT License
8+
*
69
* @author Daniel Barsotti <daniel.barsotti@liip.ch>
710
* @author Nikola Petkanski <nikola@petkanski.com>
811
*/

src/PHPCR/Util/CND/Reader/ReaderInterface.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
namespace PHPCR\Util\CND\Reader;
44

55
/**
6+
* @license http://www.apache.org/licenses Apache License Version 2.0, January 2004
7+
* @license http://opensource.org/licenses/MIT MIT License
8+
*
69
* @author Daniel Barsotti <daniel.barsotti@liip.ch>
710
*/
811
interface ReaderInterface

src/PHPCR/Util/CND/Scanner/AbstractScanner.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
use PHPCR\Util\CND\Reader\ReaderInterface;
66

77
/**
8+
* @license http://www.apache.org/licenses Apache License Version 2.0, January 2004
9+
* @license http://opensource.org/licenses/MIT MIT License
10+
*
811
* @author Daniel Barsotti <daniel.barsotti@liip.ch>
912
*/
1013
abstract class AbstractScanner

src/PHPCR/Util/CND/Scanner/Context/DefaultScannerContext.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
use PHPCR\Util\CND\Scanner\TokenFilter\TokenFilterInterface;
66

77
/**
8+
* @license http://www.apache.org/licenses Apache License Version 2.0, January 2004
9+
* @license http://opensource.org/licenses/MIT MIT License
10+
*
811
* @author Daniel Barsotti <daniel.barsotti@liip.ch>
912
*/
1013
class DefaultScannerContext extends ScannerContext

src/PHPCR/Util/CND/Scanner/Context/DefaultScannerContextWithoutSpacesAndComments.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
use PHPCR\Util\CND\Scanner\TokenFilter;
66

77
/**
8+
* @license http://www.apache.org/licenses Apache License Version 2.0, January 2004
9+
* @license http://opensource.org/licenses/MIT MIT License
10+
*
811
* @author Daniel Barsotti <daniel.barsotti@liip.ch>
912
*/
1013
class DefaultScannerContextWithoutSpacesAndComments extends DefaultScannerContext
@@ -17,5 +20,5 @@ public function __construct()
1720
$this->addTokenFilter(new TokenFilter\NoWhitespacesFilter());
1821
$this->addTokenFilter(new TokenFilter\NoCommentsFilter());
1922
}
20-
23+
2124
}

src/PHPCR/Util/CND/Scanner/Context/ScannerContext.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
use PHPCR\Util\CND\Scanner\TokenFilter\TokenFilterInterface;
66

77
/**
8+
* @license http://www.apache.org/licenses Apache License Version 2.0, January 2004
9+
* @license http://opensource.org/licenses/MIT MIT License
10+
*
811
* @author Daniel Barsotti <daniel.barsotti@liip.ch>
912
*/
1013
class ScannerContext

src/PHPCR/Util/CND/Scanner/GenericScanner.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
* This class can be extended and the class properties redefined in order to adapt
1212
* the token generation to your needs.
1313
*
14+
* @license http://www.apache.org/licenses Apache License Version 2.0, January 2004
15+
* @license http://opensource.org/licenses/MIT MIT License
16+
*
1417
* @author Daniel Barsotti <daniel.barsotti@liip.ch>
1518
* @author Nikola Petkanski <nikola@petkanski.com>
1619
*/

src/PHPCR/Util/CND/Scanner/GenericToken.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
namespace PHPCR\Util\CND\Scanner;
44

55
/**
6+
* @license http://www.apache.org/licenses Apache License Version 2.0, January 2004
7+
* @license http://opensource.org/licenses/MIT MIT License
8+
*
69
* @author Daniel Barsotti <daniel.barsotti@liip.ch>
710
*/
811
class GenericToken extends Token

src/PHPCR/Util/CND/Scanner/Token.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
*
88
* Unless you want to redefine the token type constants, you should rather use GenericToken.
99
*
10+
* @license http://www.apache.org/licenses Apache License Version 2.0, January 2004
11+
* @license http://opensource.org/licenses/MIT MIT License
12+
*
1013
* @author Daniel Barsotti <daniel.barsotti@liip.ch>
1114
*/
1215
class Token

src/PHPCR/Util/CND/Scanner/TokenFilter/NoCommentsFilter.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
use PHPCR\Util\CND\Scanner\GenericToken;
66

77
/**
8+
* @license http://www.apache.org/licenses Apache License Version 2.0, January 2004
9+
* @license http://opensource.org/licenses/MIT MIT License
10+
*
811
* @author Daniel Barsotti <daniel.barsotti@liip.ch>
912
*/
1013
class NoCommentsFilter extends TokenTypeFilter

src/PHPCR/Util/CND/Scanner/TokenFilter/NoNewlinesFilter.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
use PHPCR\Util\CND\Scanner\GenericToken;
66

77
/**
8+
* @license http://www.apache.org/licenses Apache License Version 2.0, January 2004
9+
* @license http://opensource.org/licenses/MIT MIT License
10+
*
811
* @author Daniel Barsotti <daniel.barsotti@liip.ch>
912
*/
1013
class NoNewlinesFilter extends TokenTypeFilter

src/PHPCR/Util/CND/Scanner/TokenFilter/NoWhitespacesFilter.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
use PHPCR\Util\CND\Scanner\GenericToken;
66

77
/**
8+
* @license http://www.apache.org/licenses Apache License Version 2.0, January 2004
9+
* @license http://opensource.org/licenses/MIT MIT License
10+
*
811
* @author Daniel Barsotti <daniel.barsotti@liip.ch>
912
*/
1013
class NoWhitespacesFilter extends TokenTypeFilter

src/PHPCR/Util/CND/Scanner/TokenFilter/TokenFilterChain.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
use PHPCR\Util\CND\Scanner\Token;
66

77
/**
8+
* @license http://www.apache.org/licenses Apache License Version 2.0, January 2004
9+
* @license http://opensource.org/licenses/MIT MIT License
10+
*
811
* @author Daniel Barsotti <daniel.barsotti@liip.ch>
912
*/
1013
class TokenFilterChain implements TokenFilterInterface

src/PHPCR/Util/CND/Scanner/TokenFilter/TokenFilterInterface.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
use PHPCR\Util\CND\Scanner\Token;
66

77
/**
8+
* @license http://www.apache.org/licenses Apache License Version 2.0, January 2004
9+
* @license http://opensource.org/licenses/MIT MIT License
10+
*
811
* @author Daniel Barsotti <daniel.barsotti@liip.ch>
912
*/
1013
interface TokenFilterInterface

src/PHPCR/Util/CND/Scanner/TokenFilter/TokenTypeFilter.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
use PHPCR\Util\CND\Scanner\Token;
66

77
/**
8+
* @license http://www.apache.org/licenses Apache License Version 2.0, January 2004
9+
* @license http://opensource.org/licenses/MIT MIT License
10+
*
811
* @author Daniel Barsotti <daniel.barsotti@liip.ch>
912
*/
1013
class TokenTypeFilter implements TokenFilterInterface

src/PHPCR/Util/CND/Scanner/TokenQueue.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
namespace PHPCR\Util\CND\Scanner;
44

55
/**
6+
* @license http://www.apache.org/licenses Apache License Version 2.0, January 2004
7+
* @license http://opensource.org/licenses/MIT MIT License
8+
*
69
* @author Daniel Barsotti <daniel.barsotti@liip.ch>
710
*/
811
class TokenQueue implements \IteratorAggregate

src/PHPCR/Util/CND/Writer/CndWriter.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@
2020
* @see http://www.day.com/specs/jcr/2.0/25_Appendix.html#25.2.3 CND Grammar
2121
* @see http://jackrabbit.apache.org/node-type-notation.html
2222
*
23+
* @license http://www.apache.org/licenses Apache License Version 2.0, January 2004
24+
* @license http://opensource.org/licenses/MIT MIT License
25+
*
2326
* @author David Buchmann <david@liip.ch>
2427
*/
2528
class CndWriter

0 commit comments

Comments
 (0)