!C99Shell v. 1.0 pre-release build #16!

Software: Apache/2.0.54 (Fedora). PHP/5.0.4 

uname -a: Linux mina-info.me 2.6.17-1.2142_FC4smp #1 SMP Tue Jul 11 22:57:02 EDT 2006 i686 

uid=48(apache) gid=48(apache) groups=48(apache)
context=system_u:system_r:httpd_sys_script_t
 

Safe-mode: OFF (not secure)

/usr/lib/4Suite/tests/Rdf/   drwxr-xr-x
Free 5.3 GB of 27.03 GB (19.6%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     test_serializer.py (6.63 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
import sys
from Ft.Rdf.Serializers.Dom import Serializer
from Ft.Rdf.Drivers import Memory
from Ft.Xml import Domlette
from Ft.Rdf import Model
from RdfHelper import *

SOURCE_URI = 'http://foo/'

# REC RDF Syntax 7.4.1
source = """<rdf:RDF
    xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'
    xmlns:dc='http://purl.org/metadata/dublin_core#'>
    <rdf:Description about='http://www.dlib.org'>
      <dc:Title>D-Lib Program - Research in Digital Libraries</dc:Title>
      <dc:Description>The D-Lib program supports the community of people
       with research interests in digital libraries and electronic
       publishing.</dc:Description>
      <dc:Publisher>Corporation For National Research Initiatives</dc:Publisher>
      <dc:Date>1995-01-07</dc:Date>
      <dc:Subject>
        <rdf:Bag>
          <rdf:li>Research; statistical methods</rdf:li>
          <rdf:li>Education, research, related topics</rdf:li>
          <rdf:li>Library use Studies</rdf:li>
        </rdf:Bag>
      </dc:Subject>
      <dc:Type>World Wide Web Home Page</dc:Type>
      <dc:Format>text/html</dc:Format>
      <dc:Language>en</dc:Language>
    </rdf:Description>
    <rdf:Description about='http://fourthought.com'>
      <dc:Title>an XML consulting company</dc:Title>
      <dc:Description>A software engineering company with focus on XML and Knoledge based technologies
        </dc:Description>
      <dc:Publisher resource='http://fourthought.com'/>
      <dc:Date>1998-06-01</dc:Date>
      <dc:Subject>
        <rdf:Bag>
          <rdf:li>XML</rdf:li>
          <rdf:li>AI</rdf:li>
          <rdf:li>python</rdf:li>
        </rdf:Bag>
      </dc:Subject>
      <dc:Type>World Wide Web Home Page</dc:Type>
      <dc:Format>text/html</dc:Format>
      <dc:Language>en</dc:Language>
    </rdf:Description>
  </rdf:RDF>
"""

import sys
if sys.hexversion < 0x2000000:
    addSlash = lambda x:x+'/'
else:
    addSlash = lambda x:x

deserialized = [(addSlash('http://www.dlib.org'),
  'http://purl.org/metadata/dublin_core#Title',
  'D-Lib Program - Research in Digital Libraries',
  '',
  'http://foo/'),
(addSlash('http://www.dlib.org'),
  'http://purl.org/metadata/dublin_core#Description',
  'The D-Lib program supports the community of people\012       with research interests in digital libraries and electronic\012       publishing.',
  '',
  'http://foo/'),
(addSlash('http://www.dlib.org'),
  'http://purl.org/metadata/dublin_core#Publisher',
  'Corporation For National Research Initiatives',
  '',
  'http://foo/'),
(addSlash('http://www.dlib.org'),
  'http://purl.org/metadata/dublin_core#Date',
  '1995-01-07',
  '',
  'http://foo/'),
('ANONYMOUS0', #'urn:uuid:2060800-90c-e01-d03-d0c0803d09',
  'http://www.w3.org/1999/02/22-rdf-syntax-ns#type',
  'http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag',
  '',
  'http://foo/'),
('ANONYMOUS0', #'urn:uuid:2060800-90c-e01-d03-d0c0803d09',
  'http://www.w3.org/1999/02/22-rdf-syntax-ns#_1',
  'Research; statistical methods',
  '',
  'http://foo/'),
('ANONYMOUS0', #'urn:uuid:2060800-90c-e01-d03-d0c0803d09',
  'http://www.w3.org/1999/02/22-rdf-syntax-ns#_2',
  'Education, research, related topics',
  '',
  'http://foo/'),
('ANONYMOUS0', #'urn:uuid:2060800-90c-e01-d03-d0c0803d09',
  'http://www.w3.org/1999/02/22-rdf-syntax-ns#_3',
  'Library use Studies',
  '',
  'http://foo/'),
(addSlash('http://www.dlib.org'),
  'http://purl.org/metadata/dublin_core#Subject',
  'ANONYMOUS0', #'urn:uuid:2060800-90c-e01-d03-d0c0803d09',
  '',
  'http://foo/'),
(addSlash('http://www.dlib.org'),
  'http://purl.org/metadata/dublin_core#Type',
  'World Wide Web Home Page',
  '',
  'http://foo/'),
(addSlash('http://www.dlib.org'),
  'http://purl.org/metadata/dublin_core#Format',
  'text/html',
  '',
  'http://foo/'),
(addSlash('http://www.dlib.org'),
  'http://purl.org/metadata/dublin_core#Language',
  'en',
  '',
  'http://foo/'),
(addSlash('http://fourthought.com'),
  'http://purl.org/metadata/dublin_core#Title',
  'an XML consulting company',
  '',
  'http://foo/'),
(addSlash('http://fourthought.com'),
  'http://purl.org/metadata/dublin_core#Description',
  'A software engineering company with focus on XML and Knoledge based technologies\012        ',
  '',
  'http://foo/'),
(addSlash('http://fourthought.com'),
  'http://purl.org/metadata/dublin_core#Publisher',
  addSlash('http://fourthought.com'),
  '',
  'http://foo/'),
(addSlash('http://fourthought.com'),
  'http://purl.org/metadata/dublin_core#Date',
  '1998-06-01',
  '',
  'http://foo/'),
('ANONYMOUS1', #'urn:uuid:e010706-b08-10c-708-a09010ad0a',
  'http://www.w3.org/1999/02/22-rdf-syntax-ns#type',
  'http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag',
  '',
  'http://foo/'),
('ANONYMOUS1', #'urn:uuid:e010706-b08-10c-708-a09010ad0a',
  'http://www.w3.org/1999/02/22-rdf-syntax-ns#_1',
  'XML',
  '',
  'http://foo/'),
('ANONYMOUS1', #'urn:uuid:e010706-b08-10c-708-a09010ad0a',
  'http://www.w3.org/1999/02/22-rdf-syntax-ns#_2',
  'AI',
  '',
  'http://foo/'),
('ANONYMOUS1', #'urn:uuid:e010706-b08-10c-708-a09010ad0a',
  'http://www.w3.org/1999/02/22-rdf-syntax-ns#_3',
  'python',
  '',
  'http://foo/'),
(addSlash('http://fourthought.com'),
  'http://purl.org/metadata/dublin_core#Subject',
  'ANONYMOUS1', #'urn:uuid:e010706-b08-10c-708-a09010ad0a',
  '',
  'http://foo/'),
(addSlash('http://fourthought.com'),
  'http://purl.org/metadata/dublin_core#Type',
  'World Wide Web Home Page',
  '',
  'http://foo/'),
(addSlash('http://fourthought.com'),
  'http://purl.org/metadata/dublin_core#Format',
  'text/html',
  '',
  'http://foo/'),
(addSlash('http://fourthought.com'),
  'http://purl.org/metadata/dublin_core#Language',
  'en',
  '',
  'http://foo/')]

def Test(tester):

    tester.startGroup('DOM Serializer')
    driver = tester.test_data['driver']
    if driver.ExistsDb('test'):
        driver.DestroyDb('test')
    driver.CreateDb('test')

    reader = Domlette.NonvalidatingReader
    szr = Serializer()
    dom = reader.parseString(source, "http://foo.com")
    
    tester.startTest('deserialize')
    db = driver.GetDb('test')
    db.begin()
    model = Model.Model(db)
    szr.deserialize(model, dom, SOURCE_URI)
    nss = {}
    nss["http://purl.org/metadata/dublin_core#"] = 'dc'
    # Save it for later
    dom = szr.serialize(model, nss)
    actual = make_tuple(model.statements(), SOURCE_URI)
    tester.compare(deserialized, actual, func=compare_tuple)
    db.rollback()
    tester.testDone()

    tester.startTest('serialize')
    db = driver.GetDb('test')
    db.begin()
    model = Model.Model(db)
    szr.deserialize(model, dom, SOURCE_URI)
    actual = make_tuple(model.statements(), SOURCE_URI)
    tester.compare(deserialized, actual, func=compare_tuple)
    db.rollback()
    tester.testDone()
    tester.groupDone()

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 1.0 pre-release build #16 powered by Captain Crunch Security Team | http://ccteam.ru | Generation time: 0.0034 ]--