[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dotgnu-libs-commits] CVS: dotgnu.rdf FeatureTable.cs,NONE,1.1 RdfSeria
From: |
Adam Ballai <address@hidden> |
Subject: |
[Dotgnu-libs-commits] CVS: dotgnu.rdf FeatureTable.cs,NONE,1.1 RdfSerializer.cs,NONE,1.1 |
Date: |
Sat, 15 Feb 2003 07:58:33 -0500 |
Update of /cvsroot/dotgnu-libs/dotgnu.rdf
In directory subversions:/tmp/cvs-serv3292
Added Files:
FeatureTable.cs RdfSerializer.cs
Log Message:
--- NEW FILE ---
/*
* FeatureTable.cs - Implementation of the "DotGNU.Rdf.FeatureTable" class.
*
* A Utility class for the use of serializer implementations to handle
* features.
*
* Copyright (C) 2003 Adam Ballai, Cannibutter Software.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
namespace DotGNU.Rdf
{
class FeatureTable
{
struct Feature
{
RdfUri uri,
String value;
}
private Feature[] features;
private int index;
public FeatureTable(int size)
{
features = new Feature[size];
index = 0;
}
public Feature Features[int index]
{
get
{
if(index > -1 && features != null && index !=
features.Length)
{
features[index];
}
else
{
throw new ArgumentException(
S._("ArgumentException_IndexBad"));
}
}
}
public void AppendFeature(RdfUri uri, String value)
{
Feature newFeature = new Feature();
newFeature.uri = uri;
newFeature.value = value;
features[index];
index++;
}
}
}
--- NEW FILE ---
/*
* RdfSerializer.cs - Implementation of the "DotGNU.Rdf.RdfSerializer" class.
*
* Copyright (C) 2003 Adam Ballai, Cannibutter Software.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
namespace DotGNU.Rdf
{
using System;
using System.Xml;
using System.Collections;
public abstract class RdfSerializer
{
protected RdfWorld world;
protected String name;
protected String mimetype;
protected String uri;
protected FeatureTable featureTable;
public RdfSerializer(RdfWorld world, String name, String
mimetype, RdfUri uri)
{
world = world;
featureTable = new FeatureTable();
}
abstract void SetError(
public String Uri
{
set
{
uri = value;
}
get
{
return uri;
}
}
abstract bool SetFeature(RdfUri name, String value);
abstract bool GetFeature(RdfUri name);
abstract void SerializeModel(String filename, RdfModel model,
RdfUri baseuri);
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Dotgnu-libs-commits] CVS: dotgnu.rdf FeatureTable.cs,NONE,1.1 RdfSerializer.cs,NONE,1.1,
Adam Ballai <address@hidden> <=